/ comp / gb.opengl / gl / matrixmode
Gl.MatrixMode (gb.opengl)
Syntax

    STATIC SUB MatrixMode ( Mode AS Integer )

### Specify which matrix is the current matrix

#### Parameters

- Mode specifies which matrix stack is the target for subsequent matrix operations. Three values are accepted: Gl.GL_MODELVIEW, Gl.GL_PROJECTION, and Gl.GL_TEXTURE. The default value is Gl.GL_MODELVIEW.

#### Description

Gl.MatrixMode sets the current matrix mode. mode can assume one of three values:

- Gl.GL_MODELVIEW applies subsequent matrix operations to the modelview matrix stack.

- Gl.GL_PROJECTION applies subsequent matrix operations to the projection matrix stack.

- Gl.GL_TEXTURE applies subsequent matrix operations to the texture matrix stack.

#### Errors

Gl.GL_INVALID_ENUM is generated if mode is not an accepted value.
Gl.GL_INVALID_OPERATION is generated if Gl.MatrixMode is called between a call to Gl.Begin and the corresponding call to Gl.End.

#### Associated Gets

Gl.GetMatrixMode

### See also

Gl.LoadMatrix, Gl.PushMatrix