mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Texture loading in egui (#1110)
* Move texture allocation into epaint/egui proper * Add TextureHandle * egui_glow: cast using bytemuck instead of unsafe code * Optimize glium painter * Optimize WebGL * Add example of loading an image from file
This commit is contained in:
@@ -50,7 +50,7 @@ fn main() {
|
||||
let mut redraw = || {
|
||||
let mut quit = false;
|
||||
|
||||
let (needs_repaint, shapes) = egui_glow.run(gl_window.window(), |egui_ctx| {
|
||||
let needs_repaint = egui_glow.run(gl_window.window(), |egui_ctx| {
|
||||
egui::SidePanel::left("my_side_panel").show(egui_ctx, |ui| {
|
||||
ui.heading("Hello World!");
|
||||
if ui.button("Quit").clicked() {
|
||||
@@ -78,7 +78,7 @@ fn main() {
|
||||
|
||||
// draw things behind egui here
|
||||
|
||||
egui_glow.paint(&gl_window, &gl, shapes);
|
||||
egui_glow.paint(&gl_window, &gl);
|
||||
|
||||
// draw things on top of egui here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user