Skip to content

CF_AtlasSubImage

Category: draw
GitHub: cute_draw.h


Represents a single sub-image within an atlas, defined by a uv coordinate pair.

Struct Members Description
uint64_t image_id Must be a unique number for all sub-images across all atlases. You should start at 0 and increment for each unique id you need.
int w, h The width in height, in pixels, of the sub-image.
float minx, miny u coordinate in the premade atlas.
float maxx, maxy v coordinate in the premade atlas.

cf_make_premade_sprite
cf_register_premade_atlas