From 3d85440aac3396036f8d81ea3537d2190c890af0 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Fri, 1 May 2026 18:25:15 +0200 Subject: [PATCH] stop recreating the framebuffer every frame if the aspect ratio is not 1:1 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a5be888..49cc522 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2374,7 +2374,7 @@ static void render(WGPUTexture surface_texture) { u32vec2 surface_size = { wgpuTextureGetWidth(surface_texture), wgpuTextureGetHeight(surface_texture) }; - if (framebuffer_size.x != surface_size.x || framebuffer_size.x != surface_size.y) { + if (framebuffer_size.x != surface_size.x || framebuffer_size.y != surface_size.y) { if (framebuffer) wgpuTextureRelease(framebuffer); WGPUTextureDescriptor descriptor = {