{
}
GLvoid CALLBACK draw(void)
{
static int r=0;
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glPushMatrix();
glRotated((double)r,0.0,1.0,0.0);
cube();
glPushMatrix();
glTranslated(1.0,1.0,1.0);
cube();
glPopMatrix();
glPopMatrix();
glDisable(GL_LIGHT0);
glDisable(GL_LIGHTING);
glDisable(GL_DEPTH_TEST);
auxSwapBuffers();
if(++r>=360) r=0;
}
GLvoid CALLBACK resize(GLsizei w,GLsizei h)
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport(0,0,w,h);
gluPerspective(30.0,1.0,1.0,10.0);
glMatrixMode(GL_MODELVIEW);