Export (0) Print
Expand All

glLoadMatrixf function

Applies to: desktop apps only

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

Syntax

void WINAPI glLoadMatrixf(
  const GLfloat *m
);

Parameters

m

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

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

The function was called between a call to glBegin and the corresponding call to glEnd.

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-precision or double-precision floating-point values stored in column-major order. That is, the matrix is stored as shown in the following image.

Ee872049.load02(en-us,VS.85).png

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

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Gl.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

glBegin
glEnd
glLoadIdentity
glMatrixMode
glMultMatrix
glPushMatrix

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft