#pragma once #include "sokol_gfx.h" #include "utils.h" enum atlas_error_e : u8 { ATLAS_ERROR_NONE = 0, ATLAS_ERROR_GPU_ATLAS, ATLAS_ERROR_ATLAS_FULL, ATLAS_ERROR_UPLOAD_FAILED, }; struct atlas_s { u32 width, height; enum sg_pixel_format format; struct sg_image gpu_atlas; u8* cpu_atlas; bool cpu_dirty; }; enum atlas_error_e wayc_atlas_init(struct atlas_s* atlas, u32 width, u32 height, enum sg_pixel_format format); enum atlas_error_e wayc_atlas_flush(struct atlas_s* atlas); void wayc_atlas_deinit(struct atlas_s* atlas);