diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-11 22:50:21 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-11 22:50:21 +0100 |
| commit | a0a68b7b3a5430fea5aaa2ad1da75fdda5cd5c7a (patch) | |
| tree | f30c9d90ce0d864dc65cb1307a7196b80e63d71c /src/rendering.h | |
| parent | 64b0664a648ec4a6c424e932b605f09dc4ee6151 (diff) | |
packing corrections
Diffstat (limited to 'src/rendering.h')
| -rw-r--r-- | src/rendering.h | 12 |
1 files changed, 12 insertions, 0 deletions
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); |
