summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-11 21:31:41 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-11 21:31:41 +0100
commit8c4b2e65c08ce0814e4d8059fc4df7c731b07ca5 (patch)
tree33084fcbee5c3030612c6e299bc6e63ea504e1d7
parent600c704e09dc24ea259fc72c63287d07a0a4bd39 (diff)
fixing atlas init
-rw-r--r--src/wayclock.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wayclock.cc b/src/wayclock.cc
index 84a188e..e8879f4 100644
--- a/src/wayclock.cc
+++ b/src/wayclock.cc
@@ -73,12 +73,6 @@ int main() {
wayc_defer(wayc_font_deinit(&font));
- struct atlas_s atlas;
- if (!wayc_atlas_init(&atlas, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT))
- wayc_panic("Failed to initialize atlas");
-
- wayc_defer(wayc_atlas_deinit(&atlas));
-
struct eventloop_s loop;
if (wayc_eventloop_init(&loop, wayc_handle) != EVENTLOOP_ERROR_NONE)
wayc_panic("Failed to initialize event loop");
@@ -109,8 +103,14 @@ int main() {
wayc_panic("Failed to initialize renderer");
wayc_defer(wayc_renderer_deinit(&renderer));
-
wayc_renderer_use(&renderer);
+
+ struct atlas_s atlas;
+ if (!wayc_atlas_init(&atlas, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT))
+ wayc_panic("Failed to initialize atlas");
+
+ wayc_defer(wayc_atlas_deinit(&atlas));
+
wayc_window_redraw(&window, &loop);
struct app_s app = {&renderer, &fctx, &font, &atlas};