#include <revolution/gx.h>
void GXLoadPosMtxImm(
const f32 mtxPtr[3][4],
u32 id );
| mtxPtr | Specifies a pointer to the matrix data. |
|---|---|
| id | Specifies the matrix name. Can specify a value enumerated by GXPosNrmMtx. |
None.
This function is used to load a 3x4 modelview matrix mtxPtr into matrix memory at location id. This matrix is either made the current matrix (see the GXSetCurrentMtx function), or used for converting vertex coordinates in model space to view space by setting a matrix ID for each vertex. id indicates a location in the matrix memory, enumerated by GXPosNrmMtx.
You can also load a normal matrix (the GXLoadNrmMtxImm or GXLoadNrmMtxIndx3x3 function) to the same id. Generally, the normal matrix will be the inverse transpose of the vertex coordinate matrix. The normal matrix is used for vertex lighting. In cases where the modelview and inverse transpose of the modelview matrix (excluding translation) are the same, you can load the same matrix for both the normal and the vertex coordinate matrices.
The matrix data is copied either from main memory or from the CPU cache into the graphics FIFO. Accordingly, matrices loaded using this function are always coherent with the CPU cache.
GXSetCurrentMtx, GXLoadNrmMtxImm
2006/03/01 Initial version.
CONFIDENTIAL