How do I get the current size of a matrix stack (GL_MODELVIEW, GL_PROJECTION, GL_TEXTURE) in OpenGL?
I want this so that I can do some error checking to ensure that in certain parts of the code I can check that the matrix stacks have been left in the original condition.
Try:
The enums for the other stacks are:
If you use multi-texturing, you have more than one texture matrix stack to query. To do so, set the current texture-unit via
glActiveTexture();.