1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glMatrixMode">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glMatrixMode
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glMatrixMode
</refname>
17 <refpurpose>specify which matrix is the current matrix
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glMatrixMode
</function></funcdef>
23 <paramdef>GLenum
<parameter>mode
</parameter></paramdef>
27 <refsect1 id=
"parameters"><title>Parameters
</title>
30 <term><parameter>mode
</parameter></term>
33 Specifies which matrix stack is the target
34 for subsequent matrix operations.
35 Three values are accepted:
36 <constant>GL_MODELVIEW
</constant>,
37 <constant>GL_PROJECTION
</constant>, and
38 <constant>GL_TEXTURE
</constant>.
39 The initial value is
<constant>GL_MODELVIEW
</constant>.
40 Additionally, if the
<code>ARB_imaging
</code> extension is supported,
41 <constant>GL_COLOR
</constant> is also accepted.
47 <refsect1 id=
"description"><title>Description
</title>
49 <function>glMatrixMode
</function> sets the current matrix mode.
50 <parameter>mode
</parameter> can assume one of four values:
54 <term><constant>GL_MODELVIEW
</constant></term>
57 Applies subsequent matrix operations to the modelview matrix stack.
62 <term><constant>GL_PROJECTION
</constant></term>
65 Applies subsequent matrix operations to the projection matrix stack.
70 <term><constant>GL_TEXTURE
</constant></term>
73 Applies subsequent matrix operations to the texture matrix stack.
78 <term><constant>GL_COLOR
</constant></term>
81 Applies subsequent matrix operations to the color matrix stack.
87 To find out which matrix stack is currently the target of all matrix
88 operations, call
<citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MATRIX_MODE
</constant>. The initial
89 value is
<constant>GL_MODELVIEW
</constant>.
92 <refsect1 id=
"errors"><title>Errors
</title>
94 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>mode
</parameter> is not an accepted value.
97 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glMatrixMode
</function>
98 is executed between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>
99 and the corresponding execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
102 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
104 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MATRIX_MODE
</constant>
107 <refsect1 id=
"seealso"><title>See Also
</title>
109 <citerefentry><refentrytitle>glLoadMatrix
</refentrytitle></citerefentry>,
110 <citerefentry><refentrytitle>glLoadTransposeMatrix
</refentrytitle></citerefentry>,
111 <citerefentry><refentrytitle>glMultMatrix
</refentrytitle></citerefentry>,
112 <citerefentry><refentrytitle>glMultTransposeMatrix
</refentrytitle></citerefentry>,
113 <citerefentry><refentrytitle>glPopMatrix
</refentrytitle></citerefentry>,
114 <citerefentry><refentrytitle>glPushMatrix
</refentrytitle></citerefentry>
117 <refsect1 id=
"Copyright"><title>Copyright
</title>
119 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
120 Silicon Graphics, Inc. This document is licensed under the SGI
121 Free Software B License. For details, see
122 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.