CD3D11_RASTERIZER_DESC2 structure

Describes rasterizer state.

Syntax

struct CD3D11_RASTERIZER_DESC2 {
  void CD3D11_RASTERIZER_DESC2();
  void CD3D11_RASTERIZER_DESC2( const D3D11_RASTERIZER_DESC2 & o);
  void CD3D11_RASTERIZER_DESC2( CD3D11_DEFAULT );
  void CD3D11_RASTERIZER_DESC2( D3D11_FILL_MODE                       fillMode, D3D11_CULL_MODE                       cullMode, BOOL                                  frontCounterClockwise, INT                                   depthBias, FLOAT                                 depthBiasClamp, FLOAT                                 slopeScaledDepthBias, BOOL                                  depthClipEnable, BOOL                                  scissorEnable, BOOL                                  multisampleEnable, BOOL                                  antialiasedLineEnable, UINT                                  forcedSampleCount, D3D11_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster);
  void ~CD3D11_RASTERIZER_DESC2();
  void operator const D3D11_RASTERIZER_DESC2&();
};

Members

void CD3D11_RASTERIZER_DESC2()`




````cpp
void CD3D11_RASTERIZER_DESC2(  const D3D11_RASTERIZER_DESC2 & o)`




````cpp
void CD3D11_RASTERIZER_DESC2(  CD3D11_DEFAULT )`




````cpp
void CD3D11_RASTERIZER_DESC2(  D3D11_FILL_MODE                       fillMode,  D3D11_CULL_MODE                       cullMode,  BOOL                                  frontCounterClockwise,  INT                                   depthBias,  FLOAT                                 depthBiasClamp,  FLOAT                                 slopeScaledDepthBias,  BOOL                                  depthClipEnable,  BOOL                                  scissorEnable,  BOOL                                  multisampleEnable,  BOOL                                  antialiasedLineEnable,  UINT                                  forcedSampleCount,  D3D11_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster)`




````cpp
void ~CD3D11_RASTERIZER_DESC2()`




````cpp
void operator const D3D11_RASTERIZER_DESC2&()`




## Remarks
Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call <a href="https://docs.microsoft.com/windows/desktop/api/d3d11_3/nf-d3d11_3-id3d11device3-createrasterizerstate2">ID3D11Device3::CreateRasterizerState2</a>. To set rasterizer state, call <a href="https://docs.microsoft.com/windows/desktop/api/d3d11/nf-d3d11-id3d11devicecontext-rssetstate">ID3D11DeviceContext::RSSetState</a>.

If you do not specify some rasterizer state,  the Direct3D runtime uses the following default values for rasterizer state.

<table>
<tr>
<th>State</th>
<th>Default Value</th>
</tr>
<tr>
<td><b>FillMode</b></td>
<td>Solid</td>
</tr>
<tr>
<td><b>CullMode</b></td>
<td>Back</td>
</tr>
<tr>
<td><b>FrontCounterClockwise</b></td>
<td><b>FALSE</b></td>
</tr>
<tr>
<td><b>DepthBias</b></td>
<td>0</td>
</tr>
<tr>
<td><b>SlopeScaledDepthBias</b></td>
<td>0.0f</td>
</tr>
<tr>
<td><b>DepthBiasClamp</b></td>
<td>0.0f</td>
</tr>
<tr>
<td><b>DepthClipEnable</b></td>
<td><b>TRUE</b></td>
</tr>
<tr>
<td><b>ScissorEnable</b></td>
<td><b>FALSE</b></td>
</tr>
<tr>
<td><b>MultisampleEnable</b></td>
<td><b>FALSE</b></td>
</tr>
<tr>
<td><b>AntialiasedLineEnable</b></td>
<td><b>FALSE</b></td>
</tr>
<tr>
<td><b>ForcedSampleCount</b></td>
<td>0</td>
</tr>
<tr>
<td><b>ConservativeRaster</b></td>
<td><b>D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF</b></td>
</tr>
</table>
 

<div class="alert"><b>Note</b>  For <a href="https://docs.microsoft.com/windows/desktop/direct3d11/overviews-direct3d-11-devices-downlevel-intro">feature levels</a> 9.1, 9.2, 9.3, and 10.0, if you set <b>MultisampleEnable</b> to <b>FALSE</b>, the runtime renders all points, lines, and triangles without anti-aliasing even for render targets with a sample count greater than 1. For feature levels 10.1 and higher, the setting of <b>MultisampleEnable</b> has no effect on points and triangles with regard to MSAA and impacts only the selection of the line-rendering algorithm as shown in this table:</div>
<div> </div>

<table>
<tr>
<th>Line-rendering algorithm</th>
<th><b>MultisampleEnable</b></th>
<th><b>AntialiasedLineEnable</b></th>
</tr>
<tr>
<td>Aliased</td>
<td><b>FALSE</b></td>
<td><b>FALSE</b></td>
</tr>
<tr>
<td>Alpha antialiased</td>
<td><b>FALSE</b></td>
<td><b>TRUE</b></td>
</tr>
<tr>
<td>Quadrilateral</td>
<td><b>TRUE</b></td>
<td><b>FALSE</b></td>
</tr>
<tr>
<td>Quadrilateral</td>
<td><b>TRUE</b></td>
<td><b>TRUE</b></td>
</tr>
</table>
 



The settings of the <b>MultisampleEnable</b> and <b>AntialiasedLineEnable</b> members apply only to multisample antialiasing (MSAA) render targets (that is, render targets with sample counts greater than 1). Because of the differences in <a href="https://docs.microsoft.com/windows/desktop/direct3d11/overviews-direct3d-11-devices-downlevel-intro">feature-level</a> behavior and as long as you aren’t performing any line drawing or don’t mind that lines render as quadrilaterals, we recommend that you always set <b>MultisampleEnable</b> to <b>TRUE</b> whenever you render on MSAA render targets.


## Requirements
| &nbsp; | &nbsp; |
| ---- |:---- |
| **Header** | d3d11_3.h |

## See Also

<a href="https://docs.microsoft.com/windows/desktop/direct3d11/d3d11-graphics-reference-d3d11-core-structures">Core Structures</a>