1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Introduce egui::FullOutput, returned from Context::run (#1292)

* Introduce `egui::FullOutput`, returned from `Context::run`
* Rename `Output` to `PlatformOutput`
This commit is contained in:
Emil Ernerfeldt
2022-02-22 17:13:53 +01:00
committed by GitHub
parent c5a9421dbd
commit 31d324932c
17 changed files with 204 additions and 144 deletions

View File

@@ -67,8 +67,15 @@ pub fn run(app: Box<dyn epi::App>, native_options: &epi::NativeOptions) -> ! {
std::thread::sleep(std::time::Duration::from_millis(10));
}
let (needs_repaint, textures_delta, shapes) =
integration.update(display.gl_window().window());
let egui::FullOutput {
platform_output,
needs_repaint,
textures_delta,
shapes,
} = integration.update(display.gl_window().window());
integration.handle_platform_output(display.gl_window().window(), platform_output);
let clipped_meshes = integration.egui_ctx.tessellate(shapes);
// paint:

View File

@@ -141,16 +141,22 @@ impl EguiGlium {
let raw_input = self
.egui_winit
.take_egui_input(display.gl_window().window());
let (egui_output, shapes) = self.egui_ctx.run(raw_input, run_ui);
let needs_repaint = egui_output.needs_repaint;
let textures_delta = self.egui_winit.handle_output(
let egui::FullOutput {
platform_output,
needs_repaint,
textures_delta,
shapes,
} = self.egui_ctx.run(raw_input, run_ui);
self.egui_winit.handle_platform_output(
display.gl_window().window(),
&self.egui_ctx,
egui_output,
platform_output,
);
self.shapes = shapes;
self.textures_delta.append(textures_delta);
needs_repaint
}