Class description A stencil-mode is specified as part of the stencil-state to define the interaction between an incoming fragment and the stencil buffer.
•
The value slot contains an integer value that is used as the reference value for the comparison of the stencil test.
•
The mask slot contains an integer mask value that indicates which bits are relevant to the stencil test.
•
The comparison slot contains a comparison value that indicates the comparison taken between the masked reference value and stored stencil buffer value to determine whether the fragment is allowed to pass.
•
The stencil-fail-op, depth-fail-op, and depth-pass-op slots all contain stencil-op values that determine how the value in the stencil buffer is affected when the stencil test fails, the stencil test succeeds but depth test fails, and both stencil and depth tests succeed, respectively.
•
op-keep leaves the stencil buffer value unchanged.