mirror of
https://github.com/mouse0w0/lwjglbook-CN-Translation.git
synced 2025-08-23 04:35:29 +08:00
Update 04-07 and 09 chapters
This commit is contained in:
@@ -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);
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user