1
0
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:
Emil Ernerfeldt
2022-01-15 13:59:52 +01:00
committed by GitHub
parent 6c616a1b69
commit 66d80e2519
59 changed files with 1297 additions and 860 deletions

View File

@@ -62,7 +62,7 @@ fn main() {
let mut redraw = || {
let mut quit = false;
let (needs_repaint, shapes) = egui_glium.run(&display, |egui_ctx| {
let needs_repaint = egui_glium.run(&display, |egui_ctx| {
egui::SidePanel::left("my_side_panel").show(egui_ctx, |ui| {
if ui
.add(egui::Button::image_and_text(
@@ -98,7 +98,7 @@ fn main() {
// draw things behind egui here
egui_glium.paint(&display, &mut target, shapes);
egui_glium.paint(&display, &mut target);
// draw things on top of egui here