1GLMULTMATRIX(3G)                 OpenGL Manual                GLMULTMATRIX(3G)
2
3
4

NAME

6       glMultMatrix - multiply the current matrix with the specified matrix
7

C SPECIFICATION

9       void glMultMatrixd(const GLdouble * m);
10
11       void glMultMatrixf(const GLfloat * m);
12

PARAMETERS

14       m
15           Points to 16 consecutive values that are used as the elements of a
16           4 × 4 column-major matrix.
17

DESCRIPTION

19       glMultMatrix multiplies the current matrix with the one specified using
20       m, and replaces the current matrix with the product.
21
22       The current matrix is determined by the current matrix mode (see
23       glMatrixMode()). It is either the projection matrix, modelview matrix,
24       or the texture matrix.
25

EXAMPLES

27       If the current matrix is C and the coordinates to be transformed are v
28       = v ⁡ 0 v ⁡ 1 v ⁡ 2 v ⁡ 3, then the current transformation is C × v, or
29
30       c ⁡ 0 c ⁡ 4 c ⁡ 8 c ⁡ 12 c ⁡ 1 c ⁡ 5 c ⁡ 9 c ⁡ 13 c ⁡ 2 c ⁡ 6 c ⁡ 10 c
31       ⁡ 14 c ⁡ 3 c ⁡ 7 c ⁡ 11 c ⁡ 15 × v ⁡ 0 v ⁡ 1 v ⁡ 2 v ⁡ 3
32
33       Calling glMultMatrix with an argument of m = m ⁡ 0 m ⁡ 1 ... m ⁡ 15
34       replaces the current transformation with C × M × v, or
35
36       c ⁡ 0 c ⁡ 4 c ⁡ 8 c ⁡ 12 c ⁡ 1 c ⁡ 5 c ⁡ 9 c ⁡ 13 c ⁡ 2 c ⁡ 6 c ⁡ 10 c
37       ⁡ 14 c ⁡ 3 c ⁡ 7 c ⁡ 11 c ⁡ 15 × m ⁡ 0 m ⁡ 4 m ⁡ 8 m ⁡ 12 m ⁡ 1 m ⁡ 5 m
38       ⁡ 9 m ⁡ 13 m ⁡ 2 m ⁡ 6 m ⁡ 10 m ⁡ 14 m ⁡ 3 m ⁡ 7 m ⁡ 11 m ⁡ 15 × v ⁡ 0
39       v ⁡ 1 v ⁡ 2 v ⁡ 3
40
41       Where v is represented as a 4 × 1 matrix.
42

NOTES

44       While the elements of the matrix may be specified with single or double
45       precision, the GL may store or operate on these values in
46       less-than-single precision.
47
48       In many computer languages, 4 × 4 arrays are represented in row-major
49       order. The transformations just described represent these matrices in
50       column-major order. The order of the multiplication is important. For
51       example, if the current transformation is a rotation, and glMultMatrix
52       is called with a translation matrix, the translation is done directly
53       on the coordinates to be transformed, while the rotation is done on the
54       results of that translation.
55

ERRORS

57       GL_INVALID_OPERATION is generated if glMultMatrix is executed between
58       the execution of glBegin() and the corresponding execution of glEnd().
59

ASSOCIATED GETS

61       glGet() with argument GL_MATRIX_MODE
62
63       glGet() with argument GL_COLOR_MATRIX
64
65       glGet() with argument GL_MODELVIEW_MATRIX
66
67       glGet() with argument GL_PROJECTION_MATRIX
68
69       glGet() with argument GL_TEXTURE_MATRIX
70

SEE ALSO

72       glLoadIdentity(), glLoadMatrix(), glLoadTransposeMatrix(),
73       glMatrixMode(), glMultTransposeMatrix(), glPushMatrix()
74
76       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
77       under the SGI Free Software B License. For details, see
78       http://oss.sgi.com/projects/FreeB/.
79

AUTHORS

81       opengl.org
82
83
84
85opengl.org                        06/10/2014                  GLMULTMATRIX(3G)
Impressum