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>GXSetTevColorIn</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXSetTevColorIn</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17  <PRE><CODE>void GXSetTevColorIn(
18    <A href="../Enumerated_Types/GXTevStageID.html">GXTevStageID</A>   stage,
19    <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A>  a,
20    <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A>  b,
21    <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A>  c,
22    <A href="../Enumerated_Types/GXTevColorArg.html">GXTevColorArg</A>  d );</CODE></PRE>
23</DL>
24<H2>Arguments</H2>
25<TABLE border="1" cellspacing="0.1" cellpadding="3">
26  <TBODY>
27    <TR>
28<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>stage</FONT></STRONG></EM></TD>
29<TD width="520">the TEV stage name <BR>Accepted values are: <code>GX_TEVSTAGE0</code>, <code>GX_TEVSTAGE1</code>, <code>GX_TEVSTAGE2</code> through <code>GX_TEVSTAGE15</code>.</TD>
30    </TR>
31    <TR>
32<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><A name="a">a</A></FONT></STRONG></EM></TD>
33<TD width="520">an input color <a href="../Enumerated_Types/GXTevColorArg.html">operand</a><BR>An unsigned 8-bit value for the component. Accepted values are:<BR>
34      <TABLE border="1" width="500" cellspacing="0.1">
35
36          <tr>
37<TD width="150" bgcolor="#C0C0C0">Name</TD>
38<TD width="350" bgcolor="#C0C0C0">Input</TD>
39          </tr>
40          <tr>
41<TD width="150"><code>GX_CC_C0</code></TD>
42<TD width="350">RGB color from the <CODE>TEVREG0</CODE> register</TD>
43          </tr>
44          <tr>
45<TD width="150"><code>GX_CC_C1</code></TD>
46<TD width="350">RGB color from the <CODE>TEVREG1</CODE> register</TD>
47          </tr>
48          <tr>
49<TD width="150"><code>GX_CC_C2</code></TD>
50<TD width="350">RGB color from the <CODE>TEVREG2</CODE> register</TD>
51          </tr>
52          <tr>
53<TD width="150"><code>GX_CC_CPREV</code></TD>
54<TD width="350">RGB color from the <CODE>TEVPREV</CODE> register</TD>
55          </tr>
56          <tr>
57<TD width="150"><code>GX_CC_A0</code></TD>
58<TD width="350">Alpha from the <CODE>TEVREG0</CODE> register</TD>
59          </tr>
60          <tr>
61<TD width="150"><code>GX_CC_A1</code></TD>
62<TD width="350">Alpha from the <CODE>TEVREG1</CODE> register</TD>
63          </tr>
64          <tr>
65<TD width="150"><code>GX_CC_A2</code></TD>
66<TD width="350">Alpha from the <CODE>TEVREG2</CODE> register</TD>
67          </tr>
68          <tr>
69<TD width="150"><code>GX_CC_APREV</code></TD>
70<TD width="350">Alpha from the <CODE>TEVPREV</CODE> register</TD>
71          </tr>
72          <tr>
73<TD width="150"><code>GX_CC_TEXC</code></TD>
74<TD width="350">RGB color from the texture</TD>
75          </tr>
76          <tr>
77<TD width="150"><code>GX_CC_TEXA</code></TD>
78<TD width="350">Alpha from the texture</TD>
79          </tr>
80          <tr>
81<TD width="150"><code>GX_CC_RASC</code></TD>
82<TD width="350">RGB color from the rasterized vertex color</TD>
83          </tr>
84          <tr>
85<TD width="150"><code>GX_CC_RASA</code></TD>
86<TD width="350">Alpha from the rasterized vertex color</TD>
87          </tr>
88          <tr>
89<TD width="150"><code>GX_CC_ONE</code></TD>
90<TD width="350">1.0 fixed</TD>
91          </tr>
92          <tr>
93<TD width="150"><code>GX_CC_HALF</code></TD>
94<TD width="350">0.5 fixed</TD>
95          </tr>
96          <tr>
97<TD width="150"><code>GX_CC_ZERO</code></TD>
98<TD width="350">0.0 fixed</TD>
99          </tr>
100          <tr>
101<TD width="150"><code>GX_CC_KONST</code></TD>
102<TD width="350">constant color input (see the <A href="GXSetTevKColorSel.html">GXSetTevKColorSel</A> function)</TD>
103          </tr>
104        </TABLE>
105      </TD>
106    </TR>
107    <TR>
108<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>b</FONT></STRONG></EM></TD>
109<TD width="520">an input color <a href="../Enumerated_Types/GXTevColorArg.html">operand</a><BR>An unsigned 8-bit value for the component. Applicable values are as for <CODE>a</CODE>.</TD>
110    </TR>
111    <TR>
112<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>c</FONT></STRONG></EM></TD>
113<TD width="520">an input color <a href="../Enumerated_Types/GXTevColorArg.html">operand</a><BR>An unsigned 8-bit value for the component. Applicable values are as for <CODE>a</CODE>.</TD>
114    </TR>
115    <TR>
116<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE>d</FONT></STRONG></EM></TD>
117<TD width="520">an input color <a href="../Enumerated_Types/GXTevColorArg.html">operand</a><BR>a 1-bit sign + a 10-bit value for the component. Applicable values are as for <CODE>a</CODE>.</TD>
118    </TR>
119  </TBODY>
120</TABLE>
121<H2>Return Values</H2>
122<P>None.</P>
123<H2>Description</H2>
124<P>This function sets the input operands for the texture environment (TEV) color combiner unit.&nbsp;The input operands <code>a</code>, <code>b</code>, and <code>c</code> are RGB colors where each component is an unsigned 8-bit value <code>(0 &lt;= a,b,c &lt;= 255)</code>.&nbsp;The <code>d</code> input operand is an RGB color where each component is a signed 10-bit input <code>(-1024 &lt;= d &lt;= 1023)</code>.&nbsp;</P>
125<P>In cases where the input operand is an alpha value (<CODE>GX_CC_A0</CODE>, <CODE>GX_CC_A1</CODE>, <CODE>GX_CC_A2</CODE>, <CODE>GX_CC_APREV</CODE>, <CODE>GX_CC_TEXA</CODE> and <CODE>GX_CC_RASA</CODE>), the alpha value is replicated across the three color channels (<CODE>R=A</CODE>, <CODE>G=A</CODE>, <CODE>B=A</CODE>).</P>
126<P>The function implemented by this TEV stage is set with <a href="GXSetTevColorOp.html"><code>GXSetTevColorOp</code></a>.</P>
127<P>The output of this stage is directed by default to the <code>GX_TEVPREV</code> register (see <a href="../Management/GXInit.html"><code>GXInit</code></a>), but may be set explicitly by <a href="GXSetTevColorOp.html"><code>GXSetTevColorOp</code></a>.</P>
128<P>The registers used to store the output of TEV stages can also be used as the <CODE>GX_CC_C0</CODE>, <CODE>GX_CC_C1</CODE>, <CODE>GX_CC_C2</CODE> and <CODE>GX_CC_CPREV</CODE> inputs. You can program these registers with constant color values using <code><a href="GXSetTevColor.html">GXSetTevColor</a></code> or <a href="GXSetTevColorS10.html"><code>GXSetTevColorS10</code></a>.&nbsp;Each register can store either an unsigned 8-bit number or a signed 10-bit number per component (RGB). If a signed 10-bit number is selected for the inputs <code>a</code>, <code>b</code> or <code>c</code>, it is truncated to 8 bits.&nbsp;No conversion is performed and the highest bits are discarded.</P>
129<P>The input operands <code>GX_CC_RASC</code> and <code>GX_CC_RASA</code> are the result of <a href="../toc.html#Lighting">per-vertex lighting</a> equations.&nbsp;The input operands <code>GX_CC_TEXC</code> and <code>GX_CC_TEXA</code> are the texture inputs for this stage.</P>
130<P><a href="GXSetTevOrder.html"><code>GXSetTevOrder</code></a> associates a TEV&nbsp;stage with particular colors and textures.</P>
131<H2>See Also</H2>
132<P><code><A href="GXSetTevOp.html">GXSetTevOp</A></code><br> <code><A href="GXSetTevColorOp.html">GXSetTevColorOp</A></code><br> <code><A href="GXSetTevAlphaIn.html">GXSetTevAlphaIn</A></code><br> <code><A href="GXSetTevSwapMode.html">GXSetTevSwapMode</A></code><br> <code><A href="GXSetTevKColorSel.html">GXSetTevKColorSel</A></code><br>
133</P>
134<H2>Revision History</H2>
135<P>2006/03/01 Initial version.</P>
136<hr>
137<P>CONFIDENTIAL</p>
138</BODY>
139</HTML>
140