GXPokeZ

Syntax

#include <revolution/gx.h>

void GXPokeZ( u16 x, u16 y, u32 z );

Arguments

x The x coordinate, in pixels; 0 <= x <= 639
y The y coordinate, in lines; 0 <= y <= 527
z Integer z value to write at position (x,y) in the EFB. 0x00000000 <= z <= 0x00FFFFFF.

Return Values

None.

Description

This function allows the CPU to write a z value directly to the Embedded Frame Buffer (EFB) at position x, y. The z value can be compared with the current contents of the EFB. The Z compare function is set using the GXPokeZMode function. If using a non-antialiased frame buffer, the z value must be in the range 0x00000000 <= z <= 0x00FFFFFF.

For an antialiased frame buffer, the z value should be in the compressed 16-bit format (0x00000000 <= z <= 0x0000FFFF) and the poke will affect all three subsamples of a pixel. To convert a 24-bit integer value into compressed 16-bit form, use the GXCompressZ16 function.

See Also

GXPeekZ, GXCompressZ16

Revision History

2006/03/01 Initial version.


CONFIDENTIAL