PDA

View Full Version : Display list question



orion
10-03-2005, 06:57 AM
Hi!
Does anybody know which is the difference between GL_COMPILE and GL_COMPILE_AND_EXECUTE modes using d.l.? Which one has got better performances?When it is used the first and when the second?
Thanx,
Bye

Trahern
10-03-2005, 08:12 AM
Originally posted by orion:
Hi!
Does anybody know which is the difference between GL_COMPILE and GL_COMPILE_AND_EXECUTE modes using d.l.? Which one has got better performances?When it is used the first and when the second?
Thanx,
Byethe only difference is that GL_COMPILE mode only compiles gl function calls and you can call them later by glCallList and GL_COMPILE_AND_EXECUTE compiles gl calls ( as the previous mode ) AND execute these calls.
So the first alternative is usualy used when you are pre-generating some static geometry in initialization of the scene and the second alternative is used in application runtime if you for example want to have the geometry in d-list instantly displayed

( so the behavior of the GL_COMPILE_AND_EXECUTE is usualy equivalent to the GL_COMPILE and calling glCallList() instantly after glEndList() )

There are some exceptions when some gl funcions are executed even in GL_COMPILE mode but Im sure you can find them somewhere in openGL documentation

10-03-2005, 12:22 PM
Thanx a lot, i'll try to use the first mode