---
title: "setTextures(_:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlcomputecommandencoder/settextures(_:range:)"
---

# setTextures(_:range:)

Binds multiple textures to the texture argument table, allowing compute functions to access their data on the GPU.

## Declaration

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

## Parameters

- `textures`: A list of doc://com.apple.metal/documentation/Metal/MTLTexture instances to bind to the texture argument table.
- `range`: The texture table indices to bind each of the textures to, in the order they appear.

## Discussion

Discussion important: This method requires that the number of instances in textures be the same as the length of range.

## See Also

### Binding textures

- [setTexture(_:index:)](metal/mtlcomputecommandencoder/settexture(_:index:).md)
