Exemplo n.º 1
0
 public override void ClearBackBuffer(Color4 color)
 {
     _deviceContext.OutputMerger.SetTargets(_depthStencilView, _renderTargetView);
     _deviceContext.Rasterizer.SetViewport(0, 0, (float)_renderTargetSize.Width, (float)_renderTargetSize.Height, 0, 1);
     _deviceContext.ClearRenderTargetView(_renderTargetView, color.ToSharpDX());
     _deviceContext.ClearDepthStencilView(
         _depthStencilView,
         D3D11.DepthStencilClearFlags.Depth | D3D11.DepthStencilClearFlags.Stencil, 1, 0);
 }
Exemplo n.º 2
0
 public override void ClearBackBuffer(Color4 color)
 {
     context.OutputMerger.SetTargets(depthStencilView, renderTargetView);
     context.Rasterizer.SetViewport(0, 0, Form.ClientSize.Width, Form.ClientSize.Height, 0, 1);
     context.ClearRenderTargetView(renderTargetView, color.ToSharpDX());
     context.ClearDepthStencilView(
             depthStencilView,
             DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, 1, 0);
 }