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?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.