Skip to content

cf_draw_elements_instanced

Category: graphics
GitHub: cute_graphics.h


Draws the last applied mesh instance_count times in one call, with no per-instance vertex buffer.

void cf_draw_elements_instanced(int instance_count);
Parameters Description
instance_count The number of instances to draw.

Remarks

The shader distinguishes instances with gl_InstanceIndex, typically indexing into a storage buffer bound via cf_apply_vs_storage_buffers -- the pull-style alternative to cf_mesh_set_instance_buffer's per-instance vertex attributes.

cf_draw_elements
cf_apply_vs_storage_buffers
cf_mesh_set_instance_buffer