GXPeekZ

Syntax

#include <revolution/gx.h>

void GXPeekZ( 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 Pointer to a returned Z value. Z value will be read from position (x, y) in the EFB.
The returned Z value will be in the range 0x00000000 <= z <= 0x00FFFFFF.

Return Values

None.

Description

This function loads a z value from the Embedded Frame Buffer (EFB) at position x, y directly into the CPU. The z value is the raw integer value from the Z buffer. The value range is 24-bit when reading from the non-antialiased frame buffer.

When an antialiased frame buffer is read, sub-sample 0 is read and returned. The value is in compressed 16-bit form. To convert the compressed value to a plain 24-bit integer, use the GXDecompressZ16 function.

See Also

GXPokeZ, GXDecompressZ16

Revision History

2006/03/01 Initial version.


CONFIDENTIAL