1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>GXSetTevOp</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXSetTevOp</H1> 12<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/gx.h></CODE></PRE> 16 <DD> 17<PRE>void GXSetTevOp( <a href="../Enumerated_Types/GXTevStageID.html">GXTevStageID</a> id, <a href="../Enumerated_Types/GXTevMode.html">GXTevMode</a> mode );</PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" cellspacing="0.1" cellpadding="3"> 21 <TBODY> 22 <TR> 23<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>id</CODE></EM></STRONG></FONT></STRONG></EM></TD> 24<TD width="520">TEV stage <a href="../Enumerated_Types/GXTevStageID.html">ID</a>. <BR>Accepted values are: <code>GX_TEVSTAGE0</code>, <code>GX_TEVSTAGE1</code>, <code>GX_TEVSTAGE2</code>, through <code>GX_TEVSTAGE15</code>.</TD> 25 </TR> 26 <TR> 27<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>mode</FONT></STRONG></EM></TD> 28<TD width="520">Predefined color combining <a href="../Enumerated_Types/GXTevMode.html">modes</a>. The applicable values are <code>GX_MODULATE</code>, <code>GX_DECAL</code>, <code>GX_REPLACE</code>, <code>GX_BLEND</code> and <code>GX_PASSCLR</code>. (For further details, see the table below.)</TD> 29 </TR> 30 </TBODY> 31</TABLE> 32<H2>Return Values</H2> 33<P>None.</P> 34<H2>Description</H2> 35<P>This is a convenient function designed to make initial programming of the Texture Environment unit (TEV) easier. This macro calls <code><a href="GXSetTevColorIn.html">GXSetTevColorIn</a>, <a href="GXSetTevColorIn.html">GXSetTevColorOp</a></code>, <a href="GXSetTevAlphaIn.html"><code>GXSetTevAlphaIn</code></a>, and <a href="GXSetTevAlphaIn.html"><code>GXSetTevAlphaOp</code></a> with predefined arguments to implement familiar texture combining functions.</P> 36<P>To enable a consecutive set of TEV stages, you must call the <a href="GXSetNumTevStages.html"><code>GXSetNumTevStages</code></a> function.</P> 37<P>In the table below, <em>Cv</em> is the output color for the stage, <em>Cr</em> is the output color of previous stage, and <em>Ct</em> is the texture color. <em>Av</em> is the output alpha for a stage, <em>Ar</em> is the output alpha of previous stage, and <em>At</em> is the texture alpha. As a special case, rasterized color (<code>GX_CC_RASC</code>) is used as <em>Cr</em> and rasterized alpha (<code>GX_CA_RASA</code>) is used as <em>Ar </em>at the first TEV stage because there is no previous stage.</P> 38<TABLE border="1" width="640" cellpadding="3" cellspacing="0.1"> 39 <TBODY> 40 <TR> 41<TD width="33%" bgcolor="#C0C0C0"><EM><STRONG>mode</STRONG></EM></TD> 42<TD width="33%" bgcolor="#C0C0C0"><EM><STRONG>Color Op</STRONG></EM></TD> 43<TD width="34%" bgcolor="#C0C0C0"><EM><STRONG>Alpha Op</STRONG></EM></TD> 44 </TR> 45 <TR> 46<TD width="33%"><CODE>GX_MODULATE</FONT></TD> 47<TD width="33%"><EM>Cv=CrCt</EM></TD> 48<TD width="34%"><EM>Av=ArAt</EM></TD> 49 </TR> 50 <TR> 51<TD width="33%"><CODE>GX_DECAL</FONT></TD> 52<TD width="33%"><EM>Cv=(1-At)Cr + AtCt</EM></TD> 53<TD width="34%"><EM>Av=Ar</EM></TD> 54 </TR> 55 <TR> 56<TD width="33%"><CODE>GX_REPLACE</FONT></TD> 57<TD width="33%"><EM>Cv=Ct</EM></TD> 58<TD width="34%"><EM>Av=At</EM></TD> 59 </TR> 60 <TR> 61<TD width="33%"><CODE>GX_BLEND</FONT></TD> 62<TD width="33%"><EM>Cv=(1-Ct)Cr + Ct</EM></TD> 63<TD width="34%"><EM>Av=AtAr</EM></TD> 64 </TR> 65 <TR> 66<TD width="33%"><CODE>GX_PASSCLR</FONT></TD> 67<TD width="33%"><EM>Cv=Cr</EM></TD> 68<TD width="34%"><EM>Av=Ar</EM></TD> 69 </TR> 70 </TBODY> 71</TABLE> 72 73<H2>See Also</H2> 74<P><A href="TevConfigGuide.html">TEV Configuration Guide</A><BR> <BR> <A href="GXSetTevOrder.html"><CODE>GXSetTevOrder</CODE></A><br> <A href="GXSetTevColorIn.html"><CODE>GXSetTevColorIn</CODE></A><br> <A href="GXSetTevColorOp.html"><CODE>GXSetTevColorOp</CODE></A><br> <A href="GXSetTevAlphaIn.html"><CODE>GXSetTevAlphaIn</CODE></A><br> <A href="GXSetTevAlphaOp.html"><CODE>GXSetTevAlphaOp</CODE></A></P> 75<H2>Revision History</H2> 76<P>03/01/2006 Initial version.</P>