Example #1
0
        // Streamout is not supported.

        #region Commands

        protected override void ClearRenderTargetViewImpl(ClearTarget clearTarget, Vector4 clearColor, float clearDepth, byte clearStencil)
        {
            if ((clearTarget & ClearTarget.Color) != 0)
            {
                var clearColorDx = InternalUtils.ConvVec4Color(clearColor);
                foreach (var slot in slotsColor)
                {
                    CommandListD3D12.ClearRenderTargetView(((DescriptorHeapDX)descriptorHeapColor).GetCPUHandle(slot), clearColorDx);
                }
            }
            if ((clearTarget & ClearTarget.DepthStencil) != 0)
            {
                CommandListD3D12.ClearDepthStencilView(((DescriptorHeapDX)descriptorHeapDepthStencil).GetCPUHandle(slotDepthStencil),
                                                       ClearFlags.FlagsDepth | ClearFlags.FlagsStencil, clearDepth, clearStencil);
            }
        }