Jump to content
  • Advertisement
Sign in to follow this  
quibb_user

[XNA] DepthBufferEnable problem

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

Hey! I have some serious problem with the DepthBuffer. protected override void Draw(GameTime gameTime) { graphics.GraphicsDevice.Clear(ClearOptions.Target, Color.Black, 1.0f, 0); spriteBatch.Begin(); spriteBatch.DrawString(fontArial, "Camera Position: " + _Camera.Position, new Vector2(0, 0), Color.White); spriteBatch.DrawString(fontArial, "\nCamera Target: " + _Camera.LookAt, new Vector2(0, 0), Color.White); spriteBatch.End(); GraphicsDevice.RenderState.DepthBufferEnable = true; ....... First of all i write some text to the screen. After that i reenable the DepthBuffer but all i get is an black screen with some errors when moving around... any suggestions? greetings :) quibb EDIT: looks like this: http://img215.imageshack.us/img215/788/zbufferproblejx3.jpg

Share this post


Link to post
Share on other sites
Advertisement
oh man.

graphics.GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, 1.0f, 0);

it's just to late :P
thx anyway!

greetings :)
quibb

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!