From 6e2762eb5c0c02bf864587f936560f805842868f Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Fri, 20 Oct 2023 12:12:46 +0100 Subject: [PATCH] Resize camera projection on window resize --- src/core/camera.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/camera.rs b/src/core/camera.rs index 2c9ccb6..4aa87ac 100644 --- a/src/core/camera.rs +++ b/src/core/camera.rs @@ -144,6 +144,11 @@ impl CameraController { pub fn process_events(&mut self, event: &WindowEvent) -> bool { match event { + WindowEvent::Resized(physical_size) => { + self.projection + .resize(physical_size.width, physical_size.height); + true + } WindowEvent::KeyboardInput { input: KeyboardInput {