diff options
| author | onelin <oscar@nelin.dk> | 2025-12-17 13:28:31 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2025-12-18 21:14:22 +0000 |
| commit | bb521d304aee0bb990ad92dd8cf5251a4eb1f0fa (patch) | |
| tree | 00212fbfc239de8dea2fbbd221a4e540935d734c | |
| parent | ddcfb5d3827a6df6357dca7b29def5aca3a4fcd2 (diff) | |
Resize framebuffers on window resize
| -rw-r--r-- | src/include/daw/window.h | 1 | ||||
| -rw-r--r-- | src/platform_glfw.c | 2 |
2 files changed, 2 insertions, 1 deletions
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); |
