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:
@@ -83,7 +83,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(gl_window.window());
|
||||
let egui::FullOutput {
|
||||
platform_output,
|
||||
needs_repaint,
|
||||
textures_delta,
|
||||
shapes,
|
||||
} = integration.update(gl_window.window());
|
||||
|
||||
integration.handle_platform_output(gl_window.window(), platform_output);
|
||||
|
||||
let clipped_meshes = integration.egui_ctx.tessellate(shapes);
|
||||
|
||||
// paint:
|
||||
|
||||
@@ -156,11 +156,15 @@ impl EguiGlow {
|
||||
run_ui: impl FnMut(&egui::Context),
|
||||
) -> bool {
|
||||
let raw_input = self.egui_winit.take_egui_input(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(window, &self.egui_ctx, egui_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(window, &self.egui_ctx, platform_output);
|
||||
|
||||
self.shapes = shapes;
|
||||
self.textures_delta.append(textures_delta);
|
||||
|
||||
Reference in New Issue
Block a user