From 680a547a689065151119fc9b96456cb93275b46e Mon Sep 17 00:00:00 2001 From: Konkitoman Date: Wed, 19 Jul 2023 10:48:35 +0300 Subject: [PATCH] Now is rendering on the new windows --- crates/eframe/src/native/run.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/eframe/src/native/run.rs b/crates/eframe/src/native/run.rs index c9d0012ef..7e3ae7b0b 100644 --- a/crates/eframe/src/native/run.rs +++ b/crates/eframe/src/native/run.rs @@ -715,8 +715,8 @@ mod glow_integration { } } - fn swap_buffers(&self) -> glutin::error::Result<()> { - self.windows[0] + fn swap_buffers(&self, window_index: usize) -> glutin::error::Result<()> { + self.windows[window_index] .gl_surface .as_ref() .expect("failed to get surface to swap buffers") @@ -1043,7 +1043,7 @@ mod glow_integration { { crate::profile_scope!("swap_buffers"); - gl_window.swap_buffers().unwrap(); + gl_window.swap_buffers(window_index).unwrap(); } integration.post_present(window);