PDA

View Full Version : glDrawElementsBaseVertex



MrFrustum
11-07-2011, 07:16 AM
Hello,

this is my problem:

i have n meshes stored in a vbo. The meshes have the same structure ( same number of vertices ). So i need only one array of indices and specify an offset for each mesh. glDrawElementsBaseVertex seems what i am looking for but i need to make a call for each mesh. Instead i want to make ONE call to render all meshes. I want a kind of instancing but not for rendering one mesh n times but for rendering n meshes with one index buffer with different per-instance offset.

Is it possible?

Thank you

_arts_
11-07-2011, 07:36 AM
http://www.opengl.org/sdk/docs/man4/xhtml/glMultiDrawElementsBaseVertex.xml

MrFrustum
11-09-2011, 02:11 AM
It works :)!

Thank you