ok… if I have my viewing perspective defined as:
gluPerspective(40.0, 1.0, 1.0, 500.0);
and I draw a quad like this:
glVertex3f(-100.0, -100.0, 0.0);
glVertex3f(-100.0, 100.0, 0.0);
glVertex3f(100.0, 100.0, 0.0);
glVertex3f(100.0, -100.0, 0.0);
Then where does it get drawn? Is z=0.0 right where the camera is? If so, then the quad would not be viewable as drawn. Is this correct?
It depends on whether there are other matrix manipulation calls in your code, but if there’s only this gluPerspective call then yes, this quad is in front of the near clipping plane and thus completely culled.
There are no other matrix calls affecting this quad. I only have one other object being drawn, and although there are some matrix calls there - they are surrounded by glPushMatrix and glPopMatrix.
For some reason I can’t get the quad to display at all. I’m guessing I’d have to post some code for someone to tell me why - but is there something that I may not be reasoning about correctly? For example, when you say ‘completely culled’ I’m assuming you mean the coordinates are in CCW direction?
One of the weird things is that if I replace the above code with simply:
glTranslatef(0.0, 0.0, -20.0);
then it shows up.