Signature
Parameters
Description
glMatrixMode
sets the current matrix mode.
mode
can assume one of four 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.
- GL_COLOR
-
Applies subsequent matrix operations to the color matrix stack.
To find out which matrix stack is currently the target of all matrix
operations, call
glGet
with argument
GL_MATRIX_MODE
. The initial
value is
GL_MODELVIEW
.
Errors
GL_INVALID_ENUM
is generated if
mode
is not an accepted value.
GL_INVALID_OPERATION
is generated if
glMatrixMode
is executed between the execution of
glBegin
and the corresponding execution of
glEnd
.
Associated Gets
glGet
with argument
GL_MATRIX_MODE
See Also
Copyright
Copyright
1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
http://oss.sgi.com/projects/FreeB/
.
Sample Code References
The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.
glMatrixMode
{LGPL or GPL or MPL} Kamaelia
Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/Particles3D.py
Lines: 544, 590, 619, 623, 636, 638, 641
{LGPL or GPL or MPL} Kamaelia
Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/TopologyViewer3D.py
Lines: 679
{LGPL or GPL or MPL} Kamaelia
Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py
Lines: 479, 771, 787, 801, 812, 882
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/Utils/Particles3D.py
Lines: 284, 325, 349, 353, 368, 370, 373
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/Experiments/Cubes.py
Lines: 55, 62, 317, 327, 335, 338
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py
Lines: 478, 754, 770, 779, 790, 860
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube_controlled.py
Lines: 91, 95
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube.py
Lines: 38, 42
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Sketches/playground/Display3D.py
Lines: 150, 411, 455, 463, 474
{LGPL or GPL or MPL} Kamaelia
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/Particles3D.py
Lines: 544, 590, 619, 623, 636, 638, 641
{LGPL or GPL or MPL} Kamaelia
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/TopologyViewer3D.py
Lines: 679
{LGPL or GPL or MPL} Kamaelia
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py
Lines: 479, 771, 787, 801, 812, 882
{LGPL or GPL or MPL} Kamaelia
Sketches/THF/3D/playground/Display3D.py
Lines: 150, 411, 455, 463, 474
{LGPL or GPL or MPL} Kamaelia
Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py
Lines: 478, 753, 769, 778, 789, 859