From a0a68b7b3a5430fea5aaa2ad1da75fdda5cd5c7a Mon Sep 17 00:00:00 2001 From: Fabrice Date: Wed, 11 Feb 2026 22:50:21 +0100 Subject: packing corrections --- src/rendering.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/rendering.h') diff --git a/src/rendering.h b/src/rendering.h index 98f70ce..f8db68e 100644 --- a/src/rendering.h +++ b/src/rendering.h @@ -67,3 +67,15 @@ void wayc_atlas_use(atlas_s* atlas, u32 slot); bool wayc_atlas_set(atlas_s* atlas, image_data_type_e data_type, ivec2 offset, u32 width, u32 height, i32 alignment, const u8* data); void wayc_atlas_deinit(atlas_s* atlas); + +struct atlas_packer_s { + struct atlas_s* atlas; + u32 row_height; + ivec2 cursor; +}; + +#define WAYC_ATLAS_PACKER_INIT(atlas) \ + atlas_packer_s { atlas, 0, {0, 0} } + +bool wayc_atlas_packer_allocate(struct atlas_packer_s* packer, u32 width, + u32 height, ivec2 out); -- cgit v1.2.3