Depth Buffer


I'm having a problem with the overlapping. I have a terrain block in which I want to draw boxes above it. They are above it, but only in certain angles, in other angles, they are below it  :?. I've printed both positions during the render cycle and no object moves, this is clearly a depth buffer problem. Anyone had any similar problem? How can I solve it? What should I look for?

Thanks in advance,

Tiago Silva

Are you using SimpleGame, if not, are you setting up a ZBufferState?

typezero - you're the guy who wanted to not extend one of our app classes right?  Check out the ZBufferState set up in SimpleGame.  Also you might look at states in general and get familiar with them.

thx  :smiley: it worked