#include <revolution/gx.h>void GXSetProjection( const 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 loaded into the hardware projection matrix. All the other numbers are implied by the projection type.
The matrix data is copied from DRAM through the CPU cache into the graphics FIFO, so the matrix loaded that uses this function is always coherent with the CPU cache.
03/01/2006 Initial version.