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

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

## pushmatrix Subroutine

### Purpose

Pushes down the transformation matrix stack.

### Libraries

Graphics Library

C (**libgl.a**)

FORTRAN (**libfgl.a**)

### C Syntax

**void pushmatrix( )**

### FORTRAN Syntax

**SUBROUTINE PUSHMA**

### Description

The **pushmatrix **subroutine pushes down the transformation
matrix stack, duplicating the current matrix. For example, if the stack contains one matrix, *M, *after a call to the **pushmatrix **subroutine, the matrix contains two copies of *M. *The top copy can be modified.

This subroutine is not valid when the system is in projection matrix mode (`mmode(MPROJ);),` because the matrix stack is not accessible in this mode.

### Example

The example C language program **backface.c** uses the **pushmatrix** subroutine to save the current transformation matrix before altering it with the **translate** modeling subroutine.

### 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

Changing the matrix mode with the **mmode** subroutine.

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

Loading a transformation matrix with the **loadmatrix** subroutine.

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

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

AIX Graphics Library Overview and Working with Coordinate Systems.

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