---
title: "indirectRenderCommandAt(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlindirectcommandbuffer/indirectrendercommandat(_:)"
---

# indirectRenderCommandAt(_:)

Gets the render command at the given index.

## Declaration

```swift
func indirectRenderCommandAt(_ commandIndex: Int) -> any MTLIndirectRenderCommand
```

## Parameters

- `commandIndex`: The index of the command to retrieve.

## Discussion

Discussion Call this method only if the indirect command buffer contains rendering commands.

## See Also

### Retrieving commands

- [indirectComputeCommandAt(_:)](metal/mtlindirectcommandbuffer/indirectcomputecommandat(_:).md)
- [indirectComputeCommand(at:)](metal/mtlindirectcommandbuffer/indirectcomputecommand(at:).md)
