mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Switch to orthographic projection
This commit is contained in:
		
							parent
							
								
									47b2c13c99
								
							
						
					
					
						commit
						bb3ebb0244
					
				
					 1 changed files with 1 additions and 12 deletions
				
			
		|  | @ -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; | ||||
|   | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guillaume Seguin
						Guillaume Seguin