CD3D11_RASTERIZER_DESC::CD3D11_RASTERIZER_DESC(D3D11_FILL_MODE,D3D11_CULL_MODE,BOOL,INT,FLOAT,FLOAT,BOOL,BOOL,BOOL,BOOL) function (d3d11.h)

Instantiates a new instance of a CD3D11_RASTERIZER_DESC structure that is initialized with D3D11_RASTERIZER_DESC values.

Syntax

void CD3D11_RASTERIZER_DESC(
  D3D11_FILL_MODE fillMode,
  D3D11_CULL_MODE cullMode,
  BOOL            frontCounterClockwise,
  INT             depthBias,
  FLOAT           depthBiasClamp,
  FLOAT           slopeScaledDepthBias,
  BOOL            depthClipEnable,
  BOOL            scissorEnable,
  BOOL            multisampleEnable,
  BOOL            antialiasedLineEnable
);

Parameters

fillMode

Type: D3D11_FILL_MODE

A D3D11_FILL_MODE-typed value that determines the fill mode to use when rendering.

cullMode

Type: D3D11_CULL_MODE

A D3D11_CULL_MODE-typed value that indicates triangles facing the specified direction are not drawn.

frontCounterClockwise

Type: BOOL

A Boolean value that specifies whether a triangle is front- or back-facing. If this parameter is TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If this parameter is FALSE, the opposite is true.

depthBias

Type: INT

Depth value added to a given pixel. For info about depth bias, see Depth Bias.

depthBiasClamp

Type: FLOAT

Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.

slopeScaledDepthBias

Type: FLOAT

Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.

depthClipEnable

Type: BOOL

A Boolean value that specifies whether to enable clipping based on distance.

The hardware always performs x and y clipping of rasterized coordinates. When depthClipEnable is set to the default–TRUE, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm).


0 < w
-w <= x <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
-w <= y <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
0 <= z <= w

When you set depthClipEnable to FALSE, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 < w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane.

scissorEnable

Type: BOOL

A Boolean value that specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.

multisampleEnable

Type: BOOL

A Boolean value that specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to FALSE to use the alpha line anti-aliasing algorithm.

antialiasedLineEnable

Type: BOOL

A Boolean value that specifies whether to enable line antialiasing; only applies if doing line drawing and multisampleEnable is FALSE.

Return value

None

Remarks

Here is how CD3D11_RASTERIZER_DESC assigns the provided values to the members of D3D11_RASTERIZER_DESC:

FillMode = fillMode;
        CullMode = cullMode;
        FrontCounterClockwise = frontCounterClockwise;
        DepthBias = depthBias;
        DepthBiasClamp = depthBiasClamp;
        SlopeScaledDepthBias = slopeScaledDepthBias;
        DepthClipEnable = depthClipEnable;
        ScissorEnable = scissorEnable;
        MultisampleEnable = multisampleEnable;
        AntialiasedLineEnable = antialiasedLineEnable;

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11.h
Library D3D11.lib

See also

CD3D11_RASTERIZER_DESC