---
title: "setVisibleFunctionTable(_:index:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlargumentencoder/setvisiblefunctiontable(_:index:)"
---

# setVisibleFunctionTable(_:index:)

Encodes a reference to a visible-function table into the argument buffer.

## Declaration

```swift
func setVisibleFunctionTable(_ visibleFunctionTable: (any MTLVisibleFunctionTable)?, index: Int)
```

## Parameters

- `visibleFunctionTable`: A visible-function table the method encodes.
- `index`: The index of a visible-function table within the argument buffer. The value corresponds to either the index ID of a declaration in Metal Shading Language (MSL) or the doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor/index property of an doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor instance.

## See Also

### Encoding function tables

- [setIntersectionFunctionTable(_:index:)](metal/mtlargumentencoder/setintersectionfunctiontable(_:index:).md)
- [setIntersectionFunctionTables(_:range:)](metal/mtlargumentencoder/setintersectionfunctiontables(_:range:).md)
- [setVisibleFunctionTables(_:range:)](metal/mtlargumentencoder/setvisiblefunctiontables(_:range:).md)
