-
Depth Test not Working
I build a structure up from triangles (not strips) going down the y-axis along the x-axis. However the triangles drawn last appear on top whether they actually exist behind or in front.
Here is my code setting up the depth buffer:
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glDepthMask(GL_TRUE);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
I clear the depth buffer one time before I draw the the object.
Any ideas on what could cause this?
Colby
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules