From 06b31cec2ce4ccb0967fa7f288ba5c54ad877774 Mon Sep 17 00:00:00 2001 From: Urho Laukkarinen Date: Sun, 6 Oct 2024 18:29:17 +0300 Subject: [PATCH] Fixed painter clipping in transform-gizmo-egui (#71) Painter's clip rect was always a sub-region of the UI's clip rect, so it was not possible to draw outside the used UI. Now the whole gizmo viewport is used as clip rect --- crates/transform-gizmo-egui/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/transform-gizmo-egui/src/lib.rs b/crates/transform-gizmo-egui/src/lib.rs index 666b5ca..a99247a 100644 --- a/crates/transform-gizmo-egui/src/lib.rs +++ b/crates/transform-gizmo-egui/src/lib.rs @@ -96,7 +96,7 @@ impl GizmoExt for Gizmo { let draw_data = self.draw(); - ui.painter().with_clip_rect(egui_viewport).add(Mesh { + egui::Painter::new(ui.ctx().clone(), ui.layer_id(), egui_viewport).add(Mesh { indices: draw_data.indices, vertices: draw_data .vertices