Skip to content

cf_readback_data

Category: graphics
GitHub: cute_graphics.h


Copies readback pixel data into the provided buffer.

int cf_readback_data(CF_Readback readback, void* data, int size);
Parameters Description
readback The readback handle.
data Pointer to the destination buffer.
size Size of the destination buffer in bytes.

Return Value

Returns the number of bytes copied, or 0 if the readback is not yet ready. Copies min(size, total) bytes.

Remarks

Pixel format matches the canvas target format (typically RGBA8, 4 bytes per pixel).

CF_Readback
cf_canvas_readback
cf_readback_ready
cf_readback_size
cf_destroy_readback