Skip to content

Commit

Permalink
use egui 0.25.0 (#435)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul DE TEMMERMAN <[email protected]>
  • Loading branch information
asny and paul2t committed Jan 17, 2024
1 parent cccdef0 commit a6cddda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ headless = ["glutin_029"] # Headless rendering
egui-gui = ["egui_glow", "egui", "getrandom"] # Additional GUI features

[dependencies]
glow = "0.12"
glow = "0.13.0"
cgmath = "0.18"
three-d-asset = {version = "0.6"}
thiserror = "1"
winit = {version = "0.28", optional = true}
egui = { version = "0.22", optional = true }
egui_glow = { version = "0.22", optional = true }
egui = { version = "0.25.0", optional = true }
egui_glow = { version = "0.25.0", optional = true }
getrandom = { version = "0.2", features = ["js"], optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
5 changes: 3 additions & 2 deletions src/gui/egui_gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ impl GUI {
+ viewport.height as f32 / device_pixel_ratio as f32,
},
}),
pixels_per_point: Some(device_pixel_ratio as f32),
time: Some(accumulated_time_in_ms * 0.001),
modifiers: (&self.modifiers).into(),
events: events
Expand All @@ -90,6 +89,7 @@ impl GUI {
pressed: true,
modifiers: modifiers.into(),
repeat: false,
physical_key: None,
})
} else {
None
Expand All @@ -106,6 +106,7 @@ impl GUI {
pressed: false,
modifiers: modifiers.into(),
repeat: false,
physical_key: None,
})
} else {
None
Expand Down Expand Up @@ -252,8 +253,8 @@ impl GUI {
.borrow_mut()
.take()
.expect("need to call GUI::update before GUI::render");
let clipped_meshes = self.egui_context.tessellate(output.shapes);
let scale = self.egui_context.pixels_per_point();
let clipped_meshes = self.egui_context.tessellate(output.shapes, scale);
self.painter.borrow_mut().paint_and_update_textures(
[self.viewport.width, self.viewport.height],
scale,
Expand Down

0 comments on commit a6cddda

Please sign in to comment.