Diligent::StencilOpDesc struct

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

Contents

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.

Public functions

auto operator==(const StencilOpDesc& rhs) const -> bool
Tests if two structures are equivalent.

Public variables

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

Function documentation

bool Diligent::StencilOpDesc::operator==(const StencilOpDesc& rhs) const

Tests if two structures are equivalent.

Parameters
rhs in - reference to the structure to perform comparison with
Returns
  • True if all members of the two structures are equal.
  • False otherwise