Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> |
2 | <!-- saved from url=(0013)about:internet --> | |
3 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glLoadTransposeMatrix</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glLoadTransposeMatrix"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glLoadTransposeMatrix — replace the current matrix with the specified row-major ordered matrix</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glLoadTransposeMatrixd</b>(</code></td><td>const GLdouble * </td><td><var class="pdparam">m</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glLoadTransposeMatrixf</b>(</code></td><td>const GLfloat * </td><td><var class="pdparam">m</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>m</code></em></span></dt><dd><p> | |
4 | Specifies a pointer to 16 consecutive values, which are used as the | |
5 | elements of a | |
6 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
7 | ||
8 | <mml:mrow> | |
9 | <mml:mn>4</mml:mn> | |
10 | <mml:mo>×</mml:mo> | |
11 | <mml:mn>4</mml:mn> | |
12 | </mml:mrow> | |
13 | </mml:math> | |
14 | row-major matrix. | |
15 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
16 | <code class="function">glLoadTransposeMatrix</code> replaces the current matrix with the one whose elements are specified by | |
17 | <em class="parameter"><code>m</code></em>. | |
18 | The current matrix is the projection matrix, | |
19 | modelview matrix, | |
20 | or texture matrix, | |
21 | depending on the current matrix mode | |
22 | (see <a class="citerefentry" href="glMatrixMode.xml"><span class="citerefentry"><span class="refentrytitle">glMatrixMode</span></span></a>). | |
23 | </p><p> | |
24 | The current matrix, M, defines a transformation of coordinates. | |
25 | For instance, assume M refers to the modelview matrix. | |
26 | If | |
27 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
28 | ||
29 | <mml:mrow> | |
30 | <mml:mi mathvariant="italic">v</mml:mi> | |
31 | <mml:mo>=</mml:mo> | |
32 | <mml:mfenced open="(" close=")"> | |
33 | <mml:mrow> | |
34 | <mml:mi mathvariant="italic">v</mml:mi> | |
35 | <mml:mo></mml:mo> | |
36 | <mml:mfenced open="[" close="]"> | |
37 | <mml:mn>0</mml:mn> | |
38 | </mml:mfenced> | |
39 | </mml:mrow> | |
40 | <mml:mrow> | |
41 | <mml:mi mathvariant="italic">v</mml:mi> | |
42 | <mml:mo></mml:mo> | |
43 | <mml:mfenced open="[" close="]"> | |
44 | <mml:mn>1</mml:mn> | |
45 | </mml:mfenced> | |
46 | </mml:mrow> | |
47 | <mml:mrow> | |
48 | <mml:mi mathvariant="italic">v</mml:mi> | |
49 | <mml:mo></mml:mo> | |
50 | <mml:mfenced open="[" close="]"> | |
51 | <mml:mn>2</mml:mn> | |
52 | </mml:mfenced> | |
53 | </mml:mrow> | |
54 | <mml:mrow> | |
55 | <mml:mi mathvariant="italic">v</mml:mi> | |
56 | <mml:mo></mml:mo> | |
57 | <mml:mfenced open="[" close="]"> | |
58 | <mml:mn>3</mml:mn> | |
59 | </mml:mfenced> | |
60 | </mml:mrow> | |
61 | </mml:mfenced> | |
62 | </mml:mrow> | |
63 | </mml:math> | |
64 | is the set of object coordinates | |
65 | of a vertex, | |
66 | and <em class="parameter"><code>m</code></em> points to an array of | |
67 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
68 | ||
69 | <mml:mn>16</mml:mn> | |
70 | </mml:math> | |
71 | single- or double-precision | |
72 | floating-point values | |
73 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
74 | ||
75 | <mml:mrow> | |
76 | <mml:mi mathvariant="italic">m</mml:mi> | |
77 | <mml:mo>=</mml:mo> | |
78 | <mml:mfenced open="{" close="}"> | |
79 | <mml:mrow> | |
80 | <mml:mi mathvariant="italic">m</mml:mi> | |
81 | <mml:mo></mml:mo> | |
82 | <mml:mfenced open="[" close="]"> | |
83 | <mml:mn>0</mml:mn> | |
84 | </mml:mfenced> | |
85 | </mml:mrow> | |
86 | <mml:mrow> | |
87 | <mml:mi mathvariant="italic">m</mml:mi> | |
88 | <mml:mo></mml:mo> | |
89 | <mml:mfenced open="[" close="]"> | |
90 | <mml:mn>1</mml:mn> | |
91 | </mml:mfenced> | |
92 | </mml:mrow> | |
93 | <mml:mi mathvariant="italic">...</mml:mi> | |
94 | <mml:mrow> | |
95 | <mml:mi mathvariant="italic">m</mml:mi> | |
96 | <mml:mo></mml:mo> | |
97 | <mml:mfenced open="[" close="]"> | |
98 | <mml:mn>15</mml:mn> | |
99 | </mml:mfenced> | |
100 | </mml:mrow> | |
101 | </mml:mfenced> | |
102 | </mml:mrow> | |
103 | </mml:math>, | |
104 | then the modelview transformation | |
105 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
106 | ||
107 | <mml:mrow> | |
108 | <mml:mi mathvariant="italic">M</mml:mi> | |
109 | <mml:mo></mml:mo> | |
110 | <mml:mfenced open="(" close=")"> | |
111 | <mml:mi mathvariant="italic">v</mml:mi> | |
112 | </mml:mfenced> | |
113 | </mml:mrow> | |
114 | </mml:math> | |
115 | does the following: | |
116 | </p><p> | |
117 | </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
118 | ||
119 | <mml:mrow> | |
120 | <mml:mrow> | |
121 | <mml:mi mathvariant="italic">M</mml:mi> | |
122 | <mml:mo></mml:mo> | |
123 | <mml:mfenced open="(" close=")"> | |
124 | <mml:mi mathvariant="italic">v</mml:mi> | |
125 | </mml:mfenced> | |
126 | </mml:mrow> | |
127 | <mml:mo>=</mml:mo> | |
128 | <mml:mrow> | |
129 | <mml:mfenced open="(" close=")"> | |
130 | <mml:mtable> | |
131 | <mml:mtr> | |
132 | <mml:mtd> | |
133 | <mml:mrow> | |
134 | <mml:mi mathvariant="italic">m</mml:mi> | |
135 | <mml:mo></mml:mo> | |
136 | <mml:mfenced open="[" close="]"> | |
137 | <mml:mn>0</mml:mn> | |
138 | </mml:mfenced> | |
139 | </mml:mrow> | |
140 | </mml:mtd> | |
141 | <mml:mtd> | |
142 | <mml:mrow> | |
143 | <mml:mi mathvariant="italic">m</mml:mi> | |
144 | <mml:mo></mml:mo> | |
145 | <mml:mfenced open="[" close="]"> | |
146 | <mml:mn>1</mml:mn> | |
147 | </mml:mfenced> | |
148 | </mml:mrow> | |
149 | </mml:mtd> | |
150 | <mml:mtd> | |
151 | <mml:mrow> | |
152 | <mml:mi mathvariant="italic">m</mml:mi> | |
153 | <mml:mo></mml:mo> | |
154 | <mml:mfenced open="[" close="]"> | |
155 | <mml:mn>2</mml:mn> | |
156 | </mml:mfenced> | |
157 | </mml:mrow> | |
158 | </mml:mtd> | |
159 | <mml:mtd> | |
160 | <mml:mrow> | |
161 | <mml:mi mathvariant="italic">m</mml:mi> | |
162 | <mml:mo></mml:mo> | |
163 | <mml:mfenced open="[" close="]"> | |
164 | <mml:mn>3</mml:mn> | |
165 | </mml:mfenced> | |
166 | </mml:mrow> | |
167 | </mml:mtd> | |
168 | </mml:mtr> | |
169 | <mml:mtr> | |
170 | <mml:mtd> | |
171 | <mml:mrow> | |
172 | <mml:mi mathvariant="italic">m</mml:mi> | |
173 | <mml:mo></mml:mo> | |
174 | <mml:mfenced open="[" close="]"> | |
175 | <mml:mn>4</mml:mn> | |
176 | </mml:mfenced> | |
177 | </mml:mrow> | |
178 | </mml:mtd> | |
179 | <mml:mtd> | |
180 | <mml:mrow> | |
181 | <mml:mi mathvariant="italic">m</mml:mi> | |
182 | <mml:mo></mml:mo> | |
183 | <mml:mfenced open="[" close="]"> | |
184 | <mml:mn>5</mml:mn> | |
185 | </mml:mfenced> | |
186 | </mml:mrow> | |
187 | </mml:mtd> | |
188 | <mml:mtd> | |
189 | <mml:mrow> | |
190 | <mml:mi mathvariant="italic">m</mml:mi> | |
191 | <mml:mo></mml:mo> | |
192 | <mml:mfenced open="[" close="]"> | |
193 | <mml:mn>6</mml:mn> | |
194 | </mml:mfenced> | |
195 | </mml:mrow> | |
196 | </mml:mtd> | |
197 | <mml:mtd> | |
198 | <mml:mrow> | |
199 | <mml:mi mathvariant="italic">m</mml:mi> | |
200 | <mml:mo></mml:mo> | |
201 | <mml:mfenced open="[" close="]"> | |
202 | <mml:mn>7</mml:mn> | |
203 | </mml:mfenced> | |
204 | </mml:mrow> | |
205 | </mml:mtd> | |
206 | </mml:mtr> | |
207 | <mml:mtr> | |
208 | <mml:mtd> | |
209 | <mml:mrow> | |
210 | <mml:mi mathvariant="italic">m</mml:mi> | |
211 | <mml:mo></mml:mo> | |
212 | <mml:mfenced open="[" close="]"> | |
213 | <mml:mn>8</mml:mn> | |
214 | </mml:mfenced> | |
215 | </mml:mrow> | |
216 | </mml:mtd> | |
217 | <mml:mtd> | |
218 | <mml:mrow> | |
219 | <mml:mi mathvariant="italic">m</mml:mi> | |
220 | <mml:mo></mml:mo> | |
221 | <mml:mfenced open="[" close="]"> | |
222 | <mml:mn>9</mml:mn> | |
223 | </mml:mfenced> | |
224 | </mml:mrow> | |
225 | </mml:mtd> | |
226 | <mml:mtd> | |
227 | <mml:mrow> | |
228 | <mml:mi mathvariant="italic">m</mml:mi> | |
229 | <mml:mo></mml:mo> | |
230 | <mml:mfenced open="[" close="]"> | |
231 | <mml:mn>10</mml:mn> | |
232 | </mml:mfenced> | |
233 | </mml:mrow> | |
234 | </mml:mtd> | |
235 | <mml:mtd> | |
236 | <mml:mrow> | |
237 | <mml:mi mathvariant="italic">m</mml:mi> | |
238 | <mml:mo></mml:mo> | |
239 | <mml:mfenced open="[" close="]"> | |
240 | <mml:mn>11</mml:mn> | |
241 | </mml:mfenced> | |
242 | </mml:mrow> | |
243 | </mml:mtd> | |
244 | </mml:mtr> | |
245 | <mml:mtr> | |
246 | <mml:mtd> | |
247 | <mml:mrow> | |
248 | <mml:mi mathvariant="italic">m</mml:mi> | |
249 | <mml:mo></mml:mo> | |
250 | <mml:mfenced open="[" close="]"> | |
251 | <mml:mn>12</mml:mn> | |
252 | </mml:mfenced> | |
253 | </mml:mrow> | |
254 | </mml:mtd> | |
255 | <mml:mtd> | |
256 | <mml:mrow> | |
257 | <mml:mi mathvariant="italic">m</mml:mi> | |
258 | <mml:mo></mml:mo> | |
259 | <mml:mfenced open="[" close="]"> | |
260 | <mml:mn>13</mml:mn> | |
261 | </mml:mfenced> | |
262 | </mml:mrow> | |
263 | </mml:mtd> | |
264 | <mml:mtd> | |
265 | <mml:mrow> | |
266 | <mml:mi mathvariant="italic">m</mml:mi> | |
267 | <mml:mo></mml:mo> | |
268 | <mml:mfenced open="[" close="]"> | |
269 | <mml:mn>14</mml:mn> | |
270 | </mml:mfenced> | |
271 | </mml:mrow> | |
272 | </mml:mtd> | |
273 | <mml:mtd> | |
274 | <mml:mrow> | |
275 | <mml:mi mathvariant="italic">m</mml:mi> | |
276 | <mml:mo></mml:mo> | |
277 | <mml:mfenced open="[" close="]"> | |
278 | <mml:mn>15</mml:mn> | |
279 | </mml:mfenced> | |
280 | </mml:mrow> | |
281 | </mml:mtd> | |
282 | </mml:mtr> | |
283 | </mml:mtable> | |
284 | </mml:mfenced> | |
285 | <mml:mo>×</mml:mo> | |
286 | <mml:mfenced open="(" close=")"> | |
287 | <mml:mtable> | |
288 | <mml:mtr> | |
289 | <mml:mtd> | |
290 | <mml:mrow> | |
291 | <mml:mi mathvariant="italic">v</mml:mi> | |
292 | <mml:mo></mml:mo> | |
293 | <mml:mfenced open="[" close="]"> | |
294 | <mml:mn>0</mml:mn> | |
295 | </mml:mfenced> | |
296 | </mml:mrow> | |
297 | </mml:mtd> | |
298 | </mml:mtr> | |
299 | <mml:mtr> | |
300 | <mml:mtd> | |
301 | <mml:mrow> | |
302 | <mml:mi mathvariant="italic">v</mml:mi> | |
303 | <mml:mo></mml:mo> | |
304 | <mml:mfenced open="[" close="]"> | |
305 | <mml:mn>1</mml:mn> | |
306 | </mml:mfenced> | |
307 | </mml:mrow> | |
308 | </mml:mtd> | |
309 | </mml:mtr> | |
310 | <mml:mtr> | |
311 | <mml:mtd> | |
312 | <mml:mrow> | |
313 | <mml:mi mathvariant="italic">v</mml:mi> | |
314 | <mml:mo></mml:mo> | |
315 | <mml:mfenced open="[" close="]"> | |
316 | <mml:mn>2</mml:mn> | |
317 | </mml:mfenced> | |
318 | </mml:mrow> | |
319 | </mml:mtd> | |
320 | </mml:mtr> | |
321 | <mml:mtr> | |
322 | <mml:mtd> | |
323 | <mml:mrow> | |
324 | <mml:mi mathvariant="italic">v</mml:mi> | |
325 | <mml:mo></mml:mo> | |
326 | <mml:mfenced open="[" close="]"> | |
327 | <mml:mn>3</mml:mn> | |
328 | </mml:mfenced> | |
329 | </mml:mrow> | |
330 | </mml:mtd> | |
331 | </mml:mtr> | |
332 | </mml:mtable> | |
333 | </mml:mfenced> | |
334 | </mml:mrow> | |
335 | </mml:mrow> | |
336 | </mml:math></div><p> | |
337 | </p><p> | |
338 | </p><p> | |
339 | Projection and texture transformations are similarly defined. | |
340 | </p><p> | |
341 | Calling <code class="function">glLoadTransposeMatrix</code> with matrix | |
342 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">M</mml:mi></mml:math> | |
343 | is identical in operation to | |
344 | <a class="citerefentry" href="glLoadMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glLoadMatrix</span></span></a> with | |
345 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
346 | ||
347 | <mml:msup><mml:mi mathvariant="italic">M</mml:mi> | |
348 | <mml:mi mathvariant="italic">T</mml:mi> | |
349 | </mml:msup> | |
350 | </mml:math>, | |
351 | where | |
352 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">T</mml:mi></mml:math> | |
353 | represents the transpose. | |
354 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
355 | <code class="function">glLoadTransposeMatrix</code> is available only if the GL version is 1.3 or greater. | |
356 | </p><p> | |
357 | While the elements of the matrix may be specified with | |
358 | single or double precision, the GL implementation may | |
359 | store or operate on these values in less than single | |
360 | precision. | |
361 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
362 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glLoadTransposeMatrix</code> | |
363 | is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> | |
364 | and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>. | |
365 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
366 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MATRIX_MODE</code> | |
367 | </p><p> | |
368 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_COLOR_MATRIX</code> | |
369 | </p><p> | |
370 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MODELVIEW_MATRIX</code> | |
371 | </p><p> | |
372 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PROJECTION_MATRIX</code> | |
373 | </p><p> | |
374 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_TEXTURE_MATRIX</code> | |
375 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
376 | <a class="citerefentry" href="glLoadIdentity.xml"><span class="citerefentry"><span class="refentrytitle">glLoadIdentity</span></span></a>, | |
377 | <a class="citerefentry" href="glLoadMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glLoadMatrix</span></span></a>, | |
378 | <a class="citerefentry" href="glMatrixMode.xml"><span class="citerefentry"><span class="refentrytitle">glMatrixMode</span></span></a>, | |
379 | <a class="citerefentry" href="glMultMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glMultMatrix</span></span></a>, | |
380 | <a class="citerefentry" href="glMultTransposeMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glMultTransposeMatrix</span></span></a>, | |
381 | <a class="citerefentry" href="glPushMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPushMatrix</span></span></a> | |
382 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
383 | Copyright <span class="trademark"></span>© 1991-2006 | |
384 | Silicon Graphics, Inc. This document is licensed under the SGI | |
385 | Free Software B License. For details, see | |
386 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
387 | </p></div></div></body></html> |