Change to perspective projection using GLAM

This commit is contained in:
Hartmut Seichter 2022-12-07 14:05:26 +01:00
parent 2b3d00f1d4
commit c3b852f312

View file

@ -21,9 +21,12 @@ impl CameraProjection for OffAxisProjection {
println!("Here we go! {:?}",self); 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 // what to do on window resize