Jump to content
  • Advertisement
Sign in to follow this  
dyerseve

OpenGL BaseVertexIndex for OpenGL

This topic is 4833 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

In Direct3D the DrawIndexedPrimitive function has a BaseVertexIndex argument. Basically, it adds that number to each index sent to it. In OpenGL, neither glDrawElements or glDrawRangeElements have such an argument. The only way to do this is call glVertexPointer with a diferent offset. I saw somewhere that calling glVertexPointer excessively slows down rendering. The alternative to this is creating an uneccessarily huge index buffer. (This is for a height map) Is there better method? I'm using VBO's if it makes any difference.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
I saw somewhere that calling glVertexPointer excessively slows down rendering

its not *that* slow
drawelements tend to like vert/indices counts of around 2000-4000
basically your heightmaps should be devided up into small patches anyways if u want optimal performance thus typically 17x17 or 33x33 or 65x65 verts per patch

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!