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>GXSetTexCoordScaleManually</title>
10</head>
11
12<body>
13
14<h1 align="left">GXSetTexCoordScaleManually</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXSetTexCoordScaleManually(<a href="../Enumerated_Types/GXTexCoordID.html">GXTexCoordID</a> texcoord, GXBool enable,
21                                u16 ss, u16 ts);
22</pre></dd></dl>
23
24<h2>Arguments</h2>
25<TABLE class="arguments" border="1" >
26  <tr>
27<TH>texcoord</TH>
28<TD>Describes which texture coordinate ID is to be changed. Accepted values are: <code>GX_TEXCOORD0</code>, <code>GX_TEXCOORD1</code>, <code>GX_TEXCOORD2</code> through <code>GX_TEXCOORD7</code>.</TD>
29  </tr>
30  <tr>
31<TH><STRONG><EM><CODE>enable</CODE></EM></STRONG></TH>
32<TD>If <CODE>GX_TRUE</CODE>, scale is set manually. If <CODE>GX_FALSE</CODE>, scale is set automatically (<SPAN class="argument">ss</SPAN> and <SPAN class="argument">ts</SPAN> are ignored).</TD>
33  </tr>
34  <tr>
35<TH>ss</TH>
36<TD>Manually set scale value for calculating the S component (width) of the coordinate.</TD>
37  </tr>
38  <tr>
39<TH>ts</TH>
40<TD>Manually set scale value for calculating the T component (height) of the coordinate.</TD>
41  </tr>
42</TABLE>
43
44<h2>Return Values</h2>
45<p>None.</p>
46
47<H2>Description</H2>
48<P>This function lets you manually assign the scale values that are used for a given <SPAN class="argument">texcoord</SPAN>, overwriting the automatic scale values for texture coordinates.&nbsp;Setting the <SPAN class="argument">enable</SPAN> parameter to <CODE>GX_TRUE</CODE></SPAN> gives this behavior.&nbsp;The given <SPAN class="argument">texcoord</SPAN> retains these manually-set scale values until this function is called again. This function is also used to return a given texture coordinate back to an automatically-scaled normal (by setting <SPAN class="argument">enable</SPAN> to <CODE>GX_FALSE</CODE>).</P>
49<P>A texture coordinate is scaled after being calculated by the relevant texgen and before the actual texture lookup.&nbsp;Normally, the scale value is set by the <A href="../Tev/GXSetTevOrder.html"><CODE>GXSetTevOrder</CODE></A> function according to the texture map associated with the texture coordinate. However, there are certain cases where a different scale value is desirable. One such case is when using indirect tiled textures (see the <A href="../Indirect/GXSetTevIndTile.html"><CODE>GXSetTevIndTile</CODE></A> function).</P>
50<P><B>Note:</B> In addition to the texture coordinate scale, GX also automatically sets the texture coordinate range bias mode by default. If you configure a texture coordinate to be scaled manually, the associated range bias is no longer automatically set by GX. Therefore, you have to call the <A href="GXSetTexCoordBias.html"><code>GXSetTexCoordBias</code></A> function as well in order to set the proper bias mode. These two functions should always be called together.</P>
51
52<h2>See Also</h2>
53<P class="reference">
54<A href="GXSetTexCoordBias.html">GXSetTexCoordBias</A>
55</P>
56
57<H2>Revision History</H2>
58<P>
592006/03/01 Initial version.<br>
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</html>