Reputation: 648
I'm trying to render only some of the Indices stored in the index buffer of an VAO.
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, 0);
I know that the second parameter is the count of vertices to draw, in this case one triangle and the last parameter is the offset as a pointer. But how do I specify this pointer using LWJGL/Java?
Upvotes: 0
Views: 501
Reputation: 648
Oh. I just have to specify the offest in bytes. I use floats, so to start at the scond triangle I would have to set the last parameter to 3 * 4.
Upvotes: 1