2021-01-16 00:30:00 +00:00
|
|
|
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);
|
|
|
|
|
2021-01-25 20:23:24 +00:00
|
|
|
fn paint_meshes(&mut self, jobs: egui::PaintJobs, pixels_per_point: f32)
|
|
|
|
-> Result<(), JsValue>;
|
2021-01-16 00:30:00 +00:00
|
|
|
}
|