# BatchDrawCommandIndirect

> Represents an indirect draw command for a BatchRendererGroup.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public struct BatchDrawCommandIndirect
```

## Remarks

This type of draw command has a reference to both a material and a mesh. The actual draw data to be used is passed by the GPU in the buffer set up as the [BatchDrawCommandIndirect.indirectArgsBufferHandle](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/indirectargsbufferhandle.md).

## Fields

| Value                                                                                                                                                            | Description                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [batchID](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/batchid.md)                                                             | The batch ID that this draw command uses. Determines the metadata values that are available to a shader.                                                                                                                                      |
| [flags](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/flags.md)                                                                 | Specifies rendering options for the draw command.                                                                                                                                                                                             |
| [indirectArgsBufferHandle](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/indirectargsbufferhandle.md)                           | [GraphicsBufferHandle](/engine/6000.7/script-reference/unityengine/graphicsbufferhandle.md) of the [GraphicsBuffer](/engine/6000.7/script-reference/unityengine/graphicsbuffer.md) from which the indirect draw command will be read.         |
| [indirectArgsBufferOffset](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/indirectargsbufferoffset.md)                           | Offset in bytes from which the indirect draw command will be read.                                                                                                                                                                            |
| [lightmapIndex](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/lightmapindex.md)                                                 | The index of the baked lightmap used in this draw command. If lightmap texture arrays are enabled, this value is always -1 (0xFFFF).                                                                                                          |
| [materialID](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/materialid.md)                                                       | Identifies which [Material](/engine/6000.7/script-reference/unityengine/material.md) to use to render the instances in this draw command.                                                                                                     |
| [meshID](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/meshid.md)                                                               | Identifies which [Mesh](/engine/6000.7/script-reference/unityengine/mesh.md) to use to render the instances in this draw command.                                                                                                             |
| [sortingPosition](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/sortingposition.md)                                             | Together with [BatchDrawCommand.flags](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommand/flags.md), this specifies how to depth sort the instances in this draw command.                                                 |
| [splitVisibilityMask](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/splitvisibilitymask.md)                                     | Indicates which splits that the draw command is visible in.                                                                                                                                                                                   |
| [topology](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/topology.md)                                                           | The primitive topology to use when executing the draw command.                                                                                                                                                                                |
| [visibleInstancesBufferHandle](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/visibleinstancesbufferhandle.md)                   | Handle of the [GraphicsBuffer](/engine/6000.7/script-reference/unityengine/graphicsbuffer.md) from which the draw command will read visible instance index.                                                                                   |
| [visibleInstancesBufferWindowOffset](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/visibleinstancesbufferwindowoffset.md)       | Offset of the visible instances buffer that will be bound as element zero.                                                                                                                                                                    |
| [visibleInstancesBufferWindowSizeBytes](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/visibleinstancesbufferwindowsizebytes.md) | Amount of data in the buffer to be bound, starting from the visibleInstancesBufferWindowOffset value.                                                                                                                                         |
| [visibleOffset](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandindirect/visibleoffset.md)                                                 | The index of the element in [BatchCullingOutputDrawCommands.visibleInstances](/engine/6000.7/script-reference/unityengine/rendering/batchcullingoutputdrawcommands/visibleinstances.md) that matches the first instance in this draw command. |
