diff options
Diffstat (limited to 'src/new_render/render.c')
-rw-r--r-- | src/new_render/render.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/new_render/render.c b/src/new_render/render.c index 07913f8..11f7e0a 100644 --- a/src/new_render/render.c +++ b/src/new_render/render.c @@ -81,6 +81,9 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window glfwMakeContextCurrent(ren->window); + DEBUG("Set up GLFW window callbacks"); + glfwSetWindowSizeCallback(window, Render_WindowSizeChanged); + // set the RAL backend up if (!GPU_Backend_Init(config.window_name, window, ren->resource_pools)) { return false; @@ -116,6 +119,13 @@ void Renderer_Shutdown(Renderer* ren) { } size_t Renderer_GetMemReqs() { return sizeof(Renderer); } +void Render_WindowSizeChanged(GLFWwindow* window, i32 new_width, i32 new_height) { + (void)window; + INFO("Window size changed callback"); + // Renderer* ren = Core_GetRenderer(&g_core); + GPU_Swapchain_Resize(new_width, new_height); +} + void Render_FrameBegin(Renderer* ren) { arena_free_all(&ren->frame_arena); ren->frame_aborted = false; |