/// <summary>
        /// Clear the render targets and depth stencil
        /// </summary>
        /// <param name="context"></param>
        /// <param name="background"></param>
        public void Clear(DeviceContext1 context, Color background)
        {
            context.ClearDepthStencilView(DSV, DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, 1.0f, 0);

            foreach (var rtv in RTVs)
                context.ClearRenderTargetView(rtv, background);
        }
Ejemplo n.º 2
0
 public void Clear()
 {
     if (!_ready)
     {
         return;
     }
     _context.OutputMerger.SetRenderTargets(_rtv);
     _context.ClearRenderTargetView(_rtv, ClearColour);
 }
Ejemplo n.º 3
0
            /// <summary>
            /// Clears the buffers with the clear-color
            /// </summary>
            /// <param name="context"></param>
            /// <param name="color"></param>
            /// <param name="clearBackBuffer"></param>
            /// <param name="clearDepthStencilBuffer"></param>
            public void ClearRenderTarget(DeviceContextProxy context, Color4 color, bool clearBackBuffer, bool clearDepthStencilBuffer)
            {
                if (clearBackBuffer)
                {
                    context.ClearRenderTargetView(colorBuffer, color);
                }

                if (clearDepthStencilBuffer)
                {
                    context.ClearDepthStencilView(depthStencilBuffer, DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, 1.0f, 0);
                }
            }
 public void Clear(DeviceContext1 context)
 {
     context.ClearRenderTargetView(RTV, new Color(0, 0, 0, 1));
 }