Diligent Engine API Reference: Diligent::RasterizerStateDesc Struct Reference

Diligent Engine API Reference

Public Member Functions | Public Attributes | List of all members
Diligent::RasterizerStateDesc Struct Reference

Rasterizer state description. More...

## Public Member Functions
| RasterizerStateDesc (FILL_MODE _FillMode=FILL_MODE_SOLID, CULL_MODE _CullMode=CULL_MODE_BACK, Bool _FrontCounterClockwise=False, Int32 _DepthBias=0, Float32 _DepthBiasClamp=0.f, Float32 _SlopeScaledDepthBias=0.f, Bool _DepthClipEnable=True, Bool _ScissorEnable=False, Bool _AntialiasedLineEnable=False)
| Initializes the structure members. More...
bool | operator== (const RasterizerStateDesc &RHS) const
| Tests if two structures are equivalent. More...

## Public Attributes
FILL_MODE | FillMode
| Determines traingle fill mode, see Diligent::FILL_MODE for details.
CULL_MODE | CullMode
| Determines traingle cull mode, see Diligent::CULL_MODE for details.
Bool | FrontCounterClockwise
| Determines if 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.
Int32 | DepthBias
| Constant value added to the depth of a given pixel.
Float32 | DepthBiasClamp
| Maximum depth bias of a pixel. More...
Float32 | SlopeScaledDepthBias
| Scalar that scales the given pixel's slope before adding to the pixel's depth.
Bool | DepthClipEnable
| Enable clipping based on distance. More...
Bool | ScissorEnable
| Enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Bool | AntialiasedLineEnable
| Specifies whether to enable line antialiasing.

## Detailed Description

Rasterizer state description.

This structure describes the rasterizer state and is part of the GraphicsPipelineDesc.

## Constructor & Destructor Documentation

## ◆ RasterizerStateDesc()

Diligent::RasterizerStateDesc::RasterizerStateDesc | ( | FILL_MODE | _FillMode = `FILL_MODE_SOLID`,
|  | CULL_MODE | _CullMode = `CULL_MODE_BACK`,
|  | Bool | _FrontCounterClockwise = `False`,
|  | Int32 | _DepthBias = `0`,
|  | Float32 | _DepthBiasClamp = `0.f`,
|  | Float32 | _SlopeScaledDepthBias = `0.f`,
|  | Bool | _DepthClipEnable = `True`,
|  | Bool | _ScissorEnable = `False`,
|  | Bool | _AntialiasedLineEnable = `False`
| ) |  |
| inline

Initializes the structure members.

Member | Default va
--- | ---
FillMode | FILL_MODE_SOLID
CullMode | CULL_MODE_BACK
FrontCounterClockwise | False
DepthBias | 0
DepthBiasClamp | 0.f
SlopeScaledDepthBias | 0.f
DepthClipEnable | True
ScissorEnable | False
AntialiasedLineEnable | False

## Member Function Documentation

## ◆ operator==()

bool Diligent::RasterizerStateDesc::operator== | ( | const RasterizerStateDesc & | RHS | ) | const
| inline

Tests if two structures are equivalent.

Parameters

  [in] | RHS | - reference to the structure to perform comparison with

Returns
  - True if all members of the two structures are equal.
  - False otherwise

## Member Data Documentation

## ◆ DepthBiasClamp

Float32 Diligent::RasterizerStateDesc::DepthBiasClamp

Maximum depth bias of a pixel.

Warning
  Depth bias clamp is not available in OpenGL

## ◆ DepthClipEnable

Bool Diligent::RasterizerStateDesc::DepthClipEnable

Enable clipping based on distance.

Warning
  On DirectX this only disables clipping against far clipping plane, while on OpenGL this disables clipping against both far and near clip planes.