SDL_GPUIndexedIndirectDrawCommand Struct Reference

`#include <SDL_gpu.h>`

## Data Fields

Uint32 | num_indices
Uint32 | num_instances
Uint32 | first_index
Sint32 | vertex_offset
Uint32 | first_instance

## Detailed Description

A structure specifying the parameters of an indexed indirect draw command.

Note that the `first_vertex` and `first_instance` parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Since
  This struct is available since SDL 3.2.0.

See also
  SDL_DrawGPUIndexedPrimitivesIndirect

Definition at line 1471 of file SDL_gpu.h.

## Field Documentation

## first_index

Uint32 SDL_GPUIndexedIndirectDrawCommand::first_index

The base index within the index buffer.

Definition at line 1475 of file SDL_gpu.h.

## first_instance

Uint32 SDL_GPUIndexedIndirectDrawCommand::first_instance

The ID of the first instance to draw.

Definition at line 1477 of file SDL_gpu.h.

## num_indices

Uint32 SDL_GPUIndexedIndirectDrawCommand::num_indices

The number of indices to draw per instance.

Definition at line 1473 of file SDL_gpu.h.

## num_instances

Uint32 SDL_GPUIndexedIndirectDrawCommand::num_instances

The number of instances to draw.

Definition at line 1474 of file SDL_gpu.h.

## vertex_offset

Sint32 SDL_GPUIndexedIndirectDrawCommand::vertex_offset

The value added to the vertex index before indexing into the vertex buffer.

Definition at line 1476 of file SDL_gpu.h.

The documentation for this struct was generated from the following file:

- SDL_gpu.h