Skip to content

Commit

Permalink
Fixed painter clipping in transform-gizmo-egui (#71)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
urholaukkarinen committed Oct 6, 2024
1 parent edce73e commit 06b31ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/transform-gizmo-egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06b31ce

Please sign in to comment.