Jump to content
  • Advertisement
Sign in to follow this  
Boltimus

OpenGL Depth Buffer causes artifacts

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

Hi everyone, I'm using openGL to simply draw the Earth. The problem is, when I turn on depth buffering I get artifacts that look like this: If I turn if off, then it looks normal as below: has anyone else seen this? Thanks! Bolt

Share this post


Link to post
Share on other sites
Advertisement
That looks like a problem with either your projection matrix, the polygon depth values, or the depth func is reversed (glDepthFunc(GL_GREATER))

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
Give us the code where you create the projection matrix.


Okay, I won't be able to post until tomorrow. Thanks in advance for the help!

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
That looks like a problem with either your projection matrix, the polygon depth values, or the depth func is reversed (glDepthFunc(GL_GREATER))


Thanks for both of your replies.. Agi and Mr. "V". As it turns out, it was my projection matrix. I set the near plane too small. :(

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!