---
title: MTLIndirectRenderCommand
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlindirectrendercommand
---

# MTLIndirectRenderCommand

A render command in an indirect command buffer.

## Declaration

```swift
protocol MTLIndirectRenderCommand : NSObjectProtocol
```

## Overview

Overview Don’t implement this protocol; you get instances of this type by asking an MTLIndirectCommandBuffer for them. Use this instance to reset or encode a command. You need to reset a command before encoding a new command.

## Topics

### Setting command arguments

- [setRenderPipelineState(_:)](metal/mtlindirectrendercommand/setrenderpipelinestate(_:).md)
- [setVertexBuffer(_:offset:at:)](metal/mtlindirectrendercommand/setvertexbuffer(_:offset:at:).md)
- [setFragmentBuffer(_:offset:at:)](metal/mtlindirectrendercommand/setfragmentbuffer(_:offset:at:).md)

### Encoding a drawing command

- [drawPrimitives(_:vertexStart:vertexCount:instanceCount:baseInstance:)](metal/mtlindirectrendercommand/drawprimitives(_:vertexstart:vertexcount:instancecount:baseinstance:).md)
- [drawIndexedPrimitives(_:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:)](metal/mtlindirectrendercommand/drawindexedprimitives(_:indexcount:indextype:indexbuffer:indexbufferoffset:instancecount:basevertex:baseinstance:).md)
- [drawPatches(_:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:)](metal/mtlindirectrendercommand/drawpatches(_:patchstart:patchcount:patchindexbuffer:patchindexbufferoffset:instancecount:baseinstance:tessellationfactorbuffer:tessellationfactorbufferoffset:tessellationfactorbufferinstancestride:).md)
- [drawIndexedPatches(_:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:)](metal/mtlindirectrendercommand/drawindexedpatches(_:patchstart:patchcount:patchindexbuffer:patchindexbufferoffset:controlpointindexbuffer:controlpointindexbufferoffset:instancecount:baseinstance:tessellationfactorbuffer:tessellationfactorbufferoffset:tessellationfactorbu-4mdz8.md)

### Resetting a command

- [reset()](metal/mtlindirectrendercommand/reset().md)

### Instance Methods

- [clearBarrier()](metal/mtlindirectrendercommand/clearbarrier().md)
- [drawMeshThreadgroups(_:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)](metal/mtlindirectrendercommand/drawmeshthreadgroups(_:threadsperobjectthreadgroup:threadspermeshthreadgroup:).md)
- [drawMeshThreads(_:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)](metal/mtlindirectrendercommand/drawmeshthreads(_:threadsperobjectthreadgroup:threadspermeshthreadgroup:).md)
- [setBarrier()](metal/mtlindirectrendercommand/setbarrier().md)
- [setCullMode(_:)](metal/mtlindirectrendercommand/setcullmode(_:).md)
- [setDepthBias(_:slopeScale:clamp:)](metal/mtlindirectrendercommand/setdepthbias(_:slopescale:clamp:).md)
- [setDepthClipMode(_:)](metal/mtlindirectrendercommand/setdepthclipmode(_:).md)
- [setDepthStencilState(_:)](metal/mtlindirectrendercommand/setdepthstencilstate(_:).md)
- [setFrontFacing(_:)](metal/mtlindirectrendercommand/setfrontfacing(_:).md)
- [setMeshBuffer(_:offset:at:)](metal/mtlindirectrendercommand/setmeshbuffer(_:offset:at:).md)
- [setObjectBuffer(_:offset:at:)](metal/mtlindirectrendercommand/setobjectbuffer(_:offset:at:).md)
- [setObjectThreadgroupMemoryLength(_:index:)](metal/mtlindirectrendercommand/setobjectthreadgroupmemorylength(_:index:).md)
- [setTriangleFillMode(_:)](metal/mtlindirectrendercommand/settrianglefillmode(_:).md)
- [setVertexBuffer(_:offset:attributeStride:at:)](metal/mtlindirectrendercommand/setvertexbuffer(_:offset:attributestride:at:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Render compute commands

- [MTLDrawPatchIndirectArguments](metal/mtldrawpatchindirectarguments.md)
- [MTLDrawPrimitivesIndirectArguments](metal/mtldrawprimitivesindirectarguments.md)
- [MTLDrawIndexedPrimitivesIndirectArguments](metal/mtldrawindexedprimitivesindirectarguments.md)
