src/window.c

changeset 101
febf3dc10011
parent 100
5231da78831e
--- a/src/window.c	Mon Apr 28 21:13:01 2025 +0200
+++ b/src/window.c	Tue Apr 29 21:51:29 2025 +0200
@@ -80,7 +80,8 @@
             .type = ASC_CAMERA_ORTHO,
             .ortho.rect = (asc_recti){
                 0, 0, window->dimensions.width, window->dimensions.height
-            }
+            },
+            .projection_update_func = asc_camera_ortho_update_size
         });
         asc_dprintf("Window %u initialized at index %u", window->id, index);
         asc_context.active_window = index;
@@ -157,7 +158,6 @@
     for (unsigned int i = 0; i < ASC_MAX_SCENES; i++) {
         asc_scene_draw(&window->scenes[i]);
     }
-    asc_camera_ortho_update_size(&window->ui.camera, (asc_vec2i){window_width, window_height});
     asc_scene_draw(&window->ui);
 
     // Swap Buffers

mercurial