# NNSG3dGlb

## Description

The `NNSG3dGlb` structure manages the kinds of data used for numerous models and all scenes; such as projection matrices, light color and direction, and camera position and direction. The structure stores data for the following:

- Projection matrix
- Camera matrix (camera's position, eye point & upward direction)
- Light direction
- Light color
- Viewpoint
- Object's world transformation matrix (SRT)
- Default material color, polygon attributes, etc.

The only instance of `NNSG3dGlb` structure is the global variable `NNS_G3dGlb`, which you can initialize before use by calling the `NNS_G3dGlbInit` function. You can call either the `NNS_G3dGlbFlushP`, `NNS_G3dGlbFlushVP`, or `NNS_G3dGlbFlushWVP` function so the data in the `NNSG3dGlb` structure is applied in the Geometry Engine before you draw with `NNS_G3dDraw`. The settings in this structure are used when the `NNS_G3dMdlUseGlbXXXXX` functions use default material color, etc. for model source. Note that G3D will sometimes use the data stored in the `NNSG3dGlb` structure when information such as the camera matrix is needed while drawing models that include billboards.

## See Also

Global State

## Revision History

10/12/2004 Initial version.