---
title: "setTexture(_:at:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowlevelargumenttable/settexture(_:at:)"
---

# setTexture(_:at:)

Binds a texture to the slot at the given index.

## Declaration

```swift
final func setTexture(_ texture: LowLevelTextureResource, at index: Int) throws(LowLevelRenderContextError)
```

## Parameters

- `texture`: The texture resource to bind to the slot.
- `index`: The slot index within the argument table’s texture array.

## Discussion

Discussion note: LowLevelRenderContextError if index is out of range or texture is incompatible with the slot.

## See Also

### Accessing textures

- [texture(at:)](realitykit/lowlevelargumenttable/texture(at:).md)
