glOrtho + glDepthTest
Why wouldn't they work together? Just because its Ortho doesn't mean it doesn't have a depth buffer. Its just means the image isn't perspective correct, meaning images farther away get smaller.
My program works fine with glOrtho, but when i throw in glEnable(GL_DEPTH_TEST), nothing displays anymore.
1. What value do you clear the depth buffer at? (glClearDepth)
2. What test function are you using for the depth test? (look for glDepthFunc)
Quote:Original post by MARS_999Quote:Original post by F-Kop
1: 0.0f
2: GL_LEQUAL
clear should be 1.0
Or else it will be pretty rare to be "less or equal".
Quote:Original post by MARS_999Quote:Original post by F-Kop
1: 0.0f
2: GL_LEQUAL
clear should be 1.0
Or just don't bother setting the value at all, as 1.0 is the default clear value.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement