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>glMultMatrix
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glMultMatrix"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glMultMatrix — multiply the current matrix with the specified 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">glMultMatrixd
</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">glMultMatrixf
</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 Points to
16 consecutive values that are used as the elements of
6 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
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">glMultMatrix
</code> multiplies the current matrix with the one specified using
<em class=
"parameter"><code>m
</code></em>, and
17 replaces the current matrix with the product.
19 The current matrix is determined by the current matrix mode (see
<a class=
"citerefentry" href=
"glMatrixMode.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMatrixMode
</span></span></a>). It is either the projection matrix,
21 or the texture matrix.
22 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"examples"></a><h2>Examples
</h2><p>
23 If the current matrix is
24 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">C
</mml:mi></mml:math>
27 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
30 <mml:mi mathvariant=
"italic">v
</mml:mi>
32 <mml:mfenced open=
"(" close=
")">
34 <mml:mi mathvariant=
"italic">v
</mml:mi>
36 <mml:mfenced open=
"[" close=
"]">
41 <mml:mi mathvariant=
"italic">v
</mml:mi>
43 <mml:mfenced open=
"[" close=
"]">
48 <mml:mi mathvariant=
"italic">v
</mml:mi>
50 <mml:mfenced open=
"[" close=
"]">
55 <mml:mi mathvariant=
"italic">v
</mml:mi>
57 <mml:mfenced open=
"[" close=
"]">
64 then the current transformation is
65 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
68 <mml:mi mathvariant=
"italic">C
</mml:mi>
70 <mml:mi mathvariant=
"italic">v
</mml:mi>
75 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
78 <mml:mfenced open=
"(" close=
")">
83 <mml:mi mathvariant=
"italic">c
</mml:mi>
85 <mml:mfenced open=
"[" close=
"]">
92 <mml:mi mathvariant=
"italic">c
</mml:mi>
94 <mml:mfenced open=
"[" close=
"]">
101 <mml:mi mathvariant=
"italic">c
</mml:mi>
103 <mml:mfenced open=
"[" close=
"]">
110 <mml:mi mathvariant=
"italic">c
</mml:mi>
112 <mml:mfenced open=
"[" close=
"]">
121 <mml:mi mathvariant=
"italic">c
</mml:mi>
123 <mml:mfenced open=
"[" close=
"]">
130 <mml:mi mathvariant=
"italic">c
</mml:mi>
132 <mml:mfenced open=
"[" close=
"]">
139 <mml:mi mathvariant=
"italic">c
</mml:mi>
141 <mml:mfenced open=
"[" close=
"]">
148 <mml:mi mathvariant=
"italic">c
</mml:mi>
150 <mml:mfenced open=
"[" close=
"]">
159 <mml:mi mathvariant=
"italic">c
</mml:mi>
161 <mml:mfenced open=
"[" close=
"]">
168 <mml:mi mathvariant=
"italic">c
</mml:mi>
170 <mml:mfenced open=
"[" close=
"]">
177 <mml:mi mathvariant=
"italic">c
</mml:mi>
179 <mml:mfenced open=
"[" close=
"]">
186 <mml:mi mathvariant=
"italic">c
</mml:mi>
188 <mml:mfenced open=
"[" close=
"]">
197 <mml:mi mathvariant=
"italic">c
</mml:mi>
199 <mml:mfenced open=
"[" close=
"]">
206 <mml:mi mathvariant=
"italic">c
</mml:mi>
208 <mml:mfenced open=
"[" close=
"]">
215 <mml:mi mathvariant=
"italic">c
</mml:mi>
217 <mml:mfenced open=
"[" close=
"]">
224 <mml:mi mathvariant=
"italic">c
</mml:mi>
226 <mml:mfenced open=
"[" close=
"]">
235 <mml:mfenced open=
"(" close=
")">
240 <mml:mi mathvariant=
"italic">v
</mml:mi>
242 <mml:mfenced open=
"[" close=
"]">
251 <mml:mi mathvariant=
"italic">v
</mml:mi>
253 <mml:mfenced open=
"[" close=
"]">
262 <mml:mi mathvariant=
"italic">v
</mml:mi>
264 <mml:mfenced open=
"[" close=
"]">
273 <mml:mi mathvariant=
"italic">v
</mml:mi>
275 <mml:mfenced open=
"[" close=
"]">
287 Calling
<code class=
"function">glMultMatrix
</code> with an argument of
288 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
291 <mml:mi mathvariant=
"italic">m
</mml:mi>
293 <mml:mfenced open=
"{" close=
"}">
295 <mml:mi mathvariant=
"italic">m
</mml:mi>
297 <mml:mfenced open=
"[" close=
"]">
302 <mml:mi mathvariant=
"italic">m
</mml:mi>
304 <mml:mfenced open=
"[" close=
"]">
308 <mml:mi mathvariant=
"italic">...
</mml:mi>
310 <mml:mi mathvariant=
"italic">m
</mml:mi>
312 <mml:mfenced open=
"[" close=
"]">
319 replaces the current transformation with
320 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
323 <mml:mfenced open=
"(" close=
")">
325 <mml:mi mathvariant=
"italic">C
</mml:mi>
327 <mml:mi mathvariant=
"italic">M
</mml:mi>
331 <mml:mi mathvariant=
"italic">v
</mml:mi>
336 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
339 <mml:mfenced open=
"(" close=
")">
344 <mml:mi mathvariant=
"italic">c
</mml:mi>
346 <mml:mfenced open=
"[" close=
"]">
353 <mml:mi mathvariant=
"italic">c
</mml:mi>
355 <mml:mfenced open=
"[" close=
"]">
362 <mml:mi mathvariant=
"italic">c
</mml:mi>
364 <mml:mfenced open=
"[" close=
"]">
371 <mml:mi mathvariant=
"italic">c
</mml:mi>
373 <mml:mfenced open=
"[" close=
"]">
382 <mml:mi mathvariant=
"italic">c
</mml:mi>
384 <mml:mfenced open=
"[" close=
"]">
391 <mml:mi mathvariant=
"italic">c
</mml:mi>
393 <mml:mfenced open=
"[" close=
"]">
400 <mml:mi mathvariant=
"italic">c
</mml:mi>
402 <mml:mfenced open=
"[" close=
"]">
409 <mml:mi mathvariant=
"italic">c
</mml:mi>
411 <mml:mfenced open=
"[" close=
"]">
420 <mml:mi mathvariant=
"italic">c
</mml:mi>
422 <mml:mfenced open=
"[" close=
"]">
429 <mml:mi mathvariant=
"italic">c
</mml:mi>
431 <mml:mfenced open=
"[" close=
"]">
438 <mml:mi mathvariant=
"italic">c
</mml:mi>
440 <mml:mfenced open=
"[" close=
"]">
447 <mml:mi mathvariant=
"italic">c
</mml:mi>
449 <mml:mfenced open=
"[" close=
"]">
458 <mml:mi mathvariant=
"italic">c
</mml:mi>
460 <mml:mfenced open=
"[" close=
"]">
467 <mml:mi mathvariant=
"italic">c
</mml:mi>
469 <mml:mfenced open=
"[" close=
"]">
476 <mml:mi mathvariant=
"italic">c
</mml:mi>
478 <mml:mfenced open=
"[" close=
"]">
485 <mml:mi mathvariant=
"italic">c
</mml:mi>
487 <mml:mfenced open=
"[" close=
"]">
496 <mml:mfenced open=
"(" close=
")">
501 <mml:mi mathvariant=
"italic">m
</mml:mi>
503 <mml:mfenced open=
"[" close=
"]">
510 <mml:mi mathvariant=
"italic">m
</mml:mi>
512 <mml:mfenced open=
"[" close=
"]">
519 <mml:mi mathvariant=
"italic">m
</mml:mi>
521 <mml:mfenced open=
"[" close=
"]">
528 <mml:mi mathvariant=
"italic">m
</mml:mi>
530 <mml:mfenced open=
"[" close=
"]">
539 <mml:mi mathvariant=
"italic">m
</mml:mi>
541 <mml:mfenced open=
"[" close=
"]">
548 <mml:mi mathvariant=
"italic">m
</mml:mi>
550 <mml:mfenced open=
"[" close=
"]">
557 <mml:mi mathvariant=
"italic">m
</mml:mi>
559 <mml:mfenced open=
"[" close=
"]">
566 <mml:mi mathvariant=
"italic">m
</mml:mi>
568 <mml:mfenced open=
"[" close=
"]">
577 <mml:mi mathvariant=
"italic">m
</mml:mi>
579 <mml:mfenced open=
"[" close=
"]">
586 <mml:mi mathvariant=
"italic">m
</mml:mi>
588 <mml:mfenced open=
"[" close=
"]">
595 <mml:mi mathvariant=
"italic">m
</mml:mi>
597 <mml:mfenced open=
"[" close=
"]">
604 <mml:mi mathvariant=
"italic">m
</mml:mi>
606 <mml:mfenced open=
"[" close=
"]">
615 <mml:mi mathvariant=
"italic">m
</mml:mi>
617 <mml:mfenced open=
"[" close=
"]">
624 <mml:mi mathvariant=
"italic">m
</mml:mi>
626 <mml:mfenced open=
"[" close=
"]">
633 <mml:mi mathvariant=
"italic">m
</mml:mi>
635 <mml:mfenced open=
"[" close=
"]">
642 <mml:mi mathvariant=
"italic">m
</mml:mi>
644 <mml:mfenced open=
"[" close=
"]">
653 <mml:mfenced open=
"(" close=
")">
658 <mml:mi mathvariant=
"italic">v
</mml:mi>
660 <mml:mfenced open=
"[" close=
"]">
669 <mml:mi mathvariant=
"italic">v
</mml:mi>
671 <mml:mfenced open=
"[" close=
"]">
680 <mml:mi mathvariant=
"italic">v
</mml:mi>
682 <mml:mfenced open=
"[" close=
"]">
691 <mml:mi mathvariant=
"italic">v
</mml:mi>
693 <mml:mfenced open=
"[" close=
"]">
706 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">v
</mml:mi></mml:math>
708 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
717 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"notes"></a><h2>Notes
</h2><p>
718 While the elements of the matrix may be specified with
719 single or double precision, the GL may store or operate on these
720 values in less-than-single precision.
722 In many computer languages,
723 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
731 arrays are represented
732 in row-major order. The transformations just described
733 represent these matrices in column-major order.
734 The order of the multiplication is important. For example, if the current
735 transformation is a rotation, and
<code class=
"function">glMultMatrix
</code> is called with a translation matrix,
736 the translation is done directly on the coordinates to be transformed,
737 while the rotation is done on the results of that translation.
738 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
739 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glMultMatrix
</code>
740 is executed between the execution of
<a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>
741 and the corresponding execution of
<a class=
"citerefentry" href=
"glEnd.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnd
</span></span></a>.
742 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
743 <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>
745 <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>
747 <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>
749 <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>
751 <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>
752 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
753 <a class=
"citerefentry" href=
"glLoadIdentity.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glLoadIdentity
</span></span></a>,
754 <a class=
"citerefentry" href=
"glLoadMatrix.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glLoadMatrix
</span></span></a>,
755 <a class=
"citerefentry" href=
"glLoadTransposeMatrix.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glLoadTransposeMatrix
</span></span></a>,
756 <a class=
"citerefentry" href=
"glMatrixMode.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMatrixMode
</span></span></a>,
757 <a class=
"citerefentry" href=
"glMultTransposeMatrix.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMultTransposeMatrix
</span></span></a>,
758 <a class=
"citerefentry" href=
"glPushMatrix.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPushMatrix
</span></span></a>
759 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
760 Copyright
<span class=
"trademark"></span>©
1991-
2006
761 Silicon Graphics, Inc. This document is licensed under the SGI
762 Free Software B License. For details, see
763 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
764 </p></div></div></body></html>