Skip to content

Commit

Permalink
Clip painters with viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
VZout committed Mar 13, 2024
1 parent d0433a9 commit ce752fb
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 ce752fb

Please sign in to comment.