01/30/2003
15-462 Graphics I
23
A Bug to Watch
•GLfloat theta = 0.0; ...;  /* update in idle callback */
•GLfloat phi = 0.0; ...;  /* update in idle callback */
•GLuint arm = glGenLists(1);
•/* in init function */
•glNewList(arm, GL_COMPILE);
•    glRotatef(theta, 0.0, 1.0, 0.0);
•    drawBase();
•    ...
•    drawUpperArm();
•glEndList();
•/* in display callback */
•glCallList(arm);
What is wrong?