// Copyright © Amer Koleci and Contributors. // Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. using static Win32.Graphics.Direct3D11.Apis; namespace Win32.Graphics.Direct3D11; public unsafe partial struct RasterizerDescription1 { /// /// A built-in description with settings with settings for not culling any primitives. /// public static readonly RasterizerDescription1 CullNone = new(CullMode.None, FillMode.Solid); /// /// A built-in description with settings for culling primitives with clockwise winding order. /// public static readonly RasterizerDescription1 CullFront = new(CullMode.Front, FillMode.Solid); /// /// A built-in description with settings for culling primitives with counter-clockwise winding order. /// public static readonly RasterizerDescription1 CullBack = new(CullMode.Back, FillMode.Solid); /// /// A built-in description with settings for not culling any primitives and wireframe fill mode. /// public static readonly RasterizerDescription1 Wireframe = new(CullMode.None, FillMode.Wireframe); /// /// Initializes a new instance of the class. /// /// A value that specifies that triangles facing the specified direction are not drawn.. /// A value that specifies the fill mode to use when rendering. public RasterizerDescription1(CullMode cullMode, FillMode fillMode) { CullMode = cullMode; FillMode = fillMode; FrontCounterClockwise = false; DepthBias = (int)D3D11_DEFAULT_DEPTH_BIAS; DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP; SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS; DepthClipEnable = true; ScissorEnable = false; MultisampleEnable = true; AntialiasedLineEnable = false; ForcedSampleCount = 0; } }