From bb521d304aee0bb990ad92dd8cf5251a4eb1f0fa Mon Sep 17 00:00:00 2001 From: onelin Date: Wed, 17 Dec 2025 14:28:31 +0100 Subject: Resize framebuffers on window resize --- src/include/daw/window.h | 1 + src/platform_glfw.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/include/daw/window.h b/src/include/daw/window.h index 4e00774..b86ee60 100644 --- a/src/include/daw/window.h +++ b/src/include/daw/window.h @@ -112,6 +112,7 @@ void window_init_renderstack(Window *restrict w, void get_mousepos(double *x, double *y); void window_get_size(ivec2* dst); +void window_reset_cameras(Window* w, RenderTargets* restrict targets); #ifdef __cplusplus } diff --git a/src/platform_glfw.c b/src/platform_glfw.c index 394695d..33614ff 100644 --- a/src/platform_glfw.c +++ b/src/platform_glfw.c @@ -157,7 +157,6 @@ static void window_resize_callback(GLFWwindow* window, int width, int height) { } static void framebuffer_resize_callback(GLFWwindow* window, int width, int height) { - (void)width; (void)height; Window* w = glfwGetWindowUserPointer(window); if (w != NULL) { const GladGLContext* gl = w->context; @@ -167,6 +166,7 @@ static void framebuffer_resize_callback(GLFWwindow* window, int width, int heigh w->windowsize[0] = width; w->windowsize[1] = height; + window_reset_cameras(w, w->render_targets); //r_reset_camera(c); } DEBUG("FRAMEBUFFER RESIZE <%d,%d>\n", width, height); -- cgit v1.3