Invert Y axis in Transformation::orthographic

This commit is contained in:
Héctor Ramón Jiménez 2020-08-17 18:11:11 +02:00
parent b90e5c4e05
commit 02ca90a22d

View File

@ -14,7 +14,11 @@ impl Transformation {
/// Creates an orthographic projection.
#[rustfmt::skip]
pub fn orthographic(width: u32, height: u32) -> Transformation {
Transformation(Mat4::orthographic_rh_gl(0.0, width as f32, 0.0, height as f32, -1.0, 1.0))
Transformation(Mat4::orthographic_rh_gl(
0.0, width as f32,
height as f32, 0.0,
-1.0, 1.0
))
}
/// Creates a translate transformation.