PDA

View Full Version : display lists (slow down)?



billy
01-15-2004, 05:00 AM
Hi,

I have coded "if" cases in my display list. This was done to determine to use the same loop to fill in diferent data structures. Will this slow down the performance when I call the display list? Or does the display only execute the opengl calls?

Thanks in advance,
Billy.

Bob
01-15-2004, 05:39 AM
The display lists cintains OpenGL calls and parameters only.

Ostsol
01-15-2004, 05:42 AM
Conditional statements don't really do anything in display lists. Only the path defined by the current state will be compiled into the display list. For example:

int i = 1 // global variable

startlist
if i == 1
render stuff
else
render other stuff
end list

That will result in "stuff" being entered into the display list, "other stuff" being ignored. Changing the global variable "i" later on in the program will have no effect on what the display list renders.