Instance Method

setRenderPipelineState(_:)

Sets the current render pipeline state object.

Required.

Declaration

func setRenderPipelineState(_ pipelineState: MTLRenderPipelineState)

Parameters

pipelineState

The rendering pipeline or tile shading state to use for future commands.

Discussion

The default render pipeline state is nil. You must set a render pipeline state before issuing any drawing or tile commands. The render pipeline state must be compatible with the attachment configuration specified by the render pass descriptor.

You can set the pipeline state multiple times during the lifetime of an encoder. For example, different models may have different data and a different set of rendering instructions. Changing the pipeline state object does not affect any commands encoded before the change.

See Also

Setting Graphics Rendering Behavior

func setTriangleFillMode(MTLTriangleFillMode)

Sets how to rasterize triangle and triangle strip primitives.

Required.

enum MTLTriangleFillMode

Specifies how to rasterize triangle and triangle strip primitives.

func setFrontFacing(MTLWinding)

Sets the winding order of front-facing primitives.

Required.

enum MTLWinding

The vertex winding rule that determines a front-facing primitive.

func setCullMode(MTLCullMode)

Specifies whether to cull primitives when front- or back-facing.

Required.

enum MTLCullMode

The mode that determines whether to perform culling and which type of primitive to cull.