<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderCommandEncoder/setMeshTextures(_:range:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So23MTLRenderCommandEncoderP5MetalE15setMeshTextures_5rangeySaySo10MTLTexture_pSgG_SnySiGtF"
  },
  "title" : "setMeshTextures(_:range:)"
}
-->

# setMeshTextures(_:range:)

Assigns multiple textures to a range of entries in the mesh shader argument table.

```
func setMeshTextures(_ textures: [(any MTLTexture)?], range: Range<Int>)
```

## Parameters

`textures`

An array of [`MTLTexture`](/documentation/Metal/MTLTexture) instances the command assigns to entries in the mesh shader argument table for textures.

`range`

A span of integers that represent the entries in the mesh shader argument table for textures. Each entry stores a record of the corresponding element in `textures`.

## Discussion

By default, the texture at each index is `nil`.

> Note:
> The Objective-C version of this method is ``doc://com.apple.metal/documentation/Metal/MTLRenderCommandEncoder/setMeshTextures:withRange:``.

---

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)