mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Put everything in Context behind the same Mutex (#1050)
* Move all interior mutability from Context to CtxRef and make it a handle * Rename `CtxRef` to `Context` * The old `Context` is now `ContextImpl` and is non-pub * Add benchmark Painter::rect Co-authored-by: Daniel Keller <dklr433@gmail.com>
This commit is contained in:
@@ -101,7 +101,7 @@ pub use egui_winit;
|
||||
|
||||
/// Convenience wrapper for using [`egui`] from a [`glium`] app.
|
||||
pub struct EguiGlium {
|
||||
pub egui_ctx: egui::CtxRef,
|
||||
pub egui_ctx: egui::Context,
|
||||
pub egui_winit: egui_winit::State,
|
||||
pub painter: crate::Painter,
|
||||
}
|
||||
@@ -129,7 +129,7 @@ impl EguiGlium {
|
||||
pub fn run(
|
||||
&mut self,
|
||||
display: &glium::Display,
|
||||
run_ui: impl FnMut(&egui::CtxRef),
|
||||
run_ui: impl FnMut(&egui::Context),
|
||||
) -> (bool, Vec<egui::epaint::ClippedShape>) {
|
||||
let raw_input = self
|
||||
.egui_winit
|
||||
|
||||
Reference in New Issue
Block a user