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>GXPokeAlphaMode</title>
10</head>
11
12<body>
13
14<h1 align="left">GXPokeAlphaMode</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXPokeAlphaMode(
21    <a href="../Enumerated_Types/GXCompare.html">GXCompare</a> func,
22    u8        threshold );
23</pre></dd></dl>
24
25<h2>Arguments</h2>
26<TABLE class="arguments" border="1" >
27  <tr>
28<TH>func</TH>
29<TD>Compare function. Accepted values are:<BR>
30      <TABLE class="arguments" border="1" >
31          <tr>
32<TD bgcolor="#C0C0C0">Name</TD>
33<TD bgcolor="#C0C0C0">Compare equation</TD>
34          </tr>
35          <tr>
36<TH>GX_NEVER</TH>
37<TD>Always <CODE>FALSE</CODE>.</TD>
38          </tr>
39          <tr>
40<TH>GX_LESS</TH>
41<TD>( ( <code><em>alpha_src</code></em> &lt; <SPAN class="argument">threshold</SPAN> )</TD>
42          </tr>
43          <tr>
44<TH>GX_LEQUAL</TH>
45<TD>( ( <em><code>alpha_src</code></em> &lt;= <SPAN class="argument">threshold</SPAN> )</TD>
46          </tr>
47          <tr>
48<TH>GX_EQUAL</TH>
49<TD>( ( <em><code>alpha_src</code></em> == <SPAN class="argument">threshold</SPAN> )</TD>
50          </tr>
51          <tr>
52<TH>GX_NEQUAL</TH>
53<TD>( ( <em><code>alpha_src</code></em> != <SPAN class="argument">threshold</SPAN> )</TD>
54          </tr>
55          <tr>
56<TH>GX_GEQUAL</TH>
57<TD>( ( <em><code>alpha_src</code></em> &gt;= <SPAN class="argument">threshold</SPAN> )</TD>
58          </tr>
59          <tr>
60<TH>GX_GREATER</TH>
61<TD>( ( <em><code>alpha_src</code></em> &gt; <SPAN class="argument">threshold</SPAN> )</TD>
62          </tr>
63          <tr>
64<TH>GX_ALWAYS</TH>
65<TD>Always <CODE>TRUE</CODE>.</TD>
66          </tr>
67      </TABLE>
68    </TD>
69  </tr>
70  <tr>
71<TH>threshold</TH>
72<TD>Threshold to which source alpha is compared.</TD>
73  </tr>
74</TABLE>
75
76<h2>Return Values</h2>
77<p>None.</p>
78
79<H2>Description</H2>
80<P>This function sets alpha and threshold value for pixels written to the embedded frame buffer (EFB) using the <CODE>GXPoke*</CODE> functions. The <CODE>GXPoke*</CODE> functions are for writing directly to the EFB from the CPU. Comparative functions are specified as follows.</P>
81<DL><DD><CODE>src_alpha</CODE>&nbsp; <SPAN class="argument">func</SPAN>&nbsp; <SPAN class="argument">threshold</SPAN><BR> <BR> for example:<BR><CODE>src_alpha &gt; 0x80</CODE></DD></DL>
82<P>Alpha comparative functions use the source alpha channel as a template and can be used for conditional writing of pixels to the EFB. When compare functions are true, the source color is written to the EFB based on the Z comparison results.( See the <A href="GXPokeZMode.html"><CODE>GXPokeZMode</CODE></A> function.) No writes are performed when the alpha comparison functions are false.</P>
83<P>Alpha comparison tests are processed before Z comparisons and blend processing.( See the <A href="GXPokeBlendMode.html"><CODE>GXPokeBlendMode</CODE></A> function.)</P>
84
85<h2>See Also</h2>
86<P class="reference">
87<A href="GXPokeARGB.html">GXPokeARGB</A>,
88<A href="GXPokeBlendMode.html">GXPokeBlendMode</A>
89</p>
90
91<h2>Revision History</h2>
92<p>
932006/03/01 Initial version.<br>
94</p>
95
96<hr><p>CONFIDENTIAL</p></body>
97</html>