Instance Property

clearStencil

The stencil value to use when the stencil render target is cleared.

Declaration

var clearStencil: UInt32 { get set }

Discussion

If the loadAction property of the render target is set to MTLLoadAction.clear, then at the start of a render pass, the contents of the texture are filled with the value stored in the clearStencil property. Otherwise, clearStencil is ignored.

The default value is 0.

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