glMatrixMode

specify which matrix is the current matrix

Signature

glMatrixMode( GLenum ( mode ) )-> void
glMatrixMode( mode )

Parameters

VariablesDescription
mode
Specifies which matrix stack is the target for subsequent matrix operations. Three values are accepted: GL_MODELVIEW , GL_PROJECTION , and GL_TEXTURE . The initial value is GL_MODELVIEW . Additionally, if the
ARB_imaging
extension is supported, GL_COLOR is also accepted.

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
OpenGLContext tests/glutbitmapcharacter.py Lines: 14, 21, 34, 39
OpenGLContext tests/boundingvolume.py Lines: 70, 72, 100
OpenGLContext tests/glhistogram.py Lines: 52, 59, 82, 87
OpenGLContext tests/gldrawpixels.py Lines: 65, 72, 86, 91
OpenGLContext tests/shadow_1.py Lines: 288, 392, 394
OpenGLContext tests/gldrawpixelssynth.py Lines: 45, 52, 66, 71
OpenGLContext OpenGLContext/framecounter.py Lines: 61, 64
OpenGLContext OpenGLContext/atlas.py Lines: 253, 255
OpenGLContext OpenGLContext/doinchildmatrix.py Lines: 19, 27, 33
OpenGLContext OpenGLContext/passes/renderpass.py Lines: 296, 541
OpenGLContext OpenGLContext/passes/flatcore.py Lines: 241
OpenGLContext OpenGLContext/passes/rendervisitor.py Lines: 257, 321, 323, 400, 418
OpenGLContext OpenGLContext/passes/_flat.py Lines: 519
OpenGLContext OpenGLContext/passes/flatcompat.py Lines: 60, 70, 74, 153, 257
OpenGLContext OpenGLContext/scenegraph/texturetransform.py Lines: 44, 56, 59, 66
OpenGLContext OpenGLContext/scenegraph/imagetexture.py Lines: 101, 105
OpenGLContext OpenGLContext/move/viewplatform.py Lines: 137, 141
OpenGLContext OpenGLContext/shadow/shadowcontext.py Lines: 20, 23
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 242, 244
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 31, 36, 73, 76
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 132, 134
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 212, 215
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 60, 65
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 60, 71
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 53, 64
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 70, 79
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 62, 73
OpenGL-Demo PyOpenGL-Demo/GLE/maintest.py Lines: 51, 54
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 140, 144
OpenGL-Demo PyOpenGL-Demo/proesch/bezier/bezier.py Lines: 87, 91
OpenGL-Demo PyOpenGL-Demo/proesch/stereo/stereoDemo.py Lines: 62, 65
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 90, 93
OpenGL-Demo PyOpenGL-Demo/redbook/lines.py Lines: 122
OpenGL-Demo PyOpenGL-Demo/redbook/cube.py Lines: 78, 81
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 182, 188
OpenGL-Demo PyOpenGL-Demo/redbook/scene.py Lines: 109, 117
OpenGL-Demo PyOpenGL-Demo/redbook/smooth.py Lines: 87, 93
OpenGL-Demo PyOpenGL-Demo/redbook/drawf.py Lines: 92, 95
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 117, 123
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 113, 116
OpenGL-Demo PyOpenGL-Demo/redbook/hello.py Lines: 82
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 273, 281, 289, 297, 302, 364, 370
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 65, 70, 78, 81
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 207, 213
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 55, 60, 68, 71
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 90, 95, 103, 106
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 117, 122, 130, 133
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 68, 73, 81, 84
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 55, 60, 68, 71
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 55, 60, 68, 71
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 132, 138
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 114, 119, 134, 137
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 375, 381
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 125, 130, 138, 141
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 70, 75, 83, 86
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 50, 55, 63, 66
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 46, 51, 59, 62
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 55, 60, 68, 71
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 71, 76, 84, 87
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson44/lesson44.py Lines: 215, 222
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson44/glFont.py Lines: 75, 79, 87, 89
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson43/glFreeType.py Lines: 189, 201, 272
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson43/lesson43.py Lines: 87, 93
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson48/NeHeGL.py Lines: 92, 99
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 88
OpenGL-Demo py2exe-example/shader_test.py Lines: 32, 37, 74, 77
Glinter Widget.py Lines: 54, 57, 101, 584, 588, 592, 597, 663, 669, 673, 674
{Artistic License} PymmLib applications/glutviewer.py Lines: 163, 175
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 138, 150
pyBzEdit pyBzEdit.py Lines: 419, 425, 761, 777, 808, 810
{LGPL} PyUI pyui/renderers/openglBase.py Lines: 307, 312, 326, 328, 331, 343
{LGPL} PyUI pyui/renderers/openglPygame.py Lines: 181, 185, 193, 195
{LGPL} PyUI pyui/renderers/openglGlut.py Lines: 230, 233
{LGPL} PyUI tests/testcube.py Lines: 45
{LGPL} PyUI2 renderers/openglBase.py Lines: 307, 312, 326, 328, 331, 343
{LGPL} PyUI2 renderers/openglPygame.py Lines: 184, 188, 196, 198
{LGPL} PyUI2 renderers/openglGlut.py Lines: 230, 233
{LGPL} PyUI2 system/openglgraphics.py Lines: 185, 190, 204, 206, 209, 212
{LGPL} PyUI2 system/glutdevice.py Lines: 171, 174
{LGPL} VisionEgg test/conform.py Lines: 156, 215
{LGPL} VisionEgg VisionEgg/Dots.py Lines: 241, 365
{LGPL} VisionEgg VisionEgg/SphereMap.py Lines: 251, 528, 834, 1070, 1209
{LGPL} VisionEgg VisionEgg/MoreStimuli.py Lines: 111, 315
{LGPL} VisionEgg VisionEgg/Textures.py Lines: 1447, 1782, 1906
{LGPL} VisionEgg VisionEgg/Text.py Lines: 414, 478
{LGPL} VisionEgg VisionEgg/Gratings.py Lines: 328
{LGPL} VisionEgg VisionEgg/Core.py Lines: 554, 789, 794, 799, 804, 810, 823, 836, 873, 1073
{LGPL} PyMT examples/apps/3Dviewer/3Dviewer.py Lines: 45, 50, 57, 59, 61, 81, 153
{LGPL} PyMT examples/apps/3Ddrawing/3Ddrawing.py Lines: 36, 41, 48, 50, 52, 100, 108
{LGPL} PyMT pymt/graphx/statement.py Lines: 54, 175, 181
{LGPL} PyMT pymt/ui/window/__init__.py Lines: 19, 454, 466
{LGPL} Pyggel pyggel/data.py Lines: 548, 552, 610, 614
{LGPL} Pyggel pyggel/view.py Lines: 280, 285, 299, 303
{LGPL} pygl2d pygl2d/window.py Lines: 69, 73, 78, 80
{GPL} Scocca scocca/graphics/opengl/matrix.py Lines: 29
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/Old/SoC/simplecube.py Lines: 49, 53
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 20, 23
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 36, 43, 298, 308, 316, 319
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 145
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Object3D.py Lines: 119
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Progress3D.py Lines: 136
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/TexPlane.py Lines: 133
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Scrollbar3D.py Lines: 161
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/PygameWrapperPlane.py Lines: 141
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/SimpleCube.py Lines: 135
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Button3D.py Lines: 177
{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/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.py Lines: 21, 25
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Utils/Particles3D.py Lines: 248, 289, 313, 317, 332, 334, 337
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Utils/TopologyViewer3D.py Lines: 639
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube.py Lines: 21, 25
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube_controlled.py Lines: 73, 77
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 145
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Object3D.py Lines: 119
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Progress3D.py Lines: 136
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/TexPlane.py Lines: 133
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Scrollbar3D.py Lines: 161
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/PygameWrapperPlane.py Lines: 141
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/SimpleCube.py Lines: 135
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Button3D.py Lines: 177
{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
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 478, 753, 769, 778, 789, 859
Gloopy gloopy/view/modelview.py Lines: 24, 32
Gloopy gloopy/view/projection.py Lines: 39, 65, 75
Visvis core/axes.py Lines: 802, 805, 894, 897, 921, 924, 937, 940, 959, 962, 1019, 1023
Visvis core/cameras.py Lines: 680, 691, 1136, 1154, 1754, 1769
Visvis core/baseFigure.py Lines: 876, 879
{GPL3} OpenGL-Programmable 01-direct.py Lines: 59, 84, 119, 130
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 134, 193, 223, 234
{GPL3} OpenGL-Programmable 03-array.py Lines: 59, 100, 130, 141
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 154, 215, 256, 267
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 59, 89, 128, 139
{GPL3} OpenGL-Programmable 05-shader.py Lines: 126, 185, 215, 226
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 143, 204, 234, 245
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 60, 119, 149, 160