GLORTHO(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

πŸ’– 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 ⭐

  • glGet with argument GL_MATRIX_MODE
  • glGet with argument GL_COLOR_MATRIX
  • glGet with argument GL_MODELVIEW_MATRIX
  • glGet with argument GL_PROJECTION_MATRIX
  • glGet with argument GL_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