Export (0) Print
Expand All

glLoadMatrixd, glLoadMatrixf

The glLoadMatrixd and glLoadMatrixf functions replace the current matrix with an arbitrary matrix.

void glLoadMatrixd(
  const GLdouble *m
);

void glLoadMatrixf(
  const GLfloat *m
);

Parameters

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

Remarks

The glLoadMatrix function replaces the current matrix with the one specified in m. 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 follows:

The following functions retrieve information related to glLoadMatrix:

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 is the error code and its condition.

Error code Condition
GL_INVALID_OPERATION glLoadMatrix was called between a call to glBegin and the corresponding call to glEnd.

Requirements

  Windows NT/2000: Requires Windows NT 3.5 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Gl.h.
  Library: Use Opengl32.lib.

See Also

glBegin, glEnd, glLoadIdentity, glMatrixMode, glMultMatrix, glPushMatrix


  

Community Additions

Show:
© 2014 Microsoft