pushmatrix.3gl 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. '\"macro stdmacro
  2. .ds Vn Version 1.2
  3. .ds Dt 24 September 1999
  4. .ds Re Release 1.2.1
  5. .ds Dp Jan 14 18:30
  6. .ds Dm 01 pushmatri
  7. .ds Xs 41127 5 pushmatrix.gl
  8. .TH GLPUSHMATRIX 3G
  9. .SH NAME
  10. .B "glPushMatrix, glPopMatrix
  11. \- push and pop the current matrix stack
  12. .SH C SPECIFICATION
  13. void \f3glPushMatrix\fP( void )
  14. .nf
  15. .fi
  16. .SH C SPECIFICATION
  17. void \f3glPopMatrix\fP( void )
  18. .nf
  19. .fi
  20. .SH DESCRIPTION
  21. There is a stack of matrices for each of the matrix modes.
  22. In \%\f3GL_MODELVIEW\fP mode,
  23. the stack depth is at least 32.
  24. In the other modes,
  25. \%\f3GL_COLOR\fP, const(PROJECTION), and \%\f3GL_TEXTURE\fP,
  26. the depth is at least 2.
  27. The current matrix in any mode is the matrix on the top of the stack
  28. for that mode.
  29. .P
  30. \%\f3glPushMatrix\fP pushes the current matrix stack down by one,
  31. duplicating the current matrix.
  32. That is,
  33. after a \%\f3glPushMatrix\fP call,
  34. the matrix on top of the stack is identical to the one below it.
  35. .P
  36. \%\f3glPopMatrix\fP pops the current matrix stack,
  37. replacing the current matrix with the one below it on the stack.
  38. .P
  39. Initially, each of the stacks contains one matrix, an identity matrix.
  40. .P
  41. It is an error to push a full matrix stack,
  42. or to pop a matrix stack that contains only a single matrix.
  43. In either case, the error flag is set
  44. and no other change is made to GL state.
  45. .SH ERRORS
  46. \%\f3GL_STACK_OVERFLOW\fP is generated if \%\f3glPushMatrix\fP is called while
  47. the current matrix stack is full.
  48. .P
  49. \%\f3GL_STACK_UNDERFLOW\fP is generated if \%\f3glPopMatrix\fP is called while
  50. the current matrix stack contains only a single matrix.
  51. .P
  52. \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPushMatrix\fP or \%\f3glPopMatrix\fP
  53. is executed between the execution of \%\f3glBegin\fP
  54. and the corresponding execution of \%\f3glEnd\fP.
  55. .SH ASSOCIATED GETS
  56. \%\f3glGet\fP with argument \%\f3GL_MATRIX_MODE\fP
  57. .br
  58. \%\f3glGet\fP with argument \%\f3GL_COLOR_MATRIX\fP
  59. .br
  60. \%\f3glGet\fP with argument \%\f3GL_MODELVIEW_MATRIX\fP
  61. .br
  62. \%\f3glGet\fP with argument \%\f3GL_PROJECTION_MATRIX\fP
  63. .br
  64. \%\f3glGet\fP with argument \%\f3GL_TEXTURE_MATRIX\fP
  65. .br
  66. \%\f3glGet\fP with argument \%\f3GL_COLOR_STACK_DEPTH\fP
  67. .br
  68. \%\f3glGet\fP with argument \%\f3GL_MODELVIEW_STACK_DEPTH\fP
  69. .br
  70. \%\f3glGet\fP with argument \%\f3GL_PROJECTION_STACK_DEPTH\fP
  71. .br
  72. \%\f3glGet\fP with argument \%\f3GL_TEXTURE_STACK_DEPTH\fP
  73. .br
  74. \%\f3glGet\fP with argument \%\f3GL_MAX_MODELVIEW_STACK_DEPTH\fP
  75. .br
  76. \%\f3glGet\fP with argument \%\f3GL_MAX_PROJECTION_STACK_DEPTH\fP
  77. .br
  78. \%\f3glGet\fP with argument \%\f3GL_MAX_TEXTURE_STACK_DEPTH\fP
  79. .SH SEE ALSO
  80. \%\f3glFrustum(3G)\fP,
  81. \%\f3glLoadIdentity(3G)\fP,
  82. \%\f3glLoadMatrix(3G)\fP,
  83. \%\f3glMatrixMode(3G)\fP,
  84. \%\f3glMultMatrix(3G)\fP,
  85. \%\f3glOrtho(3G)\fP,
  86. \%\f3glRotate(3G)\fP,
  87. \%\f3glScale(3G)\fP,
  88. \%\f3glTranslate(3G)\fP,
  89. \%\f3glViewport(3G)\fP