GXSetProjectionv

C Specification

#include <revolution/gx.h>
void GXSetProjectionv( const f32* ptr );

Arguments

ptr Type and pointer to matrix data

Return Values

None.

Description

This function is used to set 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

The arguments specified to GXSetProjectionv follow the same form as the arguments returned by GXGetProjectionv.

The first element of ptr is the matrix type (cast to a f32).  The parameters p0-5 are loaded from elements 1-6 of array ptr.

Only the parameters p0-5 (and the type) are actually 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 using this function is always coherent with the CPU cache.

See Also

MTXFrustum
MTXPerspective

Revision History

03/01/2006 Initial version.