Jump to content
  • Advertisement
Sign in to follow this  
F-Kop

glOrtho + glDepthTest

This topic is 4398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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.

Share this post


Link to post
Share on other sites
My program works fine with glOrtho, but when i throw in glEnable(GL_DEPTH_TEST), nothing displays anymore.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites
Quote:
Original post by MARS_999
Quote:
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".

Share this post


Link to post
Share on other sites
Quote:
Original post by MARS_999
Quote:
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!