In OpenGL, I display a simple model. When I enable the depth buffer,
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
everything disappears. I read this OpenGL FAQ, but it didn’t help me.
My perspective settings are: angle=45deg, near=1, far=40, I put model at (0,0,0) and I place my eye at (0,0,4). Without the Z-buffer, I can see the model.
What could be wrong?
Did you make sure you clear the depth buffer?