View Full Version : break point Index's
03-26-2004, 02:18 PM
i think it would be usefull if their was an index value i could specifie that would break the current primative list and start anew...
glArrayElement(0xff); // break value
glEnd();would draw 2 seperate polygons that dont share vertex's.
such a feature would be greatly usefull for triangle fans and terrain geomipmapping, would speed things up greatly if i didnt have to call glEnd and glBegin everytime i want to draw a seperate fan or make it possiable to shove it all into the same index array and avoid more function calls.
03-26-2004, 07:55 PM
Look up NV_primitive_restart
I think it does what you want.
glDrawRangeElements could give a boost instead of mutliple calls to glArrayElement
03-27-2004, 09:23 AM
yea NV_primitive_restart will do what i want. however is this an nvidia only extension? is their something similar to this on ati cards? was able to find information about the exenstion on nvidia's site almost imediatly but was unable to find much anything usefull on ati's site on the subject of extensions.
03-28-2004, 06:45 AM
If you send your GL_TRIANGLE_STRIP as GL_TRIANGLES but keep the strip order, your performance should be almost the same as this results in the post-transform-cache being used.
This for example the way, the quake3 engine renders it's models (I know it's old, but I guess, still a lot of drivers get optimised for this kind of path).
03-28-2004, 01:26 PM
your performance should be almost the same as this results in the post-transform-cache being used.Indices take up bandwidth too. Granted, not that much, but they do take up memory as well. And that gets pretty significant.
03-28-2004, 02:29 PM
anyway can anyone tell me if NV_primitive_restart will work on other brand GPU's? or is it an nvidia only extension?...
jeickmann I know I can do that, Their is a reason I posted this in the suggestions forum, Korval has a point yea know =p.
03-28-2004, 06:53 PM
Originally posted by luminus:
anyway can anyone tell me if NV_primitive_restart will work on other brand GPU's? or is it an nvidia only extension?...NVIDIA only. Look here: http://www.delphi3d.net/hardware/extsupport.php?extension=GL_NV_primitive_restart
I love this extension. The problem is that it's pure nonsense to implement this without direct hardware support, so an in-driver "emulation" for the current generation (and hardware support on next gen) isn't feasible.
But do have a look at EXT_multi_draw_arrays (http://oss.sgi.com/projects/ogl-sample/registry/EXT/multi_draw_arrays.txt) . This one accomplishes a similar goal, but has much wider support (http://www.delphi3d.net/hardware/extsupport.php?extension=GL_EXT_multi_draw_arrays) . Be aware though that it will not be hardware accelerated everywhere. It's just far easier to emulate inside the driver, at reasonable performance levels. May be useful to you.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.