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 http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>GDSetTexLookupMode</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXSetTexLookupMode</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/gd.h&gt;
16
17void GDSetTexLookupMode (
18    <A href="../gx/Enumerated_Types/GXTexMapID.html">GXTexMapID</A>    id,
19    <A href="../gx/Enumerated_Types/GXTexWrapMode.html">GXTexWrapMode</A> wrap_s,
20    <A href="../gx/Enumerated_Types/GXTexWrapMode.html">GXTexWrapMode</A> wrap_t,
21    <A href="../gx/Enumerated_Types/GXTexFilter.html">GXTexFilter</A>   min_filt,
22    <A href="../gx/Enumerated_Types/GXTexFilter.html">GXTexFilter</A>   mag_filt,
23    f32           min_lod,
24    f32           max_lod,
25    f32           lod_bias,
26    <A href="../gx/Enumerated_Types/GXBool.html">GXBool</A>        bias_clamp,
27    <A href="../gx/Enumerated_Types/GXBool.html">GXBool</A>        do_edge_lod,
28    <A href="../gx/Enumerated_Types/GXAnisotropy.html">GXAnisotropy</A>  max_aniso );
29</pre></dd></dl>
30
31<H2>Arguments</H2>
32<TABLE class="arguments" border="1" >
33  <TBODY>
34    <TR>
35<TH>id</TH>
36<TD>The hardware texture map <a href="../gx/Enumerated_Types/GXTexMapID.html">ID</a> to change.</TD>
37    </TR>
38    <TR>
39<TH><STRONG><EM><CODE>wrap_s</CODE></EM></STRONG></TH>
40<TD>Describes how texture coordinates will be wrapped in the s direction. The following setting <A href="../gx/Enumerated_Types/GXTexWrapMode.html">values</A> are accepted:<CODE>GX_CLAMP, GX_REPEAT, GX_MIRROR</CODE>.</TD>
41    </TR>
42    <TR>
43<TH><STRONG><EM><CODE>wrap_t</CODE></EM></STRONG></TH>
44<TD>Describes how texture coordinates will be wrapped in the t direction. The following setting <A href="../gx/Enumerated_Types/GXTexWrapMode.html">values</A> are accepted:<CODE>GX_CLAMP, GX_REPEAT, GX_MIRROR</CODE>.</TD>
45    </TR>
46    <TR>
47<TH><STRONG><EM><CODE>min_filt</CODE></EM></STRONG></TH>
48<TD><a href="../gx/Enumerated_Types/GXTexFilter.html">Filter mode</a> to use when the texel/pixel ratio is &#x2265; 1.0. The following values are accepted: <CODE>GX_NEAR, GX_LINEAR, GX_NEAR_MIP_NEAR, GX_LIN_MIP_NEAR, GX_NEAR_MIP_LIN, GX_LIN_MIP_LIN</CODE>.</TD>
49    </TR>
50    <TR>
51<TH><STRONG><EM><CODE>mag_filt</CODE></EM></STRONG></TH>
52<TD><a href="../gx/Enumerated_Types/GXTexFilter.html">Filter mode</a> to use when the texel/pixel ratio is &lt; 1.0. The following values are accepted: <CODE>GX_NEAR, GX_LINEAR</CODE>.</TD>
53    </TR>
54    <TR>
55<TH><STRONG><EM><CODE>min_lod</CODE></EM></STRONG></TH>
56<TD>Minimum LOD value. The hardware uses MAX(<SPAN class="argument">min_lod</SPAN>, lod). The range is from 0.0 to 10.0.</TD>
57    </TR>
58    <TR>
59<TH><STRONG><EM><CODE>max_lod</CODE></EM></STRONG></TH>
60<TD>Maximum LOD value. The hardware uses MIN(<SPAN class="argument">min_lod</SPAN>, lod). The range is from 0.0 to 10.0.</TD>
61    </TR>
62    <TR>
63<TH><STRONG><EM><CODE>lod_bias</CODE></EM></STRONG></TH>
64<TD>Bias added to calculate the LOD value.</TD>
65    </TR>
66    <TR>
67<TH><STRONG><EM><CODE>bias_clamp</CODE></EM></STRONG></TH>
68<TD>If <CODE>GX_ENABLE</CODE>, (LOD + <SPAN class="argument">lod_bias</SPAN>) is clamped so that it is never less than the minimum range of the pixels projected in texture space. Prevents over biasing the LOD when the polygon is perpendicular to the view direction.</TD>
69    </TR>
70    <TR>
71<TH><STRONG><EM><CODE>do_edge_lod</CODE></EM></STRONG></TH>
72<TD>If <CODE>GX_TRUE</CODE> is set, LOD is calculated using adjacent texels, if <CODE>GX_TRUE</CODE> is not set, diagonally opposed texels are used.</TD>
73    </TR>
74    <TR>
75<TH><STRONG><EM><CODE>max_aniso</CODE></EM></STRONG></TH>
76<TD>The maximum <a href="../gx/Enumerated_Types/GXAnisotropy.html">anisotropic</a> filter to use.</TD>
77    </TR>
78  </TBODY>
79</TABLE>
80
81<H2>Return Values</H2>
82<P>None.</P>
83
84<H2>Description</H2>
85<P>This function is used to set the lookup related parameters for a given hardware texture map ID.&nbsp;Unlike the GX library, which uses texture objects, GD functions set the hardware registers directly. The parameters of this function are all related to texture coordinate processing and texture filtering.</P>
86
87<H2>See Also</H2>
88<P class="reference">
89<A href="../gx/Texture/GXInitTexObj.html">GXInitTexObj</A>,
90<A href="../gx/Texture/GXInitTexObjLOD.html">GXInitTexObjLOD</A>,
91<A href="GDSetTexImgAttr.html">GDSetTexImgAttr</A>,
92<A href="GDSetTexImgPtr.html">GDSetTexImgPtr</A>
93</P>
94
95<H2>Revision History</H2>
96<P>
972006/03/01 Initial version.<br>
98</P>
99
100<hr><p>CONFIDENTIAL</p></body>
101</HTML>