   glOrtho near far
  Hey if I do this code it draws a textured quad over the screen.  (image=stars)And then it draws a sphere in front of it.  (planet)void FPSDemo::drawSpace(){  mRotation+= mDeltaTime / 2000;  glMatrixMode(GL_PROJECTION);  glPushMatrix();  glLoadIdentity();  glOrtho(0.0f, mWidth, mHeight, 0.0f, 1.0f, 0.0f);  glEnable(GL_TEXTURE_2D);  glBindTexture(GL_TEXTURE_2D, mStarsTexture);  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);  glColor3f(1.0f,1.0f,1.0f);  glBegin(GL_QUADS);    glTexCoord2f(1.0f, 0.0f);    glVertex3f(mWidth,0.0f,0.0f);    glTexCoord2f(0.0f, 0.0f);    glVertex3f(0.0f,0.0f,0.0f);    glTexCoord2f(0.0f, 1.0f);    glVertex3f(0.0f,mHeight,0.0f);    glTexCoord2f(1.0f, 1.0f);    glVertex3f(mWidth,mHeight,0.0f);  glEnd();  glPopMatrix();  glMatrixMode(GL_MODELVIEW);  gluLookAt(0.0,-1.8,-2.9,0.0,-1.2,1.0,0.0,-1.0,0.0);  glPushMatrix();  glTranslatef(0.0,0.0,1.0);  glRotatef(mRotation*3,1.0, 0.0, 0.0);   glRotatef(77,0.0, 1.0, 0.0);   glEnable(GL_TEXTURE_2D);  glBindTexture(GL_TEXTURE_2D, mPlanetTexture);  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);  gluSphere(mQuad1, 1.93, 60, 60);  glDisable(GL_TEXTURE_2D);  glPopMatrix();}See how it has 1.0,0.0 for the near, far clipping planes in glOrtho?  I don't get that.  That means the near clipping plane is one unit away and the far clipping plane is right in front of the camera!So I think, maybe it doesn't matter which plane is which, the space between them is the space that is drawn.  But it does matter which is which.  If I switch them, and put the near plane at 0.0 and the far plane at 1.0 then my planet is no longer visible, the stars cover it up.  Why?   
  Don't think in terms of a camera or viewpoint when it comes to orthographic projection. For perspective projection it makes sense, because you have a single point which everything is projected towards. In orthographic projection, you instead have parallel projection lines and no real point that can uniquely define a viewpoint. Instead think of coordinate system ranges.If you specify a near plane of 1, and a far plane of 0, you have a depth range from -1 to 0 (yes, -1, because the clip plane values are distances between the origin and the clip plane along the negative Z-axis). Everything in this range is visible, and the depth order is determined by their relation to the clip planes. Something closer to the near clip plane, with regards to the default depth buffer setup, occludes something further away from the near clip plane.So if you change the order of the parameters, your planet and stars will also appear in reverse order with regards to the clip planes, and thus will reverse the order as seen by the depth buffer; the stars now occlude the planet, no the other way around.   ;  Oh.Aw man.  In my game I made a stack and everybody that needs something drawn on top pushes that part onto a stack.  Like my windmill, the propellers always get drawn on top so the characters don't walk on top of them.  So base of the windmill is drawn and the propellers are pushed onto a stack.  Then after everything is drawn everything is popped out of the stack and drawn.Now I think that is totally pointless.  I can just draw the stuff at the correct place on the Z axis and OpenGL will do it for me, won't it?I thought glOrtho was 2D.  ...it's not.I gotta read that Red Book.  @#fdf   ;  It's not totally pointless because the minute you want to draw something translucent, you do have to draw them in back->front ordering...;  Oh.  Good.