Jump to content
  • Advertisement
Sign in to follow this  
cubicwang

OpenGL Question about draw primitive with index.

This topic is 4442 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!