Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Depth doesn't seem to work

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

Hallo leute, I''m trying to make a 3d world in openGL, but as I add new rooms to the game, they seem to be all messed up (one comes in front of the other). Better saying, they seem to be ok, but as soon as I walk ahead, they seem to collapse one into another. I''m drawing the walls one over the other, could that be a problem? (ex: the wall1 (w1) is drawed twice, one for room1 and again for room 2) ------w1-------- |room1 |room2 | | ------w1-------- My gldepth config are the following: unsigned int mode = GLUT_DEPTH | GLUT_RGBA | GLUT_DOUBLE; glutInitDisplayMode(mode); glClearDepth(1.0f); glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); Thanks in advance

Share this post

Link to post
Share on other sites

  • 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!