1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

[egui_web] Improve alpha blending + add WebGL2 painter

This commit is contained in:
Emil Ernerfeldt
2021-01-16 01:30:00 +01:00
parent e1000da305
commit ef595153c9
7 changed files with 819 additions and 199 deletions

16
egui_web/src/painter.rs Normal file
View File

@@ -0,0 +1,16 @@
use wasm_bindgen::prelude::JsValue;
pub trait Painter {
fn as_tex_allocator(&mut self) -> &mut dyn epi::TextureAllocator;
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, texture: &egui::Texture);
fn clear(&mut self, lear_color: egui::Rgba);
fn paint_jobs(&mut self, jobs: egui::PaintJobs, pixels_per_point: f32) -> Result<(), JsValue>;
}