Skip to content

Commit

Permalink
Update glow_integration.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jun 16, 2024
1 parent 933cf51 commit 108b6da
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions crates/eframe/src/native/glow_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 108b6da

Please sign in to comment.