Instance Method

setCullMode(_:)

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

Required.

Declaration

func setCullMode(_ cullMode: MTLCullMode)

Parameters

cullMode

The mode for determining whether to cull primitives.

Discussion

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.

Required.

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.

enum MTLCullMode

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