GXSetProjectionv

Syntax

#include <revolution/gx.h>

void GXSetProjectionv( const f32* ptr );

Arguments

ptr Type and pointer to matrix data

Return Values

None.

Description

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

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

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

Only the parameters p0 - p5 (and the type) are actually loaded into the hardware projection matrix. All the other values are determined by the type.

The matrix data is copied from DRAM through the CPU cache into the graphics FIFO. The matrix loaded that uses this function is therefore always coherent with the CPU cache.

See Also

MTXFrustum, MTXPerspective

Revision History

2006/03/01 Initial version.


CONFIDENTIAL