cf_draw_elements_indirect¶
Category: graphics
GitHub: cute_graphics.h
Draws the applied mesh with arguments read from a GPU buffer instead of the CPU.
| Parameters | Description |
|---|---|
args |
A storage buffer created with indirect_drawable, holding |
| CF_DrawIndirectArgs (or CF_DrawIndexedIndirectArgs when the mesh | |
has an index buffer) at offset. |
|
offset |
Byte offset of the first draw's arguments within args. |
draw_count |
How many consecutive argument blocks to draw. |
Remarks¶
Call in place of cf_draw_elements, after cf_apply_shader. This closes the
GPU-driven loop: a compute shader culls, compacts, and writes counts into the args
buffer (compute_writable + indirect_drawable), and the draw consumes them with
no CPU readback. SDL_GPU backends only; not available on GLES3/web.
Related Pages¶
cf_draw_elements
CF_DrawIndirectArgs
CF_DrawIndexedIndirectArgs
cf_make_storage_buffer
cf_dispatch_compute