mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Add Shape::Callback to do custom rendering inside of an egui UI (#1351)
* Add Shape::Callback to do custom rendering inside of an egui UI * Use Rc<glow::Context> everywhere * Remove trait WebPainter * Add glow::Context to epi::App::setup
This commit is contained in:
@@ -204,9 +204,9 @@ loop {
|
||||
let full_output = egui_ctx.run(raw_input, |egui_ctx| {
|
||||
my_app.ui(egui_ctx); // add panels, windows and widgets to `egui_ctx` here
|
||||
});
|
||||
let clipped_meshes = egui_ctx.tessellate(full_output.shapes); // creates triangles to paint
|
||||
let clipped_primitives = egui_ctx.tessellate(full_output.shapes); // creates triangles to paint
|
||||
|
||||
my_integration.paint(&full_output.textures_delta, clipped_meshes);
|
||||
my_integration.paint(&full_output.textures_delta, clipped_primitives);
|
||||
|
||||
let platform_output = full_output.platform_output;
|
||||
my_integration.set_cursor_icon(platform_output.cursor_icon);
|
||||
|
||||
Reference in New Issue
Block a user