glMultMatrixd, glMultMatrixf

The glMultMatrixd and glMultMatrixf functions multiply the current matrix by an arbitrary matrix.

void glMultMatrixd(
  const GLdouble *m   
);
 
void glMultMatrixf(
  const GLfloat *m   
);
 

Parameters

m
A pointer to a 4x4 matrix stored in column-major order as 16 consecutive values.

Remarks

The glMultMatrix function multiplies the current matrix by the one specified in m. That is, if M is the current matrix and T is the matrix passed to glMultMatrix, then M is replaced with M · T.

The current matrix is the projection matrix, modelview matrix, or texture matrix, determined by the current matrix mode (see glMatrixMode).

The m parameter points to a 4x4 matrix of single- or double-precision floating-point values stored in column-major order. That is, the matrix is stored as:

The following functions retrieve information related to glMultMatrix:

glGet with argument GL_MATRIX_MODE

glGet with argument GL_MODELVIEW_MATRIX

glGet with argument GL_PROJECTION_MATRIX

glGet with argument GL_TEXTURE_MATRIX

Error Codes

The following are the error codes generated and their conditions.

Error Code Condition
GL_INVALID_OPERATION glMultMatrix was called between a call to glBegin and the corresponding call to glEnd.

QuickInfo

  Windows NT: Use version 3.5 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in gl.h.
  Import Library: Link with opengl32.lib.

See Also

glBegin, glEnd, glLoadIdentity, glLoadMatrix, glMatrixMode, glPushMatrix