Skip to content

CF_DrawIndirectArgs

Category: graphics
GitHub: cute_graphics.h


One non-indexed indirect draw's arguments, as laid out in the args buffer.

Struct Members Description
uint32_t vertex_count Vertices to draw per instance.
uint32_t instance_count Instances to draw; the shader sees gl_InstanceIndex.
uint32_t first_vertex Index of the first vertex.
uint32_t first_instance First instance ID. Keep 0 for portability.

Remarks

Write these into a storage buffer (from the CPU or a compute shader) and draw with cf_draw_elements_indirect. The layout is the GPU-native indirect command layout.

CF_DrawIndexedIndirectArgs
cf_draw_elements_indirect
CF_StorageBuffer