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 17<h2>C Specification</h2> 18 19<dl> 20 <dd><PRE><CODE>#include <revolution/gx.h></CODE></PRE></dd> 21 <dd><pre><CODE>void GXPokeAlphaMode( 22 <a href="../Enumerated_Types/GXCompare.html">GXCompare</a> func, 23 u8 threshold );</CODE></pre> 24 </dd> 25</dl> 26 27<h2>Arguments</h2> 28<TABLE border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>func</font></strong></em></TD> 31<TD width="520">Compare function. <BR>Accepted values are:<br> 32 <TABLE width="500" border="1" cellspacing="0.1"> 33 34 <tr> 35<TD bgcolor="#C0C0C0" width="150">Name</TD> 36<TD bgcolor="#C0C0C0" width="350">Compare equation</TD> 37 </tr> 38 <tr> 39<TD width="150"><code>GX_NEVER</code></TD> 40<TD width="350">Never true.</TD> 41 </tr> 42 <tr> 43<TD width="150"><code>GX_LESS</code></TD> 44<TD width="350"><em><code>(alpha_src <<strong><CODE> </font>threshold</strong>)</code></em></TD> 45 </tr> 46 <tr> 47<TD width="150"><code>GX_LEQUAL</code></TD> 48<TD width="350"><em><code>(alpha_src <=<strong><CODE> </font>threshold</strong>)</code></em></TD> 49 </tr> 50 <tr> 51<TD height="25" width="150"><code>GX_EQUAL</code></TD> 52<TD height="25" width="350"><em><code>(alpha_src ==<strong><CODE></font>threshold</strong>)</code></em></TD> 53 </tr> 54 <tr> 55<TD width="150"><code>GX_NEQUAL</code></TD> 56<TD width="350"><em><code>(alpha_src !=<strong><CODE> </font>threshold</strong>)</code></em></TD> 57 </tr> 58 <tr> 59<TD width="150"><code>GX_GEQUAL</code></TD> 60<TD width="350"><em><code>(alpha_src >=<strong><CODE> </font>threshold</strong>)</code></em></TD> 61 </tr> 62 <tr> 63<TD width="150"><code>GX_GREATER</code></TD> 64<TD width="350"><em><code>(alpha_src ><strong><CODE> </font>threshold</strong>)</code></em></TD> 65 </tr> 66 <tr> 67<TD width="150"><code>GX_ALWAYS</code></TD> 68<TD width="350">Always true.</TD> 69 </tr> 70 71 </TABLE> 72 </TD> 73 </tr> 74 <tr> 75<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>threshold</font></strong></em></TD> 76<TD width="520">Threshold to which source alpha is compared.</TD> 77 </tr> 78</TABLE> 79<h2>Return Values</h2> 80 81<p>None.</p> 82<H2>Description</H2> 83<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> 84<P><CODE>src_alpha <EM><STRONG>func</STRONG></EM> <STRONG><EM>threshold</EM><BR> <BR></STRONG>for example:<BR>src_alpha > 0x80</CODE></P> 85<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> 86<P>Alpha comparison tests are processed before Z comparisons and blend processing.(See the <A href="GXPokeBlendMode.html"><CODE>GXPokeBlendMode</CODE></A> function.)</P> 87 88 89 90 91<h2>See Also</h2> 92<p><a href="GXPokeARGB.html">GXPokeARGB</a><a href="GXPokeBlendMode.html"><br> GXPokeBlendMode</a><br></p> 93<h2>Revision History</h2><p>2006/03/01 Initial version</p><hr> 94<P>CONFIDENTIAL</p> 95</BODY> 96</HTML>