Original Post
I have not been able to come up with a reason why depth testing refuses to work in my application. I have the following in my source before rendering: Along with a projection matrix (which is generated by myself but comes out to exactly what they had) with a near plane not zero. My shaders: Fragment Vertex The matrices are uploaded to the respective matrix variables as displayed in the vertex shader. Can anyone pinpoint what I am doing wrong? [Edited by - KodeNerd on November 30, 2008 5:27:47 PM]
glClearDepth(1.0);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
void main() {
gl_FragColor = gl_Color;
}
uniform mat4 Projection_Matrix;
uniform mat4 Modelview_Matrix;
void main() {
gl_Position = Projection_Matrix * Modelview_Matrix * gl_Vertex;
gl_ClipVertex = Modelview_Matrix * gl_Vertex;
gl_FrontColor = gl_Color;
}