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 17<h2>C Specification</h2> 18 19<dl> 20<dd><PRE><CODE>#include <revolution/gx.h></CODE></PRE> 21 </dd> 22<dd><pre><CODE>void GXPokeZMode( 23<a href="../Enumerated_Types/GXBool.html">GXBool</a> compare_enable, 24<a href="../Enumerated_Types/GXCompare.html">GXCompare</a> func, 25<a href="../Enumerated_Types/GXBool.html">GXBool</a> update_enable );</CODE></pre> 26 </dd> 27</dl> 28 29<h2>Arguments</h2> 30<TABLE border="1" cellpadding="3" cellspacing="0.1"> 31 <tr> 32<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong>compare_enable</strong></em></TD> 33<TD width="520">When <CODE>GX_TRUE</CODE>, a comparison of the source and destination Z values is enabled. Disabled if not <CODE>GX_TRUE</CODE>.</TD> 34 </tr> 35 <tr> 36<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong>func</strong></em></TD> 37<TD width="520">Z comparison function. <BR>Accepted values are:<BR> 38 <TABLE width="500" border="1" cellspacing="0.1"> 39 40 <tr> 41<TD bgcolor="#C0C0C0" width="150">Name</TD> 42<TD bgcolor="#C0C0C0" width="350">Z comparison process</TD> 43 </tr> 44 <tr> 45<TD width="150"><code>GX_NEVER</code></TD> 46<TD width="350">always a Z test fail</TD> 47 </tr> 48 <tr> 49<TD width="150"><code>GX_LESS</code></TD> 50<TD width="350">The Z test passes if the <code>new Z value < original Z value</code>.</TD> 51 </tr> 52 <tr> 53<TD width="150"><code>GX_LEQUAL</code></TD> 54<TD width="350">The Z test passes if the <code>new Z value <= original Z value</code>.</TD> 55 </tr> 56 <tr> 57<TD height="25" width="150"><code>GX_EQUAL</code></TD> 58<TD height="25" width="350">The Z test passes if the <code>new Z value == original Z value</code>.</TD> 59 </tr> 60 <tr> 61<TD width="150"><code>GX_NEQUAL</code></TD> 62<TD width="350">The Z test passes if the <code>new Z value != original Z value</code>.</TD> 63 </tr> 64 <tr> 65<TD width="150"><code>GX_GEQUAL</code></TD> 66<TD width="350">The Z test passes if the <code>new Z value >= original Z value</code>.</TD> 67 </tr> 68 <tr> 69<TD width="150"><code>GX_GREATER</code></TD> 70<TD width="350">The Z test passes if the <code>new Z value > original Z value</code>.</TD> 71 </tr> 72 <tr> 73<TD width="150"><code>GX_ALWAYS</code></TD> 74<TD width="350">always a Z test pass</TD> 75 </tr> 76 77 </TABLE> 78 </TD> 79 </tr> 80 <tr> 81<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong>update_enable</strong></em></TD> 82<TD width="520">When <CODE>GX_TRUE</CODE>, allows a Z buffer update. If not, disables Z buffer updating, but comparison functionality continues as enabled.</TD> 83 </tr> 84</TABLE> 85<h2>Return Values</h2> 86 87<p>None.</p> 88<H2>Description</H2> 89<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 EFB. </P> 90<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> 91<P>When <em><strong><code>compare_enable</code></strong></em> is set to <code>GX_DISABLE</code>, poke Z buffering is disabled and the Z buffer is not updated.</P> 92<P>The <em><strong><code>func</code></strong></em> 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> 93<P>The parameter <code><em><strong>update_enable</strong></em></code> determines whether the Z buffer is updated with the new Z value after a comparison is performed. </P> 94<P>The normal rendering Z mode (<a href="../PixelProc/GXSetZMode.html"><code>GXSetZMode</code></a>) is not affected by this function.</P> 95 96 97 98 99<h2>See Also</h2> 100 101<p><a href="GXPokeBlendMode.html"><CODE>GXPokeBlendMode</CODE></a></p> 102<H2>Revision History</H2> 103<P>03/01/2006 Initial version.</P> 104</BODY> 105</HTML> 106