summaryrefslogtreecommitdiff
path: root/src/rendering.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rendering.h')
-rw-r--r--src/rendering.h12
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);