Instance Method


Sets the current render pipeline state object.



func setRenderPipelineState(_ pipelineState: MTLRenderPipelineState)



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


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.


enum MTLTriangleFillMode

Specifies how to rasterize triangle and triangle strip primitives.

func setFrontFacing(MTLWinding)

Sets the winding order of front-facing primitives.


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.


enum MTLCullMode

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