GXCompressZ16

C Specification

#include <revolution/gx.h>
u32 GXCompressZ16( u32 z24, GXZFmt16 zfmt );

Arguments

z24 24-bit z value 0x00000000 <= z24 <= 0x00FFFFFF.
zfmt Z compression format Accepted values are:
Name Z format
GX_ZC_LINEAR Linear 16bit
GX_ZC_NEAR Compressed format for smaller far/near ratio
GX_ZC_MID Compressed format for medium far/near ratio
GX_ZC_FAR Compressed format for large far/near ratio

Return Values

16-bit compressed Z value. Return type is u32 to match the argument of GXPokeZ.

Description

This auxiliary function is used to directly write the Z value to the 16-bit Z buffer, using the GXPokeZ function. The 24-bit value is compressed to a 16-bit value via the Z compression format specified by the argument zfmt.

See Also

GXPokeZ
GXDecompressZ16

Revision History

2006/03/01 Initial version.


CONFIDENTIAL