void dawn(int dawn){ //second try from Stuart if(dawn) { //in drawcons before Frustum static float Cbottom[] = { 0.1, 0.1, 0.15 }; /* deep blue @ bottom */ static float Ctop[] = { 0.3, 0.3, 0.45 }; /* paler blue @ top */ // glDrawBuffer(GL_BACK); slevy 8pm 3jun07 glDepthMask(GL_FALSE); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glShadeModel( GL_SMOOTH ); /* draw a colored quad spanning the whole [[-1..1, -1..1] viewport, * just shy of Z=+1 which is the far clip plane * when the projection matrix = identity */ glBegin( GL_QUADS ); glColor3fv( Cbottom ); /* deep blue at bottom */ glVertex3f( -1,-1, 0.9999 ); glVertex3f( 1,-1, 0.9999 ); glColor3fv( Ctop ); /* pale blue at top */ glVertex3f( 1,1, 0.9999 ); glVertex3f( -1,1, 0.9999 ); glEnd(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glDepthMask(GL_TRUE); //slevy 8pm 3jun07 } } // end dawn()