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:
16
egui_web/src/painter.rs
Normal file
16
egui_web/src/painter.rs
Normal 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>;
|
||||
}
|
||||
Reference in New Issue
Block a user