Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About ryvola

  • Rank
  1. Thank you for your anwwer. But I still get the same warning. In fact I set different target when switching from shadow map render to camera view render. Just to be sure I set null render target at the end of my Render method. public void Render() { // ... // some initialization // ... context.OutputMerger.SetTargets(shadowMapDepthView); // here I get the warning // ... // shadow map render // ... // setting new target for camera view render context.OutputMerger.SetTargets(depthStencilView, renderTarget); // ... // camera view render // ... // just to be sure, I set all targets to null context.OutputMerger.SetTargets((DepthStencilView)null,(RenderTargetView)null); swapChain.Present(0, PresentFlags.None); } Despite the warning the render is OK. Why do I get the warning? Ryvola
  2. Hi everybody, I render a scene with a shadow map. When I set target for the output merger, I get a warning about the Resource not being unbound from the previous render. DeviceContext context; DepthStencilView shadowMapDepthView; // ... context.OutputMerger.SetTargets(shadowMapDepthView); D3D11: WARNING: ID3D11DeviceContext::OMSetRenderTargets: Resource being set to OM DepthStencil is still bound on input! [ STATE_SETTING WARNING #9: DEVICE_OMSETRENDERTARGETS_HAZARD ] Please, how can I unbound the resource? Ryvola
  3. ryvola

    [SlimDX] Shadow Map

    Yes, running this code on DX10.0 hardware doesn't allow to use more than 1 sample count. On DX11 hardware this code runs smoothly. Thank you for helping me. Ryvola
  4. ryvola

    [SlimDX] Shadow Map

    Maxest, thank you for your quick answer. All these formats give me the same exception. Is it this? (I'm still new to DirectX) An unhandled exception of type 'SlimDX.Direct3D11.Direct3D11Exception' occurred in SlimDX.dll Additional information: E_INVALIDARG: An invalid parameter was passed to the returning function (-2147024809) Edit: I've got additional info from debugger: D3D11: ERROR: ID3D11Device::CreateTexture2D: If the device interface is D3D10.0 or the driver/hardware are D3D10.0 (regardless of API version), a Texture2D with sample count > 1 cannot have both D3D11_BIND_DEPTH_STENCIL and D3D11_BIND_SHADER_RESOURCE. This call may appear to incorrectly return success on older/current D3D runtimes due to missing validation, despite this debug layer message. [ STATE_CREATION ERROR #99: CREATETEXTURE2D_INVALIDBINDFLAGS ] Does it mean I can't run it on DX10.0 graphics card? Ryvola
  5. Hi everybody, I try creating a shadow map in SlimDX using this tutorial http://takinginitiat...shadow-mapping/ Whenever I create Texture2D for the shadow map I get System.NullReferenceException. The relevant part of the code is here Texture2DDescription shadowMapTexDesc = new Texture2DDescription() { Width = form.ClientSize.Width, Height = form.ClientSize.Height, MipLevels = 1, ArraySize = 1, Format = Format.R32_Typeless, SampleDescription = swapDesc.SampleDescription, Usage = ResourceUsage.Default, BindFlags = BindFlags.DepthStencil | BindFlags.ShaderResource, CpuAccessFlags = CpuAccessFlags.None, OptionFlags = ResourceOptionFlags.None }; shadowMap = new Texture2D(device, shadowMapTexDesc); // the exception is raised here Anybody knows what I'm doing wrong? I'm using DirectX11. Ryvola
  • 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!