There is a stack of matrices for each of the matrix modes. In
GGGGLLLL____MMMMOOOODDDDEEEELLLLVVVVIIIIEEEEWWWW mode, the stack depth is at least 32. In the other modes,
GGGGLLLL____CCCCOOOOLLLLOOOORRRR, const(PROJECTION), and GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE, the depth is at least 2.
The current matrix in any mode is the matrix on the top of the stack for
that mode.
ggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx pushes the current matrix stack down by one, duplicating the
current matrix. That is, after a ggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx call, the matrix on top of
the stack is identical to the one below it.
ggggllllPPPPooooppppMMMMaaaattttrrrriiiixxxx pops the current matrix stack, replacing the current matrix
with the one below it on the stack.
Initially, each of the stacks contains one matrix, an identity matrix.
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.
EEEERRRRRRRROOOORRRRSSSS
GGGGLLLL____SSSSTTTTAAAACCCCKKKK____OOOOVVVVEEEERRRRFFFFLLLLOOOOWWWW is generated if ggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx is called while the
current matrix stack is full.
GGGGLLLL____SSSSTTTTAAAACCCCKKKK____UUUUNNNNDDDDEEEERRRRFFFFLLLLOOOOWWWW is generated if ggggllllPPPPooooppppMMMMaaaattttrrrriiiixxxx is called while the
current matrix stack contains only a single matrix.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx or ggggllllPPPPooooppppMMMMaaaattttrrrriiiixxxx is
executed between the execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution
ggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____SSSSTTTTAAAACCCCKKKK____DDDDEEEEPPPPTTTTHHHH
ggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAAXXXX____MMMMOOOODDDDEEEELLLLVVVVIIIIEEEEWWWW____SSSSTTTTAAAACCCCKKKK____DDDDEEEEPPPPTTTTHHHH
ggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAAXXXX____PPPPRRRROOOOJJJJEEEECCCCTTTTIIIIOOOONNNN____SSSSTTTTAAAACCCCKKKK____DDDDEEEEPPPPTTTTHHHH
ggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAAXXXX____TTTTEEEEXXXXTTTTUUUURRRREEEE____SSSSTTTTAAAACCCCKKKK____DDDDEEEEPPPPTTTTHHHH