I am currently having a problem with depth testing using OpenGL. The problem is as follows:
A file is read into my program containing vertex, face, normal, texture and color info.
A frustrum is applied using:
Depth testing is enabled as follows:
Back face culling is applied:
glClear is used to clear the depth buffer:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
When the model is displayed iin the viewport, if the poly count is quite high, then the depth testing doesn’t work.
I’ve proved that it’s not a back face cull problem since if I do a sphere, the opposing face is culled and therefore eliminates the depth test problem. If I do a complex shape such as a torus knot or a full creature model, then the depth testing just doesn’t work.
Any help would be appreciated.