renderView()
so that there are two calls to renderDancer()
.
void renderView(){ glTranslated(t[dancer][x],t[dancer][y],t[dancer][z]); renderDancer(); renderDancer(); }
renderView()
to push and pop the GL_MODELVIEW matrix.
glTranslated(t[dancer][x],t[dancer][y],t[dancer][z]); glPushMatrix(); renderDancer(); glPopMatrix(); renderDancer();
glPushMatrix()
so that only the first dancer responds the the Page Up and Page Down keys.void initialiseGL()
, adding the following.
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient); glEnable(GL_LIGHTING); glEnable(GL_COLOR_MATERIAL);
/* ** manage lights */ GLfloat ambient[]={0.5,0.5,0.5,1.0};
GLUquadricObj * renderTool; int wire=TRUE; if(wire) gluQuadricDrawStyle(renderTool,GLU_LINE); else gluQuadricDrawStyle(renderTool,GLU_FILL);
glutIdleFunc()
attached to the left mouse button (see Tutorial #14 for animation).