Exemplo n.º 1
0
        public void ClearTargets(Color4 col, float depth, byte stencil)
        {
            var rtCount = OutputMerger.CurrentState.GetRenderTargetCount();

            for (int i = 0; i < rtCount; i++)
            {
                DevContext.ClearRenderTargetView(OutputMerger.CurrentState.RenderTarget.States[i], col);
            }
            if (OutputMerger.CurrentState.DepthStencilView.State != null)
            {
                DevContext.ClearDepthStencilView(OutputMerger.CurrentState.DepthStencilView.State, DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, depth, stencil);
            }
        }