Jump to content
  • Advertisement

Archived

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

cjw

Depth Buffering - Direct X 8.0

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

Hello. I wrote a terrain engine in Direct X 8.0, but I think I''m having some problems with depth. My original version just drawed the scene in the same order everytime. Since I''m not using depth buffering, when you walk around some pieces of the terrain were hidden behind other pieces of terrain further away. I decided to see if I could rewrite my code to always draw from back to front to elminate the problem. This made things much better, but there were still some rendering glitches. I don''t think I am going to be able to get rid of them unless I use z-buffering. I enabled z-buffering when I created the device, added the D3DCLEAR_ZBUFFER flag (value of 1.0f) to the clear statement, and changed the z-buffer render state to on. When I ran my code again, my scene looked ok except for a pyramid that was sticking up out of the terrain. The pyramid was transulant in some parts. Without z-buffering enabled, my scene looks fine except for some glitches here and there at certain viewing angles. With z-buffering, objects sticking up above the plain of my terrain aren''t quit rendered correctly. Any ideas what the problem might be? Corey

Share this post


Link to post
Share on other sites
Advertisement

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