DrawIndirectArgs

sg_draw_indirect_args sg_draw_indirect_indexed_args sg_dispatch_indirect_args

These are reference structs which define the layout of indirect draw and dispatch arguments in indirect buffers. The struct members have the same meaning as the same-named arguments of sg_draw_ex() and sg_dispatch():

Members

Variables

base_element
uint base_element;
Undocumented in source.
base_instance
uint base_instance;
Undocumented in source.
num_elements
uint num_elements;
Undocumented in source.
num_instances
uint num_instances;
Undocumented in source.

Detailed Description

sg draw indirect args

for non-indexed draws (16 bytes) .num_elements: number of vertices .num_instances: number of instances .base_element: first vertex .base_instance: first instance

sg draw indirect indexed args

for indexed draws (20 bytes) .num_elements: number of indices .num_instances: number of instances .base_element: first index in the index buffer .base_vertex: signed value added to each index .base_instance: first instance

sg dispatch indirect args

for dispatches (12 bytes) .num_groups_x/y/z: number of workgroups

The pipeline's index type selects the indexed or non-indexed draw layout.

For details and caveats of indirect draw and dispatch see the documentation section ON INDIRECT DRAW AND DISPATCH!

Meta