Login  Register

Re: Seeking Help with OpenGL Depth Buffer Issue

Posted by jmaasing on Oct 05, 2014; 7:38am
URL: https://forum.jogamp.org/Seeking-Help-with-OpenGL-Depth-Buffer-Issue-tp4033219p4033271.html

So there is no issue with depth testing on your video-card - that's good at least :-)
My next guess would be that your math is wrong somewhere. You are right that the shaders in this example skips the transformation you usually do by passing in a model-view-projection matrix as a uniform to the shader.
What this example shows is that the depth value by default should be between 0.0 and 1.0, and that you can color the triangles using the glFragCoord.z to see the depth value as color. If your original code would result in "all white" triangles that means your depth value is always >= 1.0 which is a problem.