The glLoadIdentity function replaces the current matrix with the identity matrix.
void glLoadIdentity(
void
);
The glLoadIdentity function replaces the current matrix with the identity matrix. It is semantically equivalent to calling glLoadMatrix with the identity matrix
but in some cases it is more efficient.
The following functions retrieve information related to glLoadIdentity:
glGet with argument GL_MATRIX_MODE
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX
The following are the error codes generated and their conditions.
Error Code | Condition |
---|---|
GL_INVALID_OPERATION | glLoadIdentity was called between a call to glBegin and the corresponding call to glEnd. |
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.
glBegin, glEnd, glLoadMatrix, glMatrixMode, glMultMatrix, glPushMatrix