PDA

View Full Version : using glDrawRangeElements



grunt123
12-02-2003, 02:40 PM
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

idr
12-04-2003, 08:51 AM
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 (http://oss.sgi.com/projects/ogl-sample/registry/EXT/draw_range_elements.txt) , 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.

AdrianD
12-04-2003, 11:08 AM
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).]

V-man
12-07-2003, 11:06 AM
Originally posted by AdrianD:
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).]

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.

grunt123
12-08-2003, 06:17 PM
thx for the replies. http://www.opengl.org/discussion_boards/ubb/smile.gif