super imposing stuff

okay after I draw the scene… I want to fade it from scene to white… I know I haven’t put the loop in yet, but I don’t understand why this code doesn’t draw a white square that fills up the whole screen!

glViewport(0,0,windw,windh);

glMatrixMode(GL_PROJECTION);
glPushMatrix();

  glOrtho(-1,1,-1,1,1,-1);
  glMatrixMode(GL_MODELVIEW);
  	
  glColor3f(1.0f,1.0f,1.0f);
  glLineWidth(2.0);
  glBegin(GL_QUADS);
    glVertex3i(-1,-1,0);
  	glVertex3i(-1,1,0);
  	glVertex3i(1,1,0);
  	glVertex3i(1,-1,0);
  glEnd();

  glMatrixMode(GL_PROJECTION);

glPopMatrix();

glMatrixMode(GL_MODELVIEW);

after your push matrix, you forgot to call

glLoadIdentity(); So your concatenating a perpestive and an orthographic projection matrix. I don’t know what that gives!?

gah, I thought that using glLoadIdentity(); might do something bad (ie. replcae) to the current perspective matrix… but I forgot I had pushed another one on to the stack…

I feel dumb!