From 108b6da0350aac6c34ba70eb18c36c4cfc517560 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sun, 16 Jun 2024 20:48:21 +0900 Subject: [PATCH] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index 494e0276f55..ae5dd33ae93 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -701,15 +701,7 @@ impl GlowWinitRunning { let Some(current_gl_context) = current_gl_context.as_ref() else { return EventResult::Wait; }; - - if !gl_surface.is_current(current_gl_context) { - log::error!( - "egui::run_ui_and_pant: viewport {:?} ({:?}) was not created on main thread.", - viewport.ids.this, - viewport.builder.title - ); - } - + let screen_size_in_pixels: [u32; 2] = window.inner_size().into(); let clear_color = app.clear_color(&integration.egui_ctx.style().visuals); @@ -764,6 +756,10 @@ impl GlowWinitRunning { } { + // let Some(current_gl_context) = current_gl_context.as_ref() else { + // return EventResult::Wait; + // }; + // vsync - don't count as frame-time: frame_timer.pause(); crate::profile_scope!("swap_buffers");