glLoadMatrix

NAME

glLoadMatrixd, glLoadMatrixf - replace the current matrix with the specified matrix

C SPECIFICATION

void glLoadMatrixd(const GLdouble *m)
void glLoadMatrixf(const GLfloat *m)

PARAMETERS

m Specifies a pointer to 16 consecutive values, which are used as the elements of a 4x4 column-major matrix.

DESCRIPTION

glLoadMatrix replaces the current matrix with the one whose elements are specified by m. The current matrix is the projection matrix, modelview matrix, or texture matrix, depending on the current matrix mode (see glMatrixMode).

m 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 follows:

|m0m4 m8m12|
|m1m5 m9m13|
|m2m6 m10m14|
|m3m7 m11m15|

NOTES

While the elements of the matrix may be specified with single or double precision, the GL implementation may store or operate on these values in less than single precision.

ERRORS

GL_INVALID_OPERATION is generated if glLoadMatrix is executed between the execution of glBegin and the corresponding execution of glEnd.

ASSOCIATED GETS

glGet with argument GL_MATRIX_MODE
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX

SEE ALSO

glLoadIdentity, glMatrixMode, glMultMatrix, glPushMatrix