Diligent Engine API Reference
Public Member Functions | Public Attributes | List of all members
Diligent::DepthStencilStateDesc Struct Reference

Depth stencil state description. More...

Public Member Functions

 DepthStencilStateDesc ()
 Initializes the structure members with default values. More...
 
bool operator== (const DepthStencilStateDesc &rhs) const
 Tests if two structures are equivalent. More...
 

Public Attributes

Bool DepthEnable
 Enable depth-stencil operations. When it is set to False, depth test always passes, depth writes are disabled, and no stencil operations are performed.
 
Bool DepthWriteEnable
 Enable or disable writes to a depth buffer.
 
COMPARISON_FUNCTION DepthFunc
 A function that compares depth data against existing depth data. See Diligent::COMPARISON_FUNCTION for details.
 
Bool StencilEnable
 Enable stencil opertaions.
 
Uint8 StencilReadMask
 Identify which bits of the depth-stencil buffer are accessed when reading stencil data.
 
Uint8 StencilWriteMask
 Identify which bits of the depth-stencil buffer are accessed when writing stencil data.
 
StencilOpDesc FrontFace
 Identify stencil operations for the front-facing triangles, see Diligent::StencilOpDesc.
 
StencilOpDesc BackFace
 Identify stencil operations for the back-facing triangles, see Diligent::StencilOpDesc.
 

Detailed Description

Depth stencil state description.

This structure describes the depth stencil state and is part of the GraphicsPipelineDesc. The structure generally mirrors D3D11_DEPTH_STENCIL_DESC/D3D12_DEPTH_STENCIL_DESC structure.

Constructor & Destructor Documentation

Diligent::DepthStencilStateDesc::DepthStencilStateDesc ( )
inline

Initializes the structure members with default values.

Default values:

Member Default value
DepthEnable True
DepthWriteEnable True
DepthFunc Diligent::COMPARISON_FUNC_LESS
StencilEnable False
StencilReadMask 0xFF
StencilWriteMask 0xFF

Members of FrontFace and BackFace are initialized by StencilOpDesc::StencilOpDesc()

Member Function Documentation

bool Diligent::DepthStencilStateDesc::operator== ( const DepthStencilStateDesc 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