Archived

This topic is now archived and is closed to further replies.

cody

display list performance

Recommended Posts

i have read in the nvidia sdk that display lists are very fast. so i tryed them and they are about 10-20% slower than immediate mode. what the hell...?! im using a geforce3. cody

Share this post


Link to post
Share on other sites
that''s not unusual, so i wouldn''t bother posting your code. the best performance is with vertex arrays and glDrawElements calls. this is somewhat constraining, because then you can''t have different normals or texture coordinates for the same vertex, unless you duplicate the vertex if you need a different normal or texture coordinate.

also, use the "VAR" extension, which again, constrains the engine even more, because then you have to put all the vertex data for all the models in the same array. this is definitely like hacking it, but the performance is like 200% gain..

if you need help with VAR, search usenet for "vertex_array_range", also download the opengl extensions PDF from nVidia''s site.

Share this post


Link to post
Share on other sites
well, im loading a 3ds file and i dont do any optimisation on the data. it was just a test.
i render each face with glVertex3f(...) and glNormal3f(...).
for every face i set the material and texture. so of course this is very slow.
but when i put all this stuff into a list it is even slower!

the code is pretty long so i dont post it here.

Share this post


Link to post
Share on other sites
bpj1138:
i know about these extensions, and probably i will use them.

could you tell me what the difference between the normal vertex_array und the nv_vertex_array_range is?

Share this post


Link to post
Share on other sites
Also you said "display list" and not vertex buffers. Display list are good if you gona be using the same commands over and over. Fo plastering high polygon counts on screen of course vertex buffers are faster and this is where you would of course use glDrawElements etc...

Share this post


Link to post
Share on other sites
cody,

what the VAR extension does is allocate continious (not paged) memory on the video board or AGP memory, where the video chip can DMA it.. Also, the "conherency model" is relaxed, which means the cpu and video chip can read/write from the same memory at the same time and there is no synchronization performed. normally, opengl will copy all the elements from an array before the call go drawelements returns, to make sure it''s read one full set of data that hasn''t changed before the host is allowed to modifiy it again.

--bart

Share this post


Link to post
Share on other sites