Instance Property

clearColor

The color to use when the color render target is cleared.

Declaration

var clearColor: MTLClearColor { 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 clearColor property. Otherwise, clearColor is ignored.

The clearColor property represents a set of RGBA components. The default value is (0.0, 0.0, 0.0, 1.0) (black). Use the MTLClearColorMake(_:_:_:_:) function to construct a MTLClearColor value.