[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
OpenGL 1.2 for AIX: Reference Manual

glMatrixMode Subroutine

Purpose

Specifies the current matrix.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glMatrixMode(GLenum Mode)

Description

The glMatrixMode subroutine sets the current matrix mode. The Mode parameter can assume one of the following three values:

GL_MODELVIEW Applies subsequent matrix operations to the model view matrix stack.
GL_PROJECTION Applies subsequent matrix operations to the projection matrix stack.
GL_TEXTURE Applies subsequent matrix operations to the texture matrix stack.

Parameters

Mode Specifies which matrix stack is the target for subsequent matrix operations. The following three values are accepted:
  • GL_MODELVIEW
  • GL_PROJECTION
  • GL_TEXTURE

Associated Gets

Associated gets for the glMatrixMode subroutine are as follows. (See the glGet subroutine for more information.)

glGet with argument GL_MATRIX_MODE.

Errors

GL_INVALID_ENUM Mode is not an accepted value.
GL_INVALID_OPERATION The glMatrixMode subroutine is called between a call to glBegin and the corresponding call to glEnd.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glLoadMatrix subroutine, glPushMatrix subroutine.

OpenGL Overview.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]