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

Describes stencil operations that are performed based on the results of depth test. More...

Public Member Functions

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

Public Attributes

STENCIL_OP StencilFailOp
 The stencil operation to perform when stencil testing fails.
 
STENCIL_OP StencilDepthFailOp
 The stencil operation to perform when stencil testing passes and depth testing fails.
 
STENCIL_OP StencilPassOp
 The stencil operation to perform when stencil testing and depth testing both pass.
 
COMPARISON_FUNCTION StencilFunc
 A function that compares stencil data against existing stencil data. See Diligent::COMPARISON_FUNCTION.
 

Detailed Description

Describes stencil operations that are performed based on the results of depth test.

The structure generally mirrors D3D11_DEPTH_STENCILOP_DESC/D3D12_DEPTH_STENCILOP_DESC structure. It is used by Diligent::DepthStencilStateDesc structure to describe the stencil operations for the front and back facing polygons.

Constructor & Destructor Documentation

◆ StencilOpDesc()

Diligent::StencilOpDesc::StencilOpDesc ( )
inline

Initializes the structure members with default values.

Default values:

Member Default value
StencilFailOp Diligent::STENCIL_OP_KEEP
StencilDepthFailOp Diligent::STENCIL_OP_KEEP
StencilPassOp Diligent::STENCIL_OP_KEEP
StencilFunc Diligent::COMPARISON_FUNC_ALWAYS

Member Function Documentation

◆ operator==()

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