#include <revolution/gx.h> void GXSetProjection(f32 mtx[4][4], GXProjectionType type);
| mtx | Specifies a pointer to the matrix data. |
|---|---|
| type | Specifies the projection type. Accepted values are: GX_PERSPECTIVE, GX_ORTHOGRAPHIC. |
None.
This function sets the projection matrix. Only two types of projection matrices are supported.
Perspective Matrix Format:
| p0 | 0 | p1 | 0 |
| 0 | p2 | p3 | 0 |
| 0 | 0 | p4 | p5 |
| 0 | 0 | -1 | 0 |
Orthographic Matrix Format:
| p0 | 0 | 0 | p1 |
| 0 | p2 | 0 | p3 |
| 0 | 0 | p4 | p5 |
| 0 | 0 | 0 | 1 |
Only the parameters p0-p5 are actually loaded into the hardware projection matrix. All the other values are determined by the type.
The matrix data is copied from main memory through the CPU cache into the graphics FIFO. Matrices loaded using this function are therefore always coherent with the CPU cache.
2006/03/01 Initial version.
CONFIDENTIAL