D3D11_STENCIL_OP Enumeration

The stencil operations that can be performed during depth-stencil testing.

Syntax

typedef enum D3D11_STENCIL_OP
{
    D3D11_STENCIL_OP_KEEP = 1,
    D3D11_STENCIL_OP_ZERO = 2,
    D3D11_STENCIL_OP_REPLACE = 3,
    D3D11_STENCIL_OP_INCR_SAT = 4,
    D3D11_STENCIL_OP_DECR_SAT = 5,
    D3D11_STENCIL_OP_INVERT = 6,
    D3D11_STENCIL_OP_INCR = 7,
    D3D11_STENCIL_OP_DECR = 8,
    D3D11_STENCIL_OP_ONE = 9,
    D3D11_STENCIL_OP_REPLACE_OP = 10,
    D3D11_STENCIL_OP_AND = 11,
    D3D11_STENCIL_OP_OR = 12,
    D3D11_STENCIL_OP_XOR = 13,
    D3D11_STENCIL_OP_NAND = 14,
    D3D11_STENCIL_OP_NOR = 15,
    D3D11_STENCIL_OP_XNOR = 16
} D3D11_STENCIL_OP;  

Constants

Constant Description
D3D11_STENCIL_OP_KEEP Keep the existing stencil data.
D3D11_STENCIL_OP_ZERO Set the stencil data to 0.
D3D11_STENCIL_OP_REPLACE Set the stencil data to the reference value set by calling ID3D11DeviceContext::OMSetDepthStencilState.
D3D11_STENCIL_OP_INCR_SAT Increment the stencil value by 1, and clamp the result.
D3D11_STENCIL_OP_DECR_SAT Decrement the stencil value by 1, and clamp the result.
D3D11_STENCIL_OP_INVERT Invert the stencil data.
D3D11_STENCIL_OP_INCR Increment the stencil value by 1, and wrap the result if necessary.
D3D11_STENCIL_OP_DECR Decrement the stencil value by 1, and wrap the result if necessary.
D3D11_STENCIL_OP_ONE One. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_REPLACE_OP Replace operation. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_AND AND. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_OR OR. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_XOR XOR. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_NAND NAND. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_NOR NOR. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.
D3D11_STENCIL_OP_XNOR XNOR. This is a D3D11X extension; only D3D11X (Xbox-specific) APIs accept this value.

Requirements

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

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).