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>GXSetNumTevStages</title>
10</head>
11
12<body>
13
14<h1 align="left">GXSetNumTevStages</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
21  </dd>
22<dd><pre><CODE>void GXSetNumTevStages( u8 nStages );</CODE></pre>
23  </dd>
24</dl>
25
26<h2>Arguments</h2>
27<TABLE border="1" cellspacing="0.1" cellpadding="3">
28  <tr>
29<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>nStages</CODE></strong></em></TD>
30<TD width="520">The number of TEV <A href="../Enumerated_Types/GXTevStageID.html">stages</A> that are active. Minimum value is 1, maximum value is 16.</TD>
31    </tr>
32</TABLE>
33<h2>Return Values</h2>
34
35<p>None</p>
36<H2>Description</H2>
37<P>This function enables a <em>consecutive</em> number of Texture Environment (TEV) stages.&nbsp;The output pixel color (before fogging and blending) is the result from the last stage.&nbsp;The last TEV stage must write to register <code>GX_TEVPREV</code>, see <a href="GXSetTevColorOp.html"><code>GXSetTevColorOp</code></a> and <a href="GXSetTevAlphaOp.html"><code>GXSetTevAlphaOp</code></a>. At least one TEV stage must be enabled.&nbsp;If a Z-texture is enabled, the Z texture must be looked up on the last stage, see <a href="GXSetZTexture.html"><code>GXSetZTexture</code></a>.</P>
38<P>The association of lighting colors, texture coordinates, and texture maps with a TEV stage is set using <a href="GXSetTevOrder.html"><code>GXSetTevOrder</code></a>.&nbsp;The number of texture coordinates available is set using <a href="../TexCoordGen/GXSetNumTexGens.html"><code>GXSetNumTexGens</code></a>.&nbsp;The number of color channels available is set using <a href="../Lighting/GXSetNumChans.html"><code>GXSetNumChans</code></a>.</P>
39<P><a href="../Management/GXInit.html"><code>GXInit</code></a> will set <code><em><strong>nStages</strong></em></code> to <code>1</code>.</P>
40<h2>See Also</h2>
41
42<p><a href="../Management/GXInit.html"><CODE>GXInit</CODE></a><br> <a href="../Geometry/GXSetVtxDesc.html"><CODE>GXSetVtxDesc</CODE></a></p>
43<H2>Revision History</H2>
44<P>03/01/2006 Initial version</P>