Instance Method


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



func setCullMode(_ cullMode: MTLCullMode)



The mode for determining whether to cull primitives.


Use culling for hidden surface removal on some geometric models, such as an orientable sphere rendered with filled triangles. (A surface is orientable if its primitives are consistently specified in either clockwise or counter-clockwise order.)

The default value is MTLCullMode.none.

See Also

Setting Graphics Rendering Behavior

func setRenderPipelineState(MTLRenderPipelineState)

Sets the current render pipeline state object.


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.

enum MTLCullMode

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

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