mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -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:
@@ -1,17 +1,15 @@
|
||||
use wasm_bindgen::prelude::JsValue;
|
||||
|
||||
pub trait Painter {
|
||||
fn set_texture(&mut self, tex_id: u64, image: epi::Image);
|
||||
fn set_texture(&mut self, tex_id: egui::TextureId, image: egui::ImageData);
|
||||
|
||||
fn free_texture(&mut self, tex_id: u64);
|
||||
fn free_texture(&mut self, tex_id: egui::TextureId);
|
||||
|
||||
fn debug_info(&self) -> String;
|
||||
|
||||
/// id of the canvas html element containing the rendering
|
||||
fn canvas_id(&self) -> &str;
|
||||
|
||||
fn upload_egui_texture(&mut self, font_image: &egui::FontImage);
|
||||
|
||||
fn clear(&mut self, clear_color: egui::Rgba);
|
||||
|
||||
fn paint_meshes(
|
||||
|
||||
Reference in New Issue
Block a user