<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderCommandEncoder/setCullMode(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLRenderCommandEncoder(im)setCullMode:"
  },
  "title" : "setCullMode(_:)"
}
-->

# setCullMode(_:)

Configures how the render pipeline determines which primitives to remove.

```
func setCullMode(_ cullMode: MTLCullMode)
```

## Parameters

`cullMode`

An [`MTLCullMode`](/documentation/Metal/MTLCullMode) value that configures how the render pipeline determines which primitives to remove from the pipeline.

## Discussion

This method configures which primitives the render pipeline removes, if any, based on the direction of each primitive’s face relative to the scene’s camera. For example, you can correctly cull hidden surfaces on some geometric models, such as a sphere made of filled triangles, if it uses orientable surfaces. A surface is *orientable* if its primitives consistently use the same ordering for its vertices. Metal defines vertex ordering with the [`MTLWinding`](/documentation/Metal/MTLWinding) type, which includes [`MTLWinding.clockwise`](/documentation/Metal/MTLWinding/clockwise) and [`MTLWinding.counterClockwise`](/documentation/Metal/MTLWinding/counterClockwise). You can tell the render pipeline which direction your primitives face by calling the [`setFrontFacing(_:)`](/documentation/Metal/MTLRenderCommandEncoder/setFrontFacing(_:)) method, which affects the primitives the culling mode removes.

The render pass’s default culling mode is [`MTLCullMode.none`](/documentation/Metal/MTLCullMode/none).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)