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>GDSetTexCached</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GDSetTexCached</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;revolution/gd.h&gt;</CODE></PRE>
16  <DD>
17  <PRE><CODE>void GDSetTexCached(
18    <A href="../gx/Enumerated_Types/GXTexMapID.html">GXTexMapID</A> id,
19    u32 tmem_even, <A href="../gx/Enumerated_Types/GXTexCacheSize.html">GXTexCacheSize</A> size_even,
20    u32 tmem_odd,  <A href="../gx/Enumerated_Types/GXTexCacheSize.html">GXTexCacheSize</A> size_odd );</CODE></PRE>
21</DL>
22<H2>Arguments</H2>
23<TABLE border="1" cellpadding="3" cellspacing="0.1">
24  <TBODY>
25    <TR>
26<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>id</CODE></EM></STRONG></FONT></STRONG></EM></TD>
27<TD width="520">The hardware texture map <a href="../gx/Enumerated_Types/GXTexMapID.html">ID</a> to change.</TD>
28    </TR>
29    <TR>
30<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>tmem_even</CODE></EM></STRONG></FONT></STRONG></EM></TD>
31<TD width="520">Base pointer in texture memory for even numbered LOD (refer to this <a     href="../gx/Texture/GXInitTexPreLoadRegion.html#TMEM_rules">table</a>). Must be a multiple of 2 KB.</TD>
32    </TR>
33    <TR>
34<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>size_even</CODE></EM></STRONG></FONT></STRONG></EM></TD>
35<TD width="520"><a href="../gx/Enumerated_Types/GXTexCacheSize.html">Size</a> of the even numbered cache. The following values are accepted: <code>GX_TEXCACHE_32K</code>,<code> GX_TEXCACHE_128K</code>, and <code>GX_TEXCACHE_512K.</code></TD>
36    </TR>
37    <TR>
38<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>tmem_odd</CODE></EM></STRONG></FONT></STRONG></EM></TD>
39<TD width="520">Base pointer in texture memory for the odd numbered LOD (refer to this <a     href="../gx/Texture/GXInitTexCacheRegion.html#TMEM_rules">table</a>). Must be a multiple of 2 KB.</TD>
40    </TR>
41    <TR>
42<TD width="120" valign="top" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>size_odd</CODE></EM></STRONG></FONT></STRONG></EM></TD>
43<TD width="520"><a href="../gx/Enumerated_Types/GXTexCacheSize.html">Size</a> of the odd numbered cache. The following values are accepted: <code>GX_TEXCACHE_32K</code>,<code> GX_TEXCACHE_128K</code>, <code>GX_TEXCACHE_512K</code>, and <code>GX_TEXCACHE_NONE.</code></TD>
44    </TR>
45  </TBODY>
46</TABLE>
47<H2>Return Values</H2>
48<P>None.</P>
49<H2>Description</H2>
50<P>This function is used to set a specified hardware texture map ID as cached texture and bind it to a specified region of texture memory (TMEM). Unlike the GX library, which uses texture objects, GD functions set the hardware registers directly.</P>
51<P>A specified texture map can either be cached or preloaded. A cached texture resides in main memory and uses TMEM as a cache. Preloaded textures reside entirely in TMEM. This function sets the texture map to a cached texture while the <code><a href="GDSetTexPreLoaded.html">GDSetTexPreLoaded</a></code> function sets the texture map to a preloaded texture. In either case, the texture map must be bound to a particular region of TMEM. The cache size must be declared for cached textures.</P>
52<P>TMEM is divided into low order and high order banks. The texture may be split between the banks depending upon the texture format. For the management rules, refer to the <code><a href="../gx/Texture/GXInitTexCacheRegion.html#TMEM_rules">GXInitTexCacheRegion</a></code> function.</P>
53<H2>See Also</H2>
54<P><A href="../gx/Texture/GXInitTexCacheRegion.html"><CODE>GXInitTexCacheRegion</CODE></A><BR> <BR> <A href="GDSetTexPreLoaded.html"><CODE>GDSetTexPreLoaded</CODE></A></P>
55<H2>Revision History</H2>
56<P>2006/03/01 Initial version.</P>
57<hr>
58<P>CONFIDENTIAL</p>
59</BODY>
60</HTML>