Question about draw primitive with index.

Started by
1 comment, last by cubicwang 17 years, 10 months ago
Hi~ I put my vertex data in a VBO and the index in another, and draw the mesh by the glDrawElement(), That' ok! But how can I draw sections of my mesh by set the different start point of index? In direct3D we can use drawIndexPrimitive(), the argument of this function can set render start from different position of the index and vertex buffer, can opengl do the same? Please help, thank you very much!!!
Advertisement
I'm not 100% sure what you mean, but you can specify the offset in glVertexPointer. Is that what you are after?

Oh, and if you can use glDrawRangeElements, or glMultiDrawElements. They are more efficient.
"We confess our little faults to persuade people that we have no large ones." -Francois de La Rochefoucauld (1613 - 1680). | My blog
Thank you very much! the glDrawRangeElements is what I need! thank you!

This topic is closed to new replies.

Advertisement