From 37e42d1608a8c92f2b2621c88b6cabd23d3dc0ae Mon Sep 17 00:00:00 2001 From: Konkitoman Date: Wed, 8 Nov 2023 07:44:28 +0200 Subject: [PATCH] Fix docs --- crates/egui/src/context.rs | 8 ++++---- crates/egui/src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 37263bae7..cd7be136c 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -392,7 +392,7 @@ impl ContextImpl { /// // Game loop: /// loop { /// let raw_input = egui::RawInput::default(); -/// let full_output = ctx.run(raw_input, egui::ViewportIdPair::ROOT, |ctx| { +/// let full_output = ctx.run(raw_input, |ctx| { /// egui::CentralPanel::default().show(&ctx, |ui| { /// ui.label("Hello world!"); /// if ui.button("Click me").clicked() { @@ -401,7 +401,7 @@ impl ContextImpl { /// }); /// }); /// handle_platform_output(full_output.platform_output); -/// let clipped_primitives = ctx.tessellate(full_output.shapes, egui::ViewportId::ROOT); // create triangles to paint +/// let clipped_primitives = ctx.tessellate(full_output.shapes); // create triangles to paint /// paint(full_output.textures_delta, clipped_primitives); /// } /// ``` @@ -458,7 +458,7 @@ impl Context { /// /// // Each frame: /// let input = egui::RawInput::default(); - /// let full_output = ctx.run(input, egui::ViewportIdPair::ROOT, |ctx| { + /// let full_output = ctx.run(input, |ctx| { /// egui::CentralPanel::default().show(&ctx, |ui| { /// ui.label("Hello egui!"); /// }); @@ -482,7 +482,7 @@ impl Context { /// /// // Each frame: /// let input = egui::RawInput::default(); - /// ctx.begin_frame(input, egui::ViewportIdPair::ROOT); + /// ctx.begin_frame(input); /// /// egui::CentralPanel::default().show(&ctx, |ui| { /// ui.label("Hello egui!"); diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index ee44f9869..82b0ad3a7 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -125,7 +125,7 @@ //! loop { //! let raw_input: egui::RawInput = gather_input(); //! -//! let full_output = ctx.run(raw_input, egui::ViewportIdPair::ROOT, |ctx| { +//! let full_output = ctx.run(raw_input, |ctx| { //! egui::CentralPanel::default().show(&ctx, |ui| { //! ui.label("Hello world!"); //! if ui.button("Click me").clicked() { @@ -134,7 +134,7 @@ //! }); //! }); //! handle_platform_output(full_output.platform_output); -//! let clipped_primitives = ctx.tessellate(full_output.shapes, egui::ViewportId::ROOT); // create triangles to paint +//! let clipped_primitives = ctx.tessellate(full_output.shapes); // create triangles to paint //! paint(full_output.textures_delta, clipped_primitives); //! } //! ```