Jump to content
  • Advertisement
Sign in to follow this  
postcar

glDrawRangeElements() method

This topic is 3772 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 have a question. Let me know the diffrence between glDrawElements() and glDrawRangeElements(). as I know on, glDrawRangeElements() has start and end parameters glDrawElements() don't have. but I have known that there is no difference between glDrawElements() and glDrawRangeElements() that is, the results are the same(except for start value bigger than end value). I want to know API Direct3D, DrawIndexedPrimitive(). ok I know DrawIndexedPrimitive() equal to glDrawElements() or glDrawRangeElements(). but there is a difference. that is, DrawIndexedPrimitive() has vertex start. so (pre-set VertexBuffer and IndexBuffer) when DrawIndexedPrimitive() is called, if vertex start value is set by 0, it will be rendered from 0 vertex to vertex count, and although IndexBuffer values is not changed. and if the vertex start is changed to 5, it will be rendered from 0 vertex to vertex count. and if start has 10 value in the glDrawRangeElements(), I supposed that it will be rendered from 10 to end(start + count), but it has been rendered from 0 to end. please, let me know. I want to know to (pre-set VertexBuffer and IndexBuffer(Once)) and draw polygon(at least twice) during converting vertex start to random value. ... my writing english is clumsy, because I'm English Beginner. thank you for reading this thread.

Share this post


Link to post
Share on other sites
Advertisement
start and end is a range value of vertices that you will use. It can serve as an optimization for the driver. It's possible that in some cases you won't see a performance increase and in some cases you will. There is nothing wrong with providing the driver with that extra info.

There is no vertex start in GL.
You would either have to offset the index values yourself or you call gl***Pointer to define the new start point.

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!