Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glMatrixMode</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glMatrixMode</refname> | |
17 | <refpurpose>specify which matrix is the current matrix</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glMatrixMode</function></funcdef> | |
23 | <paramdef>GLenum <parameter>mode</parameter></paramdef> | |
24 | </funcprototype> | |
25 | </funcsynopsis> | |
26 | </refsynopsisdiv> | |
27 | <refsect1 id="parameters"><title>Parameters</title> | |
28 | <variablelist> | |
29 | <varlistentry> | |
30 | <term><parameter>mode</parameter></term> | |
31 | <listitem> | |
32 | <para> | |
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. | |
42 | </para> | |
43 | </listitem> | |
44 | </varlistentry> | |
45 | </variablelist> | |
46 | </refsect1> | |
47 | <refsect1 id="description"><title>Description</title> | |
48 | <para> | |
49 | <function>glMatrixMode</function> sets the current matrix mode. | |
50 | <parameter>mode</parameter> can assume one of four values: | |
51 | </para> | |
52 | <variablelist> | |
53 | <varlistentry> | |
54 | <term><constant>GL_MODELVIEW</constant></term> | |
55 | <listitem> | |
56 | <para> | |
57 | Applies subsequent matrix operations to the modelview matrix stack. | |
58 | </para> | |
59 | </listitem> | |
60 | </varlistentry> | |
61 | <varlistentry> | |
62 | <term><constant>GL_PROJECTION</constant></term> | |
63 | <listitem> | |
64 | <para> | |
65 | Applies subsequent matrix operations to the projection matrix stack. | |
66 | </para> | |
67 | </listitem> | |
68 | </varlistentry> | |
69 | <varlistentry> | |
70 | <term><constant>GL_TEXTURE</constant></term> | |
71 | <listitem> | |
72 | <para> | |
73 | Applies subsequent matrix operations to the texture matrix stack. | |
74 | </para> | |
75 | </listitem> | |
76 | </varlistentry> | |
77 | <varlistentry> | |
78 | <term><constant>GL_COLOR</constant></term> | |
79 | <listitem> | |
80 | <para> | |
81 | Applies subsequent matrix operations to the color matrix stack. | |
82 | </para> | |
83 | </listitem> | |
84 | </varlistentry> | |
85 | </variablelist> | |
86 | <para> | |
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>. | |
90 | </para> | |
91 | </refsect1> | |
92 | <refsect1 id="errors"><title>Errors</title> | |
93 | <para> | |
94 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value. | |
95 | </para> | |
96 | <para> | |
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>. | |
100 | </para> | |
101 | </refsect1> | |
102 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
103 | <para> | |
104 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MATRIX_MODE</constant> | |
105 | </para> | |
106 | </refsect1> | |
107 | <refsect1 id="seealso"><title>See Also</title> | |
108 | <para> | |
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> | |
115 | </para> | |
116 | </refsect1> | |
117 | <refsect1 id="Copyright"><title>Copyright</title> | |
118 | <para> | |
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>. | |
123 | </para> | |
124 | </refsect1> | |
125 | </refentry> |