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 &lt;revolution/gx.h&gt;</CODE></PRE>
21  </dd>
22  <dd><pre><CODE>void GXPokeZMode(
23    <a href="../Enumerated_Types/GXBool.html">GXBool</a>       compare_enable,
24    <a
25href="../Enumerated_Types/GXCompare.html">GXCompare</a>    func,
26    <a
27href="../Enumerated_Types/GXBool.html">GXBool</a>       update_enable );</CODE></pre>
28  </dd>
29</dl>
30
31<h2>Arguments</h2>
32<TABLE border="1" cellpadding="3" cellspacing="0.1">
33  <tr>
34<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong>compare_enable</strong></em></TD>
35<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>
36    </tr>
37  <tr>
38<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong>func</strong></em></TD>
39<TD width="520">Z comparison function. <BR>Accepted values are:<BR>
40      <TABLE width="500" border="1" cellspacing="0.1">
41
42          <tr>
43<TD bgcolor="#C0C0C0" width="150">Name</TD>
44<TD bgcolor="#C0C0C0" width="350">Z comparison process</TD>
45          </tr>
46          <tr>
47<TD width="150"><code>GX_NEVER</code></TD>
48<TD width="350">always a Z test fail</TD>
49          </tr>
50          <tr>
51<TD width="150"><code>GX_LESS</code></TD>
52<TD width="350">The Z test passes if the <code>new Z value &lt; original Z value</code>.</TD>
53          </tr>
54          <tr>
55<TD width="150"><code>GX_LEQUAL</code></TD>
56<TD width="350">The Z test passes if the <code>new Z value &lt;= original Z value</code>.</TD>
57          </tr>
58          <tr>
59<TD height="25" width="150"><code>GX_EQUAL</code></TD>
60<TD height="25" width="350">The Z test passes if the <code>new Z value == original Z value</code>.</TD>
61          </tr>
62          <tr>
63<TD width="150"><code>GX_NEQUAL</code></TD>
64<TD width="350">The Z test passes if the <code>new Z value != original Z value</code>.</TD>
65          </tr>
66          <tr>
67<TD width="150"><code>GX_GEQUAL</code></TD>
68<TD width="350">The Z test passes if the <code>new Z value &gt;= original Z value</code>.</TD>
69          </tr>
70          <tr>
71<TD width="150"><code>GX_GREATER</code></TD>
72<TD width="350">The Z test passes if the <code>new Z value &gt; original Z value</code>.</TD>
73          </tr>
74          <tr>
75<TD width="150"><code>GX_ALWAYS</code></TD>
76<TD width="350">always a Z test pass</TD>
77          </tr>
78
79      </TABLE>
80      </TD>
81    </tr>
82  <tr>
83<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong>update_enable</strong></em></TD>
84<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>
85    </tr>
86</TABLE>
87<h2>Return Values</h2>
88
89<p>None.</p>
90<H2>Description</H2>
91<P>This function sets the Z-buffer compare mode when writing the embedded frame buffer (EFB) using the <code>GXPoke</code>* functions.&nbsp;The <code>GXPoke</code>* functions allow the CPU to directly write the EFB.&nbsp;</P>
92<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>
93<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>
94<P>The <em><strong><code>func</code></strong></em> parameter determines the comparison that is performed.&nbsp;In the comparison function, the poked Z value is on the left while the Z value from the Z buffer is on the right.&nbsp;If the result of the comparison is false, the poked Z value is discarded.</P>
95<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.&nbsp;</P>
96<P>The normal rendering Z mode (<a href="../PixelProc/GXSetZMode.html"><code>GXSetZMode</code></a>) is not affected by this function.</P>
97
98
99
100
101<h2>See Also</h2>
102
103<p><a href="GXPokeBlendMode.html"><CODE>GXPokeBlendMode</CODE></a></p>
104<H2>Revision History</H2>
105<p>2006/03/01 Initial version.</P>
106<hr>
107<P>CONFIDENTIAL</p>
108</BODY>
109</HTML>
110