the best situation to use display list?

I want some general comments about using dispaly list, the benifit and the side effect, the compromise between memory and speed
Thanks

Display lists:

-Can make your code cleaner
-Speed up rendering static stuff, possibly beyond vertex arrays
-Need to be updated every frame if the contents are dynamic, in which case they only slow things down
-Use propably a little more memory than vertex arrays, but not too seriously
-Become very slow when you run out of memory
-Can store state changes in addition to vertex data
-Allow drivers to do hardware specific optizations like using optimal triangle strip length

That’s about all I can come up at the moment. I hope it helps.

-Ilkka

Originally posted by JustHanging:
[b]Display lists:

-Can make your code cleaner
-Speed up rendering static stuff, possibly beyond vertex arrays
-Need to be updated every frame if the contents are dynamic, in which case they only slow things down
-Use propably a little more memory than vertex arrays, but not too seriously
-Become very slow when you run out of memory
-Can store state changes in addition to vertex data
-Allow drivers to do hardware specific optizations like using optimal triangle strip length

That’s about all I can come up at the moment. I hope it helps.

-Ilkka[/b]

HI Ilkka:

Many thanks to you. Your comments are of great value to me.
Could you explain more about:
“Need to be updated every frame if the contents are dynamic, in which case they only slow things down”
and
“-Can store state changes in addition to vertex data”

I understand it like this:
in 2 case we need to render an object. One is when there is translate or rotate happening. One is the color/texture of the object needs to be changed.
By ‘dynamic’ do you mean the frist case if we need to do transformation to the object every loop(or most of time)?
In the second case is it possible to change the texture/color of a specific object which belongs to a list which contains several objects?
When you say ‘static’, do you mean , unlike my second case, the set of objects is rendered as whole?

Everything in a display list is static, so if you need to change anything even a tiny vertex, you need to recreate the entire displaylist (slow), but you can of course do transformations before you call the display lists, so you can translate, scale and rotate the contents of the displaylist without having to recreate it.

You cannot make any changes to the display list, the only thing you can do is to put some changes like color and textures before you call the display list, but that only works with the first object, not if you have many objects, but you can of course create many displaylists, one for each object, I am not sure about the overhead for a display list, but be aware that many drivers use huge amounts of memory for display lists.

Mikael

[This message has been edited by mikael_aronsson (edited 03-05-2003).]