From 2cf608b3ef37beb573c124a0c7dfeb73a4979104 Mon Sep 17 00:00:00 2001 From: Kevin Caccamo Date: Mon, 9 May 2022 19:28:51 -0400 Subject: [PATCH] Turn off VSync For a simple app like this with no complex 3D rendering, VSync is not required. See also https://github.com/emilk/egui/issues/1358 --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5ac485e..3bd0538 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,10 +24,10 @@ struct AddonSpecification { type AddonMap = HashMap; fn main() -> Result<(), Box> { - let options = { - let mut options = eframe::NativeOptions::default(); - options.initial_window_size = Some(Vec2 {x: 550., y: 300.}); - options + let options = eframe::NativeOptions { + initial_window_size: Some(Vec2 {x: 550., y: 300.}), + vsync: false, + ..Default::default() }; let quit_on_launch = env::args().any(|arg| arg.to_lowercase() == "--quit-on-launch"); let addons = get_addons(None);