diff --git a/math.d b/math.d index f626cf2..a17f4e8 100644 --- a/math.d +++ b/math.d @@ -806,6 +806,22 @@ Perspective(f32 fov, f32 aspect, f32 near, f32 far) return res; } +void +Ortho(Mat4* mat, f32 left, f32 bottom, f32 right, f32 top, f32 near, f32 far) +{ + MatZero(mat); + glm_ortho(left, right, bottom, top, near, far, mat.glm_mat.ptr); +} + +Mat4 +Ortho(f32 left, f32 bottom, f32 right, f32 top, f32 near, f32 far) +{ + Mat4 mat; + MatZero(&mat); + glm_ortho(left, right, bottom, top, near, far, mat.glm_mat.ptr); + return mat; +} + pragma(inline): Vec3 Rotate(Quat q, Vec3 vec) {