GLORTHO(3G)
π GLORTHO (3G) π
okay so bestie, welcome to the glOrtho page, manual section 3G β this is the one that does the parallel projection thing and she is iconic, no cap β¨
β¨ NAME β¨
glOrtho β multiply the current matrix with an orthographic matrix π
π C SPECIFICATION π
void glOrtho( GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble near_val,
GLdouble far_val )
πΈ PARAMETERS πΈ
left,rightβ the coordinates for the left and right vertical clipping planes, respectively. your two side walls, basically π§bottom,topβ the coordinates for the bottom and top horizontal clipping planes. your floor and your ceiling π«Άnear_val,far_valβ the distances to the nearer and farther depth clipping planes. heads up: these values are negative if the plane is gonna sit behind the viewer π
π DESCRIPTION π
glOrtho describes a transformation that produces a parallel projection. the current matrix (go peek at glMatrixMode if you don't know which one that is) gets multiplied by this matrix, and the result replaces the current matrix β exactly as if glMultMatrix had been called with the following matrix as its argument:
__________ 0 0 tx
0 __________ 0 ty
0 0 ________________ tz
0 0 0 1
where
tx=β__________
ty=β__________
tz=β________________
typically the matrix mode is GL_PROJECTION, and (left, bottom, -near_val) and (right, top, -near_val) specify the points on the near clipping plane that get mapped to the lower left and upper right corners of the window respectively β all assuming the eye is chilling at (0, 0, 0) ποΈ and -far_val specifies the location of the far clipping plane. also, both near_val and far_val can be either positive or negative, she contains multitudes π«
use glPushMatrix and glPopMatrix to save and restore the current matrix stack, bestie, that's your undo button π
π ERRORS π
GL_INVALID_OPERATION is generated if glOrtho is executed between the execution of glBegin and the corresponding execution of glEnd. like, read the room. don't do that. π
β ASSOCIATED GETS β
glGetwith argumentGL_MATRIX_MODEglGetwith argumentGL_COLOR_MATRIXglGetwith argumentGL_MODELVIEW_MATRIXglGetwith argumentGL_PROJECTION_MATRIXglGetwith argumentGL_TEXTURE_MATRIX
π SEE ALSO π
glFrustum(3G), glMatrixMode(3G), glMultMatrix(3G), glPushMatrix(3G), glViewport(3G)
and that's the whole page, periodt π
this was GLORTHO(3G) β page name in the footer is literally just GLORTHO(3G) again, no version stamp, no date, nothing, she's mysterious like that π go forth and project, bestie π¦
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms