diff --git a/lib/Slic3r/GUI/PreviewCanvas.pm b/lib/Slic3r/GUI/PreviewCanvas.pm index dd3af6982..615e29b15 100644 --- a/lib/Slic3r/GUI/PreviewCanvas.pm +++ b/lib/Slic3r/GUI/PreviewCanvas.pm @@ -87,22 +87,11 @@ sub Resize { glMatrixMode(GL_PROJECTION); glLoadIdentity(); - my_gluPerspective(45, $x/$y, .5, 100); + glOrtho(-$x/2, $x/2, -$y/2, $y/2, 0.5, 100); glMatrixMode(GL_MODELVIEW); } -sub my_gluPerspective { - my ($fov, $ratio, $near, $far) = @_; - - my $top = tan(deg2rad($fov)*0.5) * $near; - my $bottom = -$top; - my $left = $ratio * $bottom; - my $right = $ratio * $top; - - glFrustum( $left, $right, $bottom, $top, $near, $far ); -} - sub DESTROY { my $self = shift;