1GLORTHO(3G)                                                        GLORTHO(3G)
2
3
4

NAME

6       glOrtho - multiply the current matrix with an orthographic matrix
7
8

C SPECIFICATION

10       void glOrtho( GLdouble left,
11                     GLdouble right,
12                     GLdouble bottom,
13                     GLdouble top,
14                     GLdouble near_val,
15                     GLdouble far_val )
16
17

PARAMETERS

19       left, right Specify  the  coordinates  for  the left and right vertical
20                   clipping planes.
21
22       bottom, top Specify the coordinates for the bottom and  top  horizontal
23                   clipping planes.
24
25       near_val, far_val
26                   Specify the distances to the nearer and farther depth clip‐
27                   ping planes.  These values are negative if the plane is  to
28                   be behind the viewer.
29

DESCRIPTION

31       glOrtho describes a transformation that produces a parallel projection.
32       The current matrix (see glMatrixMode) is multiplied by this matrix  and
33       the  result replaces the current matrix, as if glMultMatrix were called
34       with the following matrix as its argument:
35
36                      r_i_g_h_t_2−_l_e_f_t_      0             0        tx
37                     ⎛⎝    0      t_o_p_−_b_2o_t_t_o_m_         0        ty⎞⎠
38                          0          0      f_a_r___v_a_l_−−_2n_e_a_r___v_a_l_ tz
39                          0          0             0         1
40       where
41                                   tx=−rr_ii_gg_hh_tt_+−_ll_ee_ff_tt_
42
43                                   ty=−tt_oo_pp_+−_bb_oo_tt_tt_oo_mm_
44
45                                tz=−ff_aa_rr____vv_aa_ll_+−_nn_ee_aa_rr____vv_aa_ll_
46
47
48Typically, the matrix mode is GL_PROJECTION, and  (left,  bottom,   -near_val)
49and  (right,  top,   -near_val)  specify the points on the near clipping plane
50that are mapped to the lower left and  upper  right  corners  of  the  window,
51respectively,  assuming that the eye is located at (0, 0, 0).  -far_val speci‐
52fies the location of the far clipping plane.  Both near_val and far_val can be
53either positive or negative.
54
55Use glPushMatrix and glPopMatrix to save and restore the current matrix stack.
56

ERRORS

58       GL_INVALID_OPERATION  is  generated  if glOrtho is executed between the
59       execution of glBegin and the corresponding execution of glEnd.
60

ASSOCIATED GETS

62       glGet with argument GL_MATRIX_MODE
63       glGet with argument GL_COLOR_MATRIX
64       glGet with argument GL_MODELVIEW_MATRIX
65       glGet with argument GL_PROJECTION_MATRIX
66       glGet with argument GL_TEXTURE_MATRIX
67

SEE ALSO

69       glFrustum(3G),  glMatrixMode(3G),  glMultMatrix(3G),  glPushMatrix(3G),
70       glViewport(3G)
71
72
73
74                                                                   GLORTHO(3G)
Impressum