hi, i downloaded the BasicSetupDemo and it works (naturally! ), but when i add the Framerate class i got some visualization errors:
the "older" cube was always behind the "new" cubes :\
if i remove the framerate inizialitation string from Initialize() method it works correctly, but i need the framerate visualization (and other visualization too!)
i found another topic about this problem: http://www.bepu-games.com/forums/viewto ... nent#p4450
but i can't understand how he fixed it, SpriteBatch don't have an DepthBufferEnable parameter :\
how i can fix it? Thank you!
Problem with Camera Visualization
Re: Problem with Camera Visualization
The RenderStates of the GraphicsDevice are changed by the SpriteBatch every time it starts to draw something. Unless they are set back to what they were before, other drawing will be wonky. A full reference of the things changed by the SpriteBatch and how you can deal with it can be found on Shawn Hargreaves' blog:
http://blogs.msdn.com/shawnhar/archive/ ... tates.aspx
http://blogs.msdn.com/shawnhar/archive/ ... tates.aspx
-
- Posts: 2
- Joined: Sat Aug 08, 2009 1:38 pm
Re: Problem with Camera Visualization
Thank you! Now it works correctly!
i just added:
before the base.Draw(gameTime); in my Framerate class! ^__^
Thank you a lot again ^__^
i just added:
Code: Select all
GraphicsDevice.RenderState.DepthBufferEnable = true;
Thank you a lot again ^__^