Jump to content
  • Advertisement
Sign in to follow this  
ari556655

depth buffer woes

This topic is 3018 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

I'm basically just trying to draw quads(using glortho) top to bottom using the depth buffer, but I'm having an impossible time getting it to work, and reading docs have helped very little. Assuming I'm drawing top to bottom, what znear and zfar should I pass to glortho? And also, what should I pass glcleardepth and gldepthfunc?

Share this post


Link to post
Share on other sites
Advertisement
It depends on what you are using the ortho call for. Mesa's glOrtho2d uses -1 and 1 for zNear and zFar, respectively.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!