CONST_D3DSTENCILOP
Defines constants that define stencil operations.
Enum CONST_D3DSTENCILOP
    D3DSTENCILOP_KEEP    = 1
    D3DSTENCILOP_ZERO    = 2
    D3DSTENCILOP_REPLACE = 3
    D3DSTENCILOP_INCRSAT = 4
    D3DSTENCILOP_DECRSAT = 5
    D3DSTENCILOP_INVERT  = 6
    D3DSTENCILOP_INCR    = 7
    D3DSTENCILOP_DECR    = 8
End Enum
Constants
- D3DSTENCILOP_KEEP
- Do not update the entry in the stencil buffer. This is the default value.
- D3DSTENCILOP_ZERO
- Set the stencil-buffer entry to zero.
- D3DSTENCILOP_REPLACE
- Replace the stencil-buffer entry with reference value.
- D3DSTENCILOP_INCRSAT
- Increment the stencil-buffer entry, clamping to the maximum value. See Remarks for information on the maximum stencil-buffer values.
- D3DSTENCILOP_DECRSAT
- Decrement the stencil-buffer entry, clamping to zero.
- D3DSTENCILOP_INVERT
- Invert the bits in the stencil-buffer entry. 
- D3DSTENCILOP_INCR
- Increment the stencil-buffer entry, wrapping to zero if the new value exceeds the maximum value. See Remarks for information on the maximum stencil-buffer values.
- D3DSTENCILOP_DECR
- Decrement the stencil-buffer entry, wrapping to the maximum value if the new value is less than zero.
Remarks
Stencil-buffer entries are integer values ranging inclusively from 0 to 2n -1, where n is the bit depth of the stencil buffer.
These flags are used to set the value of the D3DRS_STENCILFAIL, D3DRS_STENCILZFAIL, and D3DRS_STENCILPASS render states for the CONST_D3DRENDERSTATETYPE enumeration.
See Also
CONST_D3DRENDERSTATETYPE