Sign in to follow this  
cubicwang

OpenGL Question about draw primitive with index.

Recommended Posts

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!!!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this