Specifies the coordinate for the left vertical clipping plane.
Specifies the coordinate for the right vertical clipping plane.
Specifies the coordinate for the bottom horizontal clipping plane.
Specifies the coordinate for the top horizontal clipping plane.
Specifies the distance to the nearer depth clipping plane. This value is negative if the plane is to be behind the viewer.
Specifies the distance to the farther depth clipping plane. This value is negative if the plane is to be behind the viewer.
Generated using TypeDoc
glOrtho
describes a transformation that produces a parallel projection. The current matrix (see glMatrixMode) is multiplied by this matrix and the result replaces the current matrix, as if glMultMatrix were called with the following matrix as its argument:⎛2 / right-leftㅤㅤ ㅤㅤ0ㅤㅤㅤㅤㅤㅤㅤ ㅤ ㅤ0ㅤㅤㅤㅤㅤㅤㅤ𝐭ₓ⎞
⎜0ㅤㅤㅤㅤㅤㅤ2 / top - bottomㅤㅤㅤㅤㅤㅤ0ㅤㅤㅤㅤㅤㅤㅤ𝐭ᵧ ⎜
⎜0ㅤㅤㅤㅤㅤㅤㅤ ㅤ ㅤ0ㅤㅤㅤㅤㅤ-2 / farVal - nearValㅤㅤㅤ𝐭𝑧 ⎜
⎝0ㅤㅤㅤㅤㅤㅤㅤ ㅤ ㅤ0ㅤㅤㅤㅤㅤㅤ ㅤ ㅤ ㅤ0ㅤㅤㅤㅤㅤㅤ ㅤ1⎠
where
𝐭ₓ = − right + left / right − left
𝐭ᵧ = − top + bottom / top − bottom
𝐭𝑧 = − farVal + nearVal / farVal − nearVal
Typically, the matrix mode is GL_PROJECTION, and (left, bottom, −nearVal) and (right, top, −nearVal) specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, respectively, assuming that the eye is located at (0, 0, 0). −farVal specifies the location of the far clipping plane. Both nearVal and farVal can be either positive or negative.
Use glPushMatrix and glPopMatrix to save and restore the current matrix stack.