Skip to content

Commit

Permalink
Merge pull request #47 from EmbarkStudios/clip_viewport
Browse files Browse the repository at this point in the history
Clip gizmo painters with viewport
  • Loading branch information
urholaukkarinen authored Mar 13, 2024
2 parents d0433a9 + ce752fb commit ab07280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ pub struct Painter3d {
}

impl Painter3d {
pub const fn new(painter: egui::Painter, mvp: DMat4, viewport: Rect) -> Self {
pub fn new(painter: egui::Painter, mvp: DMat4, viewport: Rect) -> Self {
Self {
painter,
painter: painter.with_clip_rect(viewport),
mvp,
viewport,
}
Expand Down

0 comments on commit ab07280

Please sign in to comment.