#include <revolution/gx.h>
void GXSetZMode(
GXBool compare_enable,
GXCompare func,
GXBool update_enable );
| compare_enable | When GX_TRUE, enables the process for comparing the original Z value and the target Z value. Disabled if not GX_TRUE. |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| func | Z comparison function. Accepted values are:
|
||||||||||||||||||
| update_enable | When GX_TRUE, allows a Z buffer update.Although a Z buffer update is only possible when GX_TRUE, the comparison process will continue. |
None.
This function sets the Z buffer compare mode. The result of the Z compare is used to conditionally write color values to the embedded frame buffer (EFB).
When compare_enable is set to GX_DISABLE, Z buffering is disabled and the Z buffer will not be updated.
The func argument determines the comparison that is performed. In the comparison function, the newly rasterized Z value is on the left, and the Z value from the Z buffer is on the right. If the result of the comparison is false, the newly rasterized pixel is discarded.
The update_enable parameter determines whether or not the Z buffer will be updated with the new Z value after the comparison. This parameter also affects whether the Z buffer is cleared during copy operations. See the GXCopyDisp and GXCopyTex functions.
GXSetCoPlanar, GXSetBlendMode, GXSetZCompLoc
2006/03/01 Initial version.
CONFIDENTIAL