Jump to content
  • Advertisement
Sign in to follow this  
Xtro

DepthStencil Question

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

Hi, I am using SlimDX library and I have a strange problem. I try to add a depth buffer for the MiniTri demo in the SlimDX Open source code but when do that the program shows only a black screen. No triangle is drawn with depth buffer. I just add this code block after the outputmerger.settarget method line. Texture2DDescription DepthStencilDescription = new Texture2DDescription(); DepthStencilDescription.Width = desc.ModeDescription.Width; DepthStencilDescription.Height = desc.ModeDescription.Height; DepthStencilDescription.MipLevels = 1; DepthStencilDescription.ArraySize = 1; DepthStencilDescription.Format = Format.D32_Float; DepthStencilDescription.SampleDescription = desc.SampleDescription; DepthStencilDescription.Usage = ResourceUsage.Default; DepthStencilDescription.BindFlags = BindFlags.DepthStencil; DepthStencilDescription.CpuAccessFlags = CpuAccessFlags.None; DepthStencilDescription.OptionFlags = ResourceOptionFlags.None; Texture2D DepthStencil = new Texture2D(device, DepthStencilDescription); DepthStencilView DepthStencilView = new DepthStencilView(device, DepthStencil); device.OutputMerger.SetTargets(DepthStencilView); every thing stays unchanged in the SlimDX's MiniTri demo and it doesn't draw anymore. Any ideas ?

Share this post


Link to post
Share on other sites
Advertisement
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!