I am trying to understand when it makes sense to use the glDrawRangeElements function.
The OpenGL wiki says:
for optimization purposes, it is useful for implementations to know the range of indexed rendering data
So, as I interpret it, if I had one large buffer (containing say, multiple meshes' data) and I was planning to call glDrawRangeElements if I instead specify the minimum and maximum index values that this call will use, I could achieve a speedup.
Is this a correct use case for glDrawRangeElements?
It seems like I would almost always know the minimum and maximum index values (because I would know ahead of time what I am going to draw) so it seems like glDrawRangeElements should be just a drop in replacement for glDrawElements.
However, this answer implies that glDrawRangeElements might actually be slower.
So, what are the pros and cons of using glDrawRangeElements?