diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index 823e0b0201a..84b3fd94528 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -849,10 +849,17 @@ fn change_gl_context( ) { crate::profile_function!(); - if let Some(current_gl_context) = current_gl_context { - crate::profile_scope!("is_current"); - if gl_surface.is_current(current_gl_context) { - return; // Early-out to save a lot of time. + if !cfg!(target_os = "windows") { + // According to https://github.com/emilk/egui/issues/4289 + // we cannot do this early-out on Windows. + // TODO(emilk): optimize context switching on Windows too. + // See https://github.com/emilk/egui/issues/4173 + + if let Some(current_gl_context) = current_gl_context { + crate::profile_scope!("is_current"); + if gl_surface.is_current(current_gl_context) { + return; // Early-out to save a lot of time. + } } }