diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-11 21:27:25 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-11 21:27:25 +0100 |
| commit | 600c704e09dc24ea259fc72c63287d07a0a4bd39 (patch) | |
| tree | 7c866dc5cedacbf176d4014f69bc0cdd1f098715 /src/rendering.h | |
| parent | f6a9ffd92b8470a32fb4ebd6342dea4b9539f586 (diff) | |
working on atlas
Diffstat (limited to 'src/rendering.h')
| -rw-r--r-- | src/rendering.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rendering.h b/src/rendering.h index 5896697..7609b8a 100644 --- a/src/rendering.h +++ b/src/rendering.h @@ -52,8 +52,13 @@ bool wayc_sampler_init(sampler_t* sampler, sample_filter_e filter, void wayc_sampler_use(sampler_t sampler, u32 slot); void wayc_sampler_deinit(sampler_t* sampler); -typedef texture_t atlas_t; +struct atlas_s { + texture_t texture; + sampler_t sampler; + ivec2 cursor; + u32 width, height; +}; -bool wayc_atlas_init(atlas_t* atlas, image_format_e format, u32 width, - u32 height); -void wayc_atlas_deinit(atlas_t* atlas); +bool wayc_atlas_init(atlas_s* atlas, u32 width, u32 height); +void wayc_atlas_use(atlas_s atlas, u32 slot); +void wayc_atlas_deinit(atlas_s* atlas); |
