using glDrawRangeElements

In my opengl reference book, it is recommended that ‘end-start+1’ should not exceed GL_MAX_ELEMENTS_VERTICES …

i quickly checked this max vertices value by using glGetIntergerv() and found out that it’s 4096.(using fx5200) … so, does this mean that i shouldn’t process more than 4096 vertices per glDrawRangeElements call? if so, can i do something like the following?

loop {
glDrawRangeElements(…4096 vertices …)
} until no more vertices

Not exactly. You can process as many verticies as you like, but for optimal performance all of the verticies should lie in a 4096 range. Looking at the spec , it will still work, but it may not be optimal. If you can trivially partition your vertex set into GL_MAX_ELEMENTS_VERTICIES (and GL_MAX_ELEMENTS_INDICES) blocks, do it. I wouldn’t recommend going to any heroic lengths unless you determine that your app is transform bound and there is no other way to improve performance.

btw. on my ati9500pro i get max 0x7fffffff vertices (and it looks like this would be ture) and the index maximum is 65535.
on my gf2 system i get 1000/1000.

[This message has been edited by AdrianD (edited 12-04-2003).]

Originally posted by AdrianD:
[b]btw. on my ati9500pro i get max 0x7fffffff vertices (and it looks like this would be ture) and the index maximum is 65535.
on my gf2 system i get 1000/1000.

[This message has been edited by AdrianD (edited 12-04-2003).][/b]

Yes there is a large difference between ATI and NV for some reason.

Also, other extensions like VBO effect this one, so I think in that case, you can ignore the MAX values.

thx for the replies.