View Full Version : Display lists vs Vertex Arrays
06-11-2001, 10:13 PM
recently I wrote a program which uses an interleaved array combined with an index array. the interleaved array looks like this:
for every vertex:
3 floats for the normal followed by 3 floats for the vertex
now... the superbible says that I should use display lists with lit geometry...
when is this really true? is it true in all cases?? I am drawing around ~8000 triangles... (no culling schemes yet, but soon!). What do you guys think? Would it be faster if I used display lists?
06-11-2001, 10:16 PM
The only real benefit of using display lists is being able to nest OpenGL commands. I use indexed vertex buffers in my engine.
06-12-2001, 12:33 AM
Depending on implementations, display lists can be much faster than standard vertex arrays.
and how often does that happen?
what about Nvidia? what's the general pattern?
06-12-2001, 12:44 AM
Prolly a stupid thing to say since I dont know much about this, but why not use vertex arrays inside display lists?
06-12-2001, 12:51 AM
yeah... i was thinking about that too at first. But i think for some reason i scratched it out... but I can't seem to re-find the reason. So whatever, I guess I'll try that!
another question: if I do that... and edit the vertex array (which is inside the display list)... will that display the old geometry (before the editing) or the new edited vertex array??
06-12-2001, 05:49 AM
No, the vertex array data is compiled into the display list when you create it (part of the reason why lists take so much memory), so changing the data after you create the list will have no effect. In fact, to save memory you could just delete it.
06-12-2001, 09:43 AM
Display lists a great if there are lots of different commands changing things like lighting, blending etc.
06-12-2001, 10:58 AM
>Display lists a great if there are lots of >different commands changing things like >lighting, blending etc.
No, no, it is used for things that are not changed!
Display list is so cool!!, you use them for draw model that will not be changed, you made all calcs/loops/if.. etc just once and put the resulted model in a display list, then each time that you need to draw the model just call the display list, it is sooo fasstt!!, because all calcs are already done.
This is great for render all the statics object in your scene, (the engine don't need to do all calcs again). you just move/rotate the camera and then call the display list.
In my render engine, i use a logical field called needUpdate, when it is false my engine draw the scene using display list, when the scene is changed i make needupdate true so my engine will call the rutine to call and draw the scene again and ill update the display list for the next frame.
Basicaly, try to use display list when you are just moving/rotating/zooming or another frame procces where you know that the scene is the same that the previus frame, and only the camera is changed.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.