Advertisement

another Display List question

Started by March 14, 2002 03:50 PM
7 comments, last by nitzan 22 years, 11 months ago
If I create a display list with the GL_COMPILE flag, is it generated during compilation ? Can I *destroy* the list, change the object vertices, and then re-display list it again on the fly ? The real question is... if I have a deformable terrain, can I display list, and then when it deforms, destroy the list and re-display list the deformed terrain ? Or is everything done during compile time so it doesnt matter what my code does since it will simple generate list during compilation and dis-regard what happens during the program ? ------------------------- www.geocities.com/nitzanw www.scorchedearth3d.net -------------------------
Sure you can rebuild a display list in your main game loop but you will find that it''s quite a lot slower. A display list ''precaches'' your vertices / state changes etc. In this scenario it would be much more beneficial to use vertex arrays rather than have to rebuild your display list every single loop.



-------- E y e .Scream Software --------
----------------------------------------
                                  /-\
    http://www.eyescream.cjb.net | * |
                                  \-/
----------------------------------------
Advertisement
There are two parameters for display lists:

1) GL_COMPILE_AND_EXECUTE - when you use this option the data you send to the display list is stored or compiled by opengl and is also executed or drawn on screen.

2) GL_COMPILE - this option will store the commands that you put into the display list but will not action those commands until the display list is actually called.

Neither option has anything to do with the compile time for your program. Opengl compiles the display lists at runtime as you action glcommands between a glbeginlist and glendlist pair.

In my experience I have found that it takes a lot more time for opengl to make and draw a display list using GL_COMPILE so I would probably steer clear and use the other option.

[edited by - DMTSC on March 14, 2002 6:49:11 PM]
if you change your vertices alot forget about lists. they will kill your performance big time. search for stuff like VA or VAR (faster on newer HW than lists)

There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
That is an interesting point you just brought up _DarkWing_. I was going to code up my engine with a mix of dlists and VA''s for static and changing meshes respectively. From your posting this would seem like adding compexity when there would be no real advantage in doing so. My entry for the LOTR contest is my first attempt with VA''s.

Is your information based on anything from nvidia/ati etc or is it from your experience, and when you say newer cards how new are we talking about?

cheers.
my experience is from both . reading papers and actualy doing it myselft to test if it''s true. VA and DL run at about same speed on my TNT2 but on GF2/3/4 VA are actualy faser (+50%!)
by newer I think of GF3+ (actuly it''s faset on just about any GF if properly implemented)

There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
Advertisement
http://developer.nvidia.com/view.asp?IO=ogl_performance_faq


Nitzan

-------------------------
www.geocities.com/nitzanw
www.scorchedearth3d.net
-------------------------
I forgot to mention something. DL are still GREAT for one thing. You can close a coplex state change in one DL call and save alot of function overhead. (like packing 20 glTexEnv() calls so test up some mapping)

There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
cheers _DarkWing_, much appreciated.

This topic is closed to new replies.

Advertisement