From 99eda093d6f3df8528fe442c89ebf86422d8c9cd Mon Sep 17 00:00:00 2001 From: Cedric Hutchings Date: Tue, 2 Jun 2020 16:40:46 -0400 Subject: Prevent gratuitous resizing in integration example If I didn't miss anything, that `resized` variable is never set back to `false`, meaning that swapchain recreation is retriggered every frame after the first resize. --- examples/integration/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/integration') diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs index c1fe8f69..2b0874e3 100644 --- a/examples/integration/src/main.rs +++ b/examples/integration/src/main.rs @@ -144,6 +144,8 @@ pub fn main() { present_mode: wgpu::PresentMode::Mailbox, }, ); + + resized = false; } let frame = swap_chain.get_next_texture().expect("Next frame"); -- cgit From d5b9dee2fdc44b843f1048140035404d4e036669 Mon Sep 17 00:00:00 2001 From: Cedric Hutchings Date: Tue, 2 Jun 2020 16:48:55 -0400 Subject: Attempt to appease rustfmt --- examples/integration/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/integration') diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs index 2b0874e3..6b4aa968 100644 --- a/examples/integration/src/main.rs +++ b/examples/integration/src/main.rs @@ -144,7 +144,7 @@ pub fn main() { present_mode: wgpu::PresentMode::Mailbox, }, ); - + resized = false; } -- cgit