Rename and clean-up the "pure" glium and glow examples

This commit is contained in:
Emil Ernerfeldt 2021-10-20 15:05:41 +02:00
parent dd5d41d04e
commit 19a2a57f80
2 changed files with 4 additions and 36 deletions

View file

@ -36,17 +36,6 @@ fn main() {
if ui.button("Quit").clicked() { if ui.button("Quit").clicked() {
quit = true; 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); let (needs_repaint, shapes) = egui.end_frame(&display);
@ -64,13 +53,8 @@ fn main() {
use glium::Surface as _; use glium::Surface as _;
let mut target = display.draw(); let mut target = display.draw();
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);
target.clear_color( target.clear_color(color[0], color[1], color[2], color[3]);
clear_color[0],
clear_color[1],
clear_color[2],
clear_color[3],
);
// draw things behind egui here // draw things behind egui here

View file

@ -53,17 +53,6 @@ fn main() {
if ui.button("Quit").clicked() { if ui.button("Quit").clicked() {
quit = true; 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()); 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 { unsafe {
use glow::HasContext as _; use glow::HasContext as _;
gl.clear_color( gl.clear_color(color[0], color[1], color[2], color[3]);
clear_color[0],
clear_color[1],
clear_color[2],
clear_color[3],
);
gl.clear(glow::COLOR_BUFFER_BIT); gl.clear(glow::COLOR_BUFFER_BIT);
} }