SDL_GPUIndirectDrawCommand Struct Reference

`#include <SDL_gpu.h>`

## Data Fields

Uint32 | num_vertices
Uint32 | num_instances
Uint32 | first_vertex
Uint32 | first_instance

## Detailed Description

A structure specifying the parameters of an 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_DrawGPUPrimitivesIndirect

Definition at line 1449 of file SDL_gpu.h.

## Field Documentation

## first_instance

Uint32 SDL_GPUIndirectDrawCommand::first_instance

The ID of the first instance to draw.

Definition at line 1454 of file SDL_gpu.h.

## first_vertex

Uint32 SDL_GPUIndirectDrawCommand::first_vertex

The index of the first vertex to draw.

Definition at line 1453 of file SDL_gpu.h.

## num_instances

Uint32 SDL_GPUIndirectDrawCommand::num_instances

The number of instances to draw.

Definition at line 1452 of file SDL_gpu.h.

## num_vertices

Uint32 SDL_GPUIndirectDrawCommand::num_vertices

The number of vertices to draw.

Definition at line 1451 of file SDL_gpu.h.

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

- SDL_gpu.h