D3D11_DEPTH_STENCILOP_DESC Structure

Stencil operations that can be performed based on the results of stencil test.

Syntax

typedef struct D3D11_DEPTH_STENCILOP_DESC {
    D3D11_STENCIL_OP StencilFailOp;
    D3D11_STENCIL_OP StencilDepthFailOp;
    D3D11_STENCIL_OP StencilPassOp;
    D3D11_COMPARISON_FUNC StencilFunc;
} D3D11_DEPTH_STENCILOP_DESC;  

Members

StencilFailOp
The stencil operation to perform when stencil testing fails.

StencilDepthFailOp
The stencil operation to perform when stencil testing passes and depth testing fails.

StencilPassOp
The stencil operation to perform when stencil testing and depth testing both pass.

StencilFunc
A function that compares stencil data against existing stencil data. The function options are listed in D3D11_COMPARISON_FUNC.

Remarks

All stencil operations are specified as a D3D11_STENCIL_OP. The stencil operation can be set differently based on the outcome of the stencil test (which is referred to as StencilFunc in the stencil test portion of depth-stencil testing.

This structure is a member of a depth-stencil description.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).