1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>GXPokeZMode</title> 10</head> 11 12<body> 13 14<h1 align="left">GXPokeZMode</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/gx.h> 19 20void GXPokeZMode( 21 <a href="../Enumerated_Types/GXBool.html">GXBool</a> compare_enable, 22 <a href="../Enumerated_Types/GXCompare.html">GXCompare</a> func, 23 <a href="../Enumerated_Types/GXBool.html">GXBool</a> update_enable ); 24</pre></dd></dl> 25 26<h2>Arguments</h2> 27<TABLE class="arguments" border="1" > 28 <tr> 29<TH>compare_enable</TH> 30<TD>When <CODE>GX_TRUE</CODE>, a comparison of the source and destination Z values is enabled. Disabled if not <CODE>GX_TRUE</CODE>.</TD> 31 </tr> 32 <tr> 33<TH>func</TH> 34<TD>Z comparison function. Accepted values are:<BR> 35 <TABLE class="arguments" border="1" > 36 <tr> 37<TD bgcolor="#C0C0C0">Name</TD> 38<TD bgcolor="#C0C0C0">Z comparison process</TD> 39 </tr> 40 <tr> 41<TH>GX_NEVER</TH> 42<TD>Z test always fails.</TD> 43 </tr> 44 <tr> 45<TH>GX_LESS</TH> 46<TD>The Z test passes if the new Z value < original Z value.</TD> 47 </tr> 48 <tr> 49<TH>GX_LEQUAL</TH> 50<TD>The Z test passes if the new Z value <= original Z value.</TD> 51 </tr> 52 <tr> 53<TH>GX_EQUAL</TH> 54<TD>The Z test passes if the new Z value == original Z value.</TD> 55 </tr> 56 <tr> 57<TH>GX_NEQUAL</TH> 58<TD>The Z test passes if the new Z value != original Z value.</TD> 59 </tr> 60 <tr> 61<TH>GX_GEQUAL</TH> 62<TD>The Z test passes if the new Z value >= original Z value.</TD> 63 </tr> 64 <tr> 65<TH>GX_GREATER</TH> 66<TD>The Z test passes if the new Z value > original Z value.</TD> 67 </tr> 68 <tr> 69<TH>GX_ALWAYS</TH> 70<TD>Z test always passes.</TD> 71 </tr> 72 </TABLE> 73 </TD> 74 </tr> 75 <tr> 76<TH>update_enable</TH> 77<TD>When <CODE>GX_TRUE</CODE>, allows a Z buffer update. If not, disables Z buffer updating, but comparison functionality continues as enabled.</TD> 78 </tr> 79</TABLE> 80 81<h2>Return Values</h2> 82<p>None.</p> 83 84<H2>Description</H2> 85<P>This function sets the Z-buffer compare mode when writing the embedded frame buffer (EFB) using the <CODE>GXPoke*</CODE> functions. The <CODE>GXPoke*</CODE> functions allow the CPU to directly write the to EFB.</P> 86<P>The result of the Z compare is used to conditionally write color values to the EFB. The Z value will be updated according to the result of the compare if Z update is enabled.</P> 87<P>When <SPAN class="argument">compare_enable</SPAN> is set to <CODE>GX_DISABLE</CODE>, Z buffer poking is prohibited and the Z buffer is not updated.</P> 88<P>The <SPAN class="argument">func</SPAN> parameter determines the comparison that is performed. In the comparison function, the poked Z value is on the left while the Z value from the Z buffer is on the right. If the result of the comparison is false, the poked Z value is discarded.</P> 89<P>The parameter <SPAN class="argument">update_enable</SPAN> determines whether the Z buffer is updated with the new Z value after a comparison is performed. </P> 90<P>The Z mode for normal rendering (the <A href="../PixelProc/GXSetZMode.html"><CODE>GXSetZMode</CODE></A> function) is not affected by this function.</P> 91 92<h2>See Also</h2> 93<P class="reference"> 94<a href="GXPokeBlendMode.html">GXPokeBlendMode</a> 95</p> 96 97<H2>Revision History</H2> 98<P> 992006/03/01 Initial version.<br> 100</P> 101 102<hr><p>CONFIDENTIAL</p></body> 103</HTML>