From c3b852f312555093b89b81df56ee1f28edb1201a Mon Sep 17 00:00:00 2001 From: Hartmut Seichter Date: Wed, 7 Dec 2022 14:05:26 +0100 Subject: [PATCH] Change to perspective projection using GLAM --- src/offaxis.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/offaxis.rs b/src/offaxis.rs index a311057..0586cd1 100644 --- a/src/offaxis.rs +++ b/src/offaxis.rs @@ -21,9 +21,12 @@ impl CameraProjection for OffAxisProjection { println!("Here we go! {:?}",self); - //Mat4::perspective_rh_gl(fov_y_radians, aspect_ratio, z_near, z_far) + Mat4::perspective_rh_gl(45.0_f32.to_radians(), + self.aspect, + self.near, + self.far) - Mat4::orthographic_rh(-self.aspect, self.aspect, -1.0, 1.0, self.near, self.far) + //Mat4::orthographic_rh(-self.aspect, self.aspect, -1.0, 1.0, self.near, self.far) } // what to do on window resize