From 975cbac83ae8422201f7f219e660430084943dec Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Wed, 30 Nov 2022 01:04:17 +1100 Subject: [PATCH] Update the glow example to avoid a white flash when the app starts. (#2345) --- crates/egui_glow/examples/pure_glow.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/egui_glow/examples/pure_glow.rs b/crates/egui_glow/examples/pure_glow.rs index 1ef40f2f..54d94dd1 100644 --- a/crates/egui_glow/examples/pure_glow.rs +++ b/crates/egui_glow/examples/pure_glow.rs @@ -53,6 +53,7 @@ fn main() { // draw things on top of egui here gl_window.swap_buffers().unwrap(); + gl_window.window().set_visible(true); } }; @@ -111,7 +112,8 @@ fn create_display( width: 800.0, height: 600.0, }) - .with_title("egui_glow example"); + .with_title("egui_glow example") + .with_visible(false); // Keep hidden until we've painted something. See https://github.com/emilk/egui/pull/2279 let gl_window = unsafe { glutin::ContextBuilder::new()