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
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/gx.h&gt;
16
17void GXSetTevOp( <A href="../Enumerated_Types/GXTevStageID.html">GXTevStageID</A> id, <A href="../Enumerated_Types/GXTevMode.html">GXTevMode</A> mode );
18</pre></dd></dl>
19
20<H2>Arguments</H2>
21<TABLE class="arguments" border="1" >
22  <TBODY>
23    <TR>
24<TH>id</TH>
25<TD>TEV stage <A href="../Enumerated_Types/GXTevStageID.html">ID</A>. Accepted values are: <code>GX_TEVSTAGE0</code>, <code>GX_TEVSTAGE1</code>, <code>GX_TEVSTAGE2</code>, ... , <code>GX_TEVSTAGE15</code>.</TD>
26    </TR>
27    <TR>
28<TH>mode</TH>
29<TD>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,&nbsp; see the table below.)</TD>
30    </TR>
31  </TBODY>
32</TABLE>
33
34<H2>Return Values</H2>
35<P>None.</P>
36
37<H2>Description</H2>
38<P>This is a convenient function designed to make initial programming of the texture environment unit (TEV) easier.&nbsp;The macros call the <A href="GXSetTevColorIn.html"><CODE>GXSetTevColorIn</CODE></A>, <A href="GXSetTevColorOp.html"><CODE>GXSetTevColorOp</CODE></A>, <A href="GXSetTevAlphaIn.html"><CODE>GXSetTevAlphaIn</CODE></A> and <A href="GXSetTevAlphaOp.html"><CODE>GXSetTevAlphaOp</CODE></A> functions with predefined arguments to implement commonly used texture combining functions.</P>
39<P>To enable a consecutive set of TEV stages, you must call the <A href="GXSetNumTevStages.html"><CODE>GXSetNumTevStages</CODE></A> function.</P>
40<P>In the table below, <SPAN class="argument">Cv</SPAN> is the output color for the stage, <SPAN class="argument">Cr</SPAN> is the output color of the previous stage, and <SPAN class="argument">Ct</SPAN> is the texture color. <SPAN class="argument">Av</SPAN> is the output alpha for the stage, <SPAN class="argument">Ar</SPAN> is the output alpha for the previous stage, and <SPAN class="argument">At</SPAN> is the texture alpha. As a special case, in the first TEV stage, the rasterized color (<CODE>GX_CC_RASC</CODE>) is used as <SPAN class="argument">Cr</SPAN>, and the rasterized alpha (<CODE>GX_CA_RASA</CODE>) is used as <SPAN class="argument">Ar</SPAN>. This is because there is no previous stage.</P>
41
42<TABLE class="arguments" border="1" >
43  <TBODY>
44    <TR>
45      <TD width="33%" bgcolor="#C0C0C0"><SPAN class="argument">Mode</SPAN></TD>
46      <TD width="33%" bgcolor="#C0C0C0"><SPAN class="argument">Color Op</SPAN></TD>
47      <TD width="33%" bgcolor="#C0C0C0"><SPAN class="argument">Alpha Op</SPAN></TD>
48    </TR>
49    <TR>
50      <TH>GX_MODULATE</TH>
51      <TD><SPAN class="argument">Cv=CrCt</SPAN></TD>
52      <TD><SPAN class="argument">Av=ArAt</SPAN></TD>
53    </TR>
54    <TR>
55      <TH>GX_DECAL</TH>
56      <TD><SPAN class="argument">Cv=(1 - At ) Cr + AtCt</SPAN></TD>
57      <TD><SPAN class="argument">Av=Ar</SPAN></TD>
58    </TR>
59    <TR>
60      <TH>GX_REPLACE</TH>
61      <TD><SPAN class="argument">Cv=Ct</SPAN></TD>
62      <TD><SPAN class="argument">Av=At</SPAN></TD>
63    </TR>
64    <TR>
65      <TH>GX_BLEND</TH>
66      <TD><SPAN class="argument">Cv=(1 - Ct ) Cr + Ct</SPAN></TD>
67      <TD><SPAN class="argument">Av=AtAr</SPAN></TD>
68    </TR>
69    <TR>
70      <TH>GX_PASSCLR</TH>
71      <TD><SPAN class="argument">Cv=Cr</SPAN></TD>
72      <TD><SPAN class="argument">Av=Ar</SPAN></TD>
73    </TR>
74  </TBODY>
75</TABLE>
76
77<H2>See Also</H2>
78<P class="reference">
79<A href="TevConfigGuide.html">TEV Configuration Guide</A>,
80<A href="GXSetTevOrder.html">GXSetTevOrder</A>,
81<A href="GXSetTevColorIn.html">GXSetTevColorIn</A>,
82<A href="GXSetTevColorOp.html">GXSetTevColorOp</A>,
83<A href="GXSetTevAlphaIn.html">GXSetTevAlphaIn</A>,
84<A href="GXSetTevAlphaOp.html">GXSetTevAlphaOp</A>
85</P>
86
87<H2>Revision History</H2>
88<P>
892008/05/12 Changed old function names (<CODE>GXSetTevStages</CODE>) to new function names (<CODE>GXSetNumTevStages</CODE>).<br> 2006/03/01 Initial version.
90</P>
91
92<hr><p>CONFIDENTIAL</p></body>
93</HTML>