cf_gpu_submit¶
Category: graphics
GitHub: cute_graphics.h
Sends the GPU work recorded so far to the GPU now, without waiting for it to finish.
Remarks¶
This is cf_gpu_sync without the wait. On SDL_GPU it submits the current command buffer and continues
recording in a new one; on WebGPU it submits the command encoder; on GLES it is glFlush.
It ends the current render pass. The canvas stays applied, and the next draw resumes the pass, keeping everything drawn before the submit. Call it between draws, not between cf_apply_shader and its draw: apply the shader (and any viewport or scissor) again afterwards.
Use it for scheduling, such as starting heavy compute or uploads early, or splitting a frame into
separately timed chunks for profiling. It does not speed up an ordinary frame, and calling it often can
make a frame slower. It only sends recorded GPU commands; queued cf_draw_* calls are recorded by
cf_render_to or cf_app_draw_onto_screen.