View Full Version : Simple display list question

05-10-2003, 02:52 PM
Let's say I've compiled a display list which has the following lines inside it:

x := 0.5;
y := 6*arcsin(x);
glRotatef(y, 0, 1, 0);

When I call the list will it go through the calculation of y again, or will it have already stored y and simply execute the command, glRotatef(pi, 0, 1, 0)?

(Note: pi is 3.14159..., as you probably guessed, i.e. 6*arcsin(0.5) = pi.)

05-10-2003, 03:03 PM
Display lists don't record any machine code, only OpenGL calls and its parameters. So y is only calculated once.

05-10-2003, 03:39 PM
Also remember that not all GL commands are stored in display lists. There's a description of the ones which are not included in display lists here: http://www.opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/newlist.html

05-11-2003, 12:16 AM