From 19a2a57f8099688c3e481a368ba3ecb9544fa073 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 20 Oct 2021 15:05:41 +0200 Subject: [PATCH] Rename and clean-up the "pure" glium and glow examples --- .../examples/{pure.rs => pure_glium.rs} | 20 ++----------------- egui_glow/examples/{pure.rs => pure_glow.rs} | 20 ++----------------- 2 files changed, 4 insertions(+), 36 deletions(-) rename egui_glium/examples/{pure.rs => pure_glium.rs} (80%) rename egui_glow/examples/{pure.rs => pure_glow.rs} (82%) diff --git a/egui_glium/examples/pure.rs b/egui_glium/examples/pure_glium.rs similarity index 80% rename from egui_glium/examples/pure.rs rename to egui_glium/examples/pure_glium.rs index 53adc41a..1633d21a 100644 --- a/egui_glium/examples/pure.rs +++ b/egui_glium/examples/pure_glium.rs @@ -36,17 +36,6 @@ fn main() { if ui.button("Quit").clicked() { quit = true; } - - egui::ComboBox::from_label("Version") - .width(150.0) - .selected_text("foo") - .show_ui(ui, |ui| { - egui::CollapsingHeader::new("Dev") - .default_open(true) - .show(ui, |ui| { - ui.label("contents"); - }); - }); }); let (needs_repaint, shapes) = egui.end_frame(&display); @@ -64,13 +53,8 @@ fn main() { use glium::Surface as _; let mut target = display.draw(); - let clear_color = egui::Rgba::from_rgb(0.1, 0.3, 0.2); - target.clear_color( - clear_color[0], - clear_color[1], - clear_color[2], - clear_color[3], - ); + let color = egui::Rgba::from_rgb(0.1, 0.3, 0.2); + target.clear_color(color[0], color[1], color[2], color[3]); // draw things behind egui here diff --git a/egui_glow/examples/pure.rs b/egui_glow/examples/pure_glow.rs similarity index 82% rename from egui_glow/examples/pure.rs rename to egui_glow/examples/pure_glow.rs index 66cfac2f..9ca2c6be 100644 --- a/egui_glow/examples/pure.rs +++ b/egui_glow/examples/pure_glow.rs @@ -53,17 +53,6 @@ fn main() { if ui.button("Quit").clicked() { quit = true; } - - egui::ComboBox::from_label("Version") - .width(150.0) - .selected_text("foo") - .show_ui(ui, |ui| { - egui::CollapsingHeader::new("Dev") - .default_open(true) - .show(ui, |ui| { - ui.label("contents"); - }); - }); }); let (needs_repaint, shapes) = egui.end_frame(gl_window.window()); @@ -78,15 +67,10 @@ fn main() { }; { - let clear_color = egui::Rgba::from_rgb(0.1, 0.3, 0.2); + let color = egui::Rgba::from_rgb(0.1, 0.3, 0.2); unsafe { use glow::HasContext as _; - gl.clear_color( - clear_color[0], - clear_color[1], - clear_color[2], - clear_color[3], - ); + gl.clear_color(color[0], color[1], color[2], color[3]); gl.clear(glow::COLOR_BUFFER_BIT); }