Sign in to follow this  

glDrawRangeElements() method

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

This topic is 3458 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.

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