Skip to main content

orthographic

Function orthographic 

Source
pub fn orthographic(
    left: f32,
    right: f32,
    bottom: f32,
    top: f32,
    near: f32,
    far: f32,
) -> Mat4
Expand description

Creates an orthographic projection matrix for use with OpenGL.

Expects a right-handed Y-up view space input. Outputs NDC with Z in [-1, 1] and Y-up.

This is the OpenGL glOrtho equivalent.