Name
gl.MatrixMode -- specify which matrix is the current matrix
Synopsis
gl.MatrixMode(mode)
Function
gl.MatrixMode() sets the current matrix mode. mode can assume one of three values:

#GL_MODELVIEW
Applies subsequent matrix operations to the modelview matrix stack.

#GL_PROJECTION
Applies subsequent matrix operations to the projection matrix stack.

#GL_TEXTURE
Applies subsequent matrix operations to the texture matrix stack.

To find out which matrix stack is currently the target of all matrix operations, call gl.Get() with argument #GL_MATRIX_MODE. The initial value is #GL_MODELVIEW.

Please consult an OpenGL reference manual for more information.

Inputs
mode
specifies which matrix stack is the target for subsequent matrix operations (see above)
Errors
#GL_INVALID_ENUM is generated if mode is not an accepted value.

#GL_INVALID_OPERATION is generated if gl.MatrixMode() is executed between the execution of gl.Begin() and the corresponding execution of gl.End().

Associated gets
gl.Get() with argument #GL_MATRIX_MODE


Show TOC