display lists (slow down)?

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.

The display lists cintains OpenGL calls and parameters only.

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.