---
title: "setMeshBuffers(_:offsets:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrendercommandencoder/setmeshbuffers(_:offsets:range:)"
---

# setMeshBuffers(_:offsets:range:)

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

## Declaration

```swift
func setMeshBuffers(_ buffers: [(any MTLBuffer)?], offsets: [Int], range: Range<Int>)
```

## Parameters

- `buffers`: An array of doc://com.apple.metal/documentation/Metal/MTLBuffer instances the command assigns to entries in the mesh shader argument table for buffers.
- `offsets`: An array of integers. Each element represents the location, in bytes, from the start of the corresponding doc://com.apple.metal/documentation/Metal/MTLBuffer element in buffers where the mesh shader argument data begins. See the https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf to check for offset alignment requirements for buffers in device and constant address space.
- `range`: A span of integers that represent the entries in the mesh shader argument table for buffers. Each entry stores a record of the corresponding element in buffers and offsets.

## Discussion

Discussion By default, the texture at each index is nil. note: The Objective-C version of this method is setMeshBuffers:offsets:withRange:.

## See Also

### Assigning buffers for mesh shaders

- [setMeshBuffer(_:offset:index:)](metal/mtlrendercommandencoder/setmeshbuffer(_:offset:index:).md)
- [setMeshBytes(_:length:index:)](metal/mtlrendercommandencoder/setmeshbytes(_:length:index:).md)
- [setMeshBufferOffset(_:index:)](metal/mtlrendercommandencoder/setmeshbufferoffset(_:index:).md)
