Jump to content
  • Advertisement
Sign in to follow this  

DepthStencil Question

This topic is 3332 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!