Sign in to follow this  
smart_lxd

error of getting Z-buffer in C#

Recommended Posts

smart_lxd    122
following code in C#: Device device; //create device ........ //setting z-buffer is true for device,can't throw exception device.RenderState.ZBufferEnable = true; //getting z-buffer,throw exception,error is:error in program bool zBuffer = device.RenderState.ZBufferEnable; please tell me,Why?

Share this post


Link to post
Share on other sites
directrix    181
did you create the z/stencil buffer when you created the D3D device, either manually or with PresentParameters.EnableAutoDepthStencil?

Also if you used PresentParameters.EnableAutoDepthStencil, did you make sure to set a valid buffer format in PresentParameters.AutoDepthStencilFormat?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this