[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]

*GL3.2 for AIX: Graphics Library (GL) Technical Reference*

## loadmatrix Subroutine

### Purpose

Loads a transformation matrix.

### Libraries

Graphics Library

C (**libgl.a**)

FORTRAN (**libfgl.a**)

### C Syntax

**void loadmatrix(Matrix ***matrix***)**

### FORTRAN Syntax

**SUBROUTINE LOADMA(***matrix***)**
**REAL ***matrix***(4,4)**

### Description

The **loadmatrix** subroutine loads a 4x4 floating point matrix onto the
transformation stack, replacing the current top matrix. If the system is in projection matrix mode (`mmode(MPROJ);),`
the projection matrix is replaced.

Be sure to exit projection matrix mode before performing any drawing because drawing is not enabled while in this mode.

**Note: **The operation of this subroutine for the Supergraphics Processor Subsystem is modified. (See "Hardware Considerations" in* GL3.2 Version 4 for AIX: Programming Concepts*.)

### Parameter

*matrix* |
Specifies the matrix to be loaded onto the
matrix stack. |

### Example

After changing the matrix mode to **MVIEWING** with the **mmode** subroutine, the example C language program **localatten.c** uses the **loadmatrix** subroutine to load the modelling/viewing matrix with the identity matrix.

### Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

### Files

**/usr/include/gl/gl.h** |
Contains C language constant and variable type definitions for GL. |

**/usr/include/gl/fgl.h** |
Contains FORTRAN constant and variable type definitions for GL. |

### Related Information

Setting the current matrix mode with the **mmode** subroutine.

Getting a copy of the current transformation matrix with the **getmatrix** subroutine.

Premultiplying the current transformation matrix with the **multmatrix** subroutine.

Popping the transformation matrix stack with the **popmatrix** subroutine.

Pushing down the transformation matrix stack with the **pushmatrix** subroutine.

AIX Graphics Library Overview, Working with Coordinate Systems.

[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]