mirror of
https://github.com/amerkoleci/Vortice.Win32.git
synced 2026-01-14 16:16:04 +08:00
50 lines
2.1 KiB
C#
50 lines
2.1 KiB
C#
// 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
|
|
{
|
|
/// <summary>
|
|
/// A built-in description with settings with settings for not culling any primitives.
|
|
/// </summary>
|
|
public static readonly RasterizerDescription1 CullNone = new(CullMode.None, FillMode.Solid);
|
|
|
|
/// <summary>
|
|
/// A built-in description with settings for culling primitives with clockwise winding order.
|
|
/// </summary>
|
|
public static readonly RasterizerDescription1 CullFront = new(CullMode.Front, FillMode.Solid);
|
|
|
|
/// <summary>
|
|
/// A built-in description with settings for culling primitives with counter-clockwise winding order.
|
|
/// </summary>
|
|
public static readonly RasterizerDescription1 CullBack = new(CullMode.Back, FillMode.Solid);
|
|
|
|
/// <summary>
|
|
/// A built-in description with settings for not culling any primitives and wireframe fill mode.
|
|
/// </summary>
|
|
public static readonly RasterizerDescription1 Wireframe = new(CullMode.None, FillMode.Wireframe);
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="RasterizerDescription1"/> class.
|
|
/// </summary>
|
|
/// <param name="cullMode">A <see cref="CullMode"/> value that specifies that triangles facing the specified direction are not drawn..</param>
|
|
/// <param name="fillMode">A <see cref="FillMode"/> value that specifies the fill mode to use when rendering.</param>
|
|
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;
|
|
}
|
|
}
|