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<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/gd.h></CODE></PRE> 16 <DD> 17<PRE><CODE>void 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, 23f32 min_lod, 24f32 max_lod, 25f32 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 );</CODE></PRE> 29</DL> 30<H2>Arguments</H2> 31<TABLE border="1" cellpadding="3" cellspacing="0.1"> 32 <TBODY> 33 <TR> 34<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>id</CODE></EM></STRONG></FONT></STRONG></EM></TD> 35<TD width="520">The hardware texture map <a href="../gx/Enumerated_Types/GXTexMapID.html">ID</a> to change.</TD> 36 </TR> 37 <TR> 38<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>wrap_s</CODE></EM></STRONG></FONT></STRONG></EM></TD> 39<TD width="520">Describes how texture coordinates will be wrapped in the s direction. The following <a href="../gx/Enumerated_Types/GXTexWrapMode.html">values</a> are accepted:<code>GX_CLAMP, GX_REPEAT, GX_MIRROR.</code></TD> 40 </TR> 41 <TR> 42<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>wrap_t</CODE></EM></STRONG></FONT></STRONG></EM></TD> 43<TD width="520">Describes how texture coordinates will be wrapped in the t direction. The following <a href="../gx/Enumerated_Types/GXTexWrapMode.html">values</a> are accepted:<code>GX_CLAMP, GX_REPEAT, GX_MIRROR.</code></TD> 44 </TR> 45 <TR> 46<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>min_filt</CODE></EM></STRONG></FONT></STRONG></EM></TD> 47<TD width="520"><a href="../gx/Enumerated_Types/GXTexFilter.html">Filter mode</a> to use when the texel/pixel ratio is ≥ 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> 48 </TR> 49 <TR> 50<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>mag_filt</CODE></EM></STRONG></FONT></STRONG></EM></TD> 51<TD width="520"><a href="../gx/Enumerated_Types/GXTexFilter.html">Filter mode</a> to use when the texel/pixel ratio is < 1.0. The following values are accepted: <CODE>GX_NEAR, GX_LINEAR</CODE>.</TD> 52 </TR> 53 <TR> 54<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>min_lod</CODE></EM></STRONG></FONT></STRONG></EM></TD> 55<TD width="520">Minimum LOD value. The hardware uses MAX(<STRONG><EM><CODE>min_lod</CODE></EM></STRONG>, lod). The range is from 0.0 to 10.0.</TD> 56 </TR> 57 <TR> 58<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>max_lod</CODE></EM></STRONG></FONT></STRONG></EM></TD> 59<TD width="520">Maximum LOD value. The hardware uses MIN(<STRONG><EM><CODE>max_lod</CODE></EM></STRONG>, lod). The range is from 0.0 to 10.0.</TD> 60 </TR> 61 <TR> 62<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>lod_bias</CODE></EM></STRONG></FONT></STRONG></EM></TD> 63<TD width="520">Bias added to calculate the LOD value.</TD> 64 </TR> 65 <TR> 66<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>bias_clamp</CODE></EM></STRONG></FONT></STRONG></EM></TD> 67<TD width="520">If <code>GX_ENABLE</code>, (LOD + l<STRONG><EM><CODE>lod_bias</CODE></EM></STRONG>) 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> 68 </TR> 69 <TR> 70<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>do_edge_lod</CODE></EM></STRONG></FONT></STRONG></EM></TD> 71<TD width="520">If <CODE>GX_TRUE</CODE> is set, LOD is calculated using adjacent texels. If <CODE>GX_TRUE</CODE> is not set, diagonal texels are used.</TD> 72 </TR> 73 <TR> 74<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>max_aniso</CODE></EM></STRONG></FONT></STRONG></EM></TD> 75<TD width="520">The maximum <a href="../gx/Enumerated_Types/GXAnisotropy.html">anisotropic</a> filter to use.</TD> 76 </TR> 77 </TBODY> 78</TABLE> 79<H2>Return Values</H2> 80<P>None.</P> 81<H2>Description</H2> 82<P>This function is used to set the lookup related parameters for a given hardware texture map ID. 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> 83<H2>See Also</H2> 84<P><A href="../gx/Texture/GXInitTexObj.html"><CODE>GXInitTexObj</CODE></A><BR> <A href="../gx/Texture/GXInitTexObjLOD.html"><CODE>GXInitTexObjLOD</CODE></A><BR> <BR> <A href="GDSetTexImgAttr.html"><CODE>GDSetTexImgAttr</CODE></A><BR> <A href="GDSetTexImgPtr.html"><CODE>GDSetTexImgPtr</CODE></A></P> 85<H2>Revision History</H2> 86<P>03/01/2006 Initial version.</P> 87</BODY> 88</HTML>