Update 04-07 and 09 chapters

This commit is contained in:
Mouse
2019-12-27 16:44:15 +08:00
parent 9c0958eb78
commit 41f0fcf136
5 changed files with 8 additions and 51 deletions

View File

@@ -418,14 +418,10 @@ public void render(Window window, GameItem[] gameItems) {
public void render() {
// 绘制Mesh
glBindVertexArray(getVaoId());
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glDrawElements(GL_TRIANGLES, getVertexCount(), GL_UNSIGNED_INT, 0);
// 重置状态
glDisableVertexAttribArray(0);
glDisableVertexAttribArray(1);
glBindVertexArray(0);
}
```