Enumeration

MTLStencilOperation

The operation performed on a currently stored stencil value when a comparison test passes or fails.

Declaration

enum MTLStencilOperation : UInt

Topics

Constants

case keep

Keep the current stencil value.

case zero

Set the stencil value to zero.

case replace

Replace the stencil value with the stencil reference value, which is set by the setStencilReferenceValue(_:) method of MTLRenderCommandEncoder.

case incrementClamp

If the current stencil value is not the maximum representable value, increase the stencil value by one. Otherwise, if the current stencil value is the maximum representable value, do not change the stencil value.

case decrementClamp

If the current stencil value is not zero, decrease the stencil value by one. Otherwise, if the current stencil value is zero, do not change the stencil value.

case invert

Perform a logical bitwise invert operation on the current stencil value.

case incrementWrap

If the current stencil value is not the maximum representable value, increase the stencil value by one. Otherwise, if the current stencil value is the maximum representable value, set the stencil value to zero.

case decrementWrap

If the current stencil value is not zero, decrease the stencil value by one. Otherwise, if the current stencil value is zero, set the stencil value to the maximum representable value.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software