pushmatrix.3gl   [plain text]


'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 pushmatri
.ds Xs 41127 5 pushmatrix.gl
.TH GLPUSHMATRIX 3G
.SH NAME
.B "glPushMatrix, glPopMatrix
\- push and pop the current matrix stack

.SH C SPECIFICATION
void \f3glPushMatrix\fP( void )
.nf
.fi

.SH C SPECIFICATION
void \f3glPopMatrix\fP( void )
.nf
.fi

.SH DESCRIPTION
There is a stack of matrices for each of the matrix modes.
In \%\f3GL_MODELVIEW\fP mode,
the stack depth is at least 32.
In the other modes,
\%\f3GL_COLOR\fP, const(PROJECTION), and \%\f3GL_TEXTURE\fP,
the depth is at least 2.
The current matrix in any mode is the matrix on the top of the stack
for that mode.
.P
\%\f3glPushMatrix\fP pushes the current matrix stack down by one,
duplicating the current matrix.
That is,
after a \%\f3glPushMatrix\fP call,
the matrix on top of the stack is identical to the one below it.
.P
\%\f3glPopMatrix\fP pops the current matrix stack,
replacing the current matrix with the one below it on the stack. 
.P
Initially, each of the stacks contains one matrix, an identity matrix.
.P
It is an error to push a full matrix stack,
or to pop a matrix stack that contains only a single matrix.
In either case, the error flag is set
and no other change is made to GL state.
.SH ERRORS
\%\f3GL_STACK_OVERFLOW\fP is generated if \%\f3glPushMatrix\fP is called while
the current matrix stack is full.
.P
\%\f3GL_STACK_UNDERFLOW\fP is generated if \%\f3glPopMatrix\fP is called while
the current matrix stack contains only a single matrix.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPushMatrix\fP or \%\f3glPopMatrix\fP
is executed between the execution of \%\f3glBegin\fP
and the corresponding execution of \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_MATRIX_MODE\fP
.br
\%\f3glGet\fP with argument \%\f3GL_COLOR_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MODELVIEW_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_PROJECTION_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_TEXTURE_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_COLOR_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MODELVIEW_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_PROJECTION_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_TEXTURE_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAX_MODELVIEW_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAX_PROJECTION_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAX_TEXTURE_STACK_DEPTH\fP
.SH SEE ALSO
\%\f3glFrustum(3G)\fP, 
\%\f3glLoadIdentity(3G)\fP,
\%\f3glLoadMatrix(3G)\fP,
\%\f3glMatrixMode(3G)\fP,
\%\f3glMultMatrix(3G)\fP,
\%\f3glOrtho(3G)\fP,
\%\f3glRotate(3G)\fP,
\%\f3glScale(3G)\fP,
\%\f3glTranslate(3G)\fP,
\%\f3glViewport(3G)\fP