1GLPUSHMATRIX(3G)                                              GLPUSHMATRIX(3G)
2
3
4

NAME

6       glPushMatrix, glPopMatrix - push and pop the current matrix stack
7
8

C SPECIFICATION

10       void glPushMatrix( void )
11
12

C SPECIFICATION

14       void glPopMatrix( void )
15
16

DESCRIPTION

18       There  is  a  stack  of  matrices  for  each  of  the matrix modes.  In
19       GL_MODELVIEW mode, the stack depth is at least 32.  In the other modes,
20       GL_COLOR,  const(PROJECTION),  and GL_TEXTURE, the depth is at least 2.
21       The current matrix in any mode is the matrix on the top  of  the  stack
22       for that mode.
23
24       glPushMatrix  pushes  the current matrix stack down by one, duplicating
25       the current matrix.  That is, after a glPushMatrix call, the matrix  on
26       top of the stack is identical to the one below it.
27
28       glPopMatrix pops the current matrix stack, replacing the current matrix
29       with the one below it on the stack.
30
31       Initially, each of the stacks contains one matrix, an identity matrix.
32
33       It is an error to push a full matrix stack, or to pop  a  matrix  stack
34       that  contains only a single matrix.  In either case, the error flag is
35       set and no other change is made to GL state.
36

ERRORS

38       GL_STACK_OVERFLOW is generated if glPushMatrix is called while the cur‐
39       rent matrix stack is full.
40
41       GL_STACK_UNDERFLOW is generated if glPopMatrix is called while the cur‐
42       rent matrix stack contains only a single matrix.
43
44       GL_INVALID_OPERATION is generated if  glPushMatrix  or  glPopMatrix  is
45       executed  between the execution of glBegin and the corresponding execu‐
46       tion of glEnd.
47

ASSOCIATED GETS

49       glGet with argument GL_MATRIX_MODE
50       glGet with argument GL_COLOR_MATRIX
51       glGet with argument GL_MODELVIEW_MATRIX
52       glGet with argument GL_PROJECTION_MATRIX
53       glGet with argument GL_TEXTURE_MATRIX
54       glGet with argument GL_COLOR_STACK_DEPTH
55       glGet with argument GL_MODELVIEW_STACK_DEPTH
56       glGet with argument GL_PROJECTION_STACK_DEPTH
57       glGet with argument GL_TEXTURE_STACK_DEPTH
58       glGet with argument GL_MAX_MODELVIEW_STACK_DEPTH
59       glGet with argument GL_MAX_PROJECTION_STACK_DEPTH
60       glGet with argument GL_MAX_TEXTURE_STACK_DEPTH
61

SEE ALSO

63       glFrustum(3G), glLoadIdentity(3G), glLoadMatrix(3G),  glMatrixMode(3G),
64       glMultMatrix(3G),      glOrtho(3G),      glRotate(3G),     glScale(3G),
65       glTranslate(3G), glViewport(3G)
66
67
68
69                                                              GLPUSHMATRIX(3G)
Impressum