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 May 18, 2024
1 parent 082bd29 commit 374434d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/eframe/src/native/glow_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,21 +584,21 @@ impl GlowWinitRunning {
..
} = &mut *glutin;
let viewport = &viewports[&viewport_id];
let Some(window) = viewport.window.as_ref() else {
return EventResult::Wait;
};
let Some(gl_surface) = viewport.gl_surface.as_ref() else {
return EventResult::Wait;
};

let screen_size_in_pixels: [u32; 2] = window.inner_size().into();

{
frame_timer.pause();
change_gl_context(current_gl_context, gl_surface);
frame_timer.resume();
}

let Some(window) = viewport.window.as_ref() else {
return EventResult::Wait;
};
let screen_size_in_pixels: [u32; 2] = window.inner_size().into();

self.painter
.borrow()
.clear(screen_size_in_pixels, clear_color);
Expand Down

0 comments on commit 374434d

Please sign in to comment.