PDA

View Full Version : Problem with glDepthTest (possibly camera related)



roflc0pt3r
07-08-2005, 07:46 PM
My question is:

I have enabled GL_DEPTH_TEST and set glDepthFunc to GL_LESS.

Yet, when I render the scene, it seems as if objects with a GREATER z value are rendered first (GL_GREATER). And when I try GL_GREATER, nothing appears.

Can the way you set up the projection matrix and model view matrix (camera) affect this?

roflc0pt3r
07-08-2005, 07:50 PM
Oops, I switched farclip and nearclip, resulting in a negative frustum.

I think I just owned myself. :(