I don't see a RenderState
as a member in the GraphicsDevice
class, which is where the functions for disabling the depth buffer used to be. Anyone know how this is done with this new 4.0 API?
It would be great if I could somehow access a full RenderState
-like class somewhere.. GraphicsDevice
seems to have gotten some of it, but not nearly all!
Ah.. I would be setting GraphicsDevice.DepthStencilState
to an instance of DepthStencilState
with any number of properties set. Seems like the RenderState
was broken into a bunch of other states. I was looking for in the individual properties inside of GraphicsDevice
before, but they seem to be better organized now for easier state management.
depthState = new DepthStencilState();
depthState.DepthBufferEnable = true; /* Enable the depth buffer */
depthState.DepthBufferWriteEnable = true; /* When drawing to the screen, write to the depth buffer */
GraphicsDevice.DepthStencilState = depthState;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With