diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a02230.html | 1977 |
1 files changed, 1977 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02230.html b/docs/doxygen/nel/a02230.html new file mode 100644 index 00000000..1198f36b --- /dev/null +++ b/docs/doxygen/nel/a02230.html @@ -0,0 +1,1977 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NL3D::CAsyncTextureManager class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NL3D::CAsyncTextureManager Class Reference</h1><code>#include <<a class="el" href="a05464.html">async_texture_manager.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Async Loader of textures and Texture Load Balancer. Additionaly, store in RAM for each texture load a very low, DXTC1 compressed version of the texture. Used for some Lod systems. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00053">53</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera0">addTextureRef</a> (const std::string &textName, <a class="el" href="a02873.html">CMeshBaseInstance</a> *instance, const <a class="el" href="a03128.html">NLMISC::CVector</a> &position)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera1">CAsyncTextureManager</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CAsyncTextureManagera1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02268.html">NLMISC::CBitmap</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera2">getCoarseBitmap</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera3">getLastTextureSizeGot</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">get what the system really allows <a href="#NL3D_1_1CAsyncTextureManagera3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera4">getTotalTextureSizeAsked</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">get the async texture Size asked (ie maybe bigger than MaxTotalTextureSize). <a href="#NL3D_1_1CAsyncTextureManagera4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera5">isTextureUpLoaded</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">tells if a texture is loaded in the driver (ie ready to use) <a href="#NL3D_1_1CAsyncTextureManagera5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera6">releaseTexture</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>, <a class="el" href="a02873.html">CMeshBaseInstance</a> *instance)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">release a texture-instance tuple. the texture is released if no more instance use it. <a href="#NL3D_1_1CAsyncTextureManagera6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera7">setupLod</a> (<a class="el" href="a04558.html#a15">uint</a> baseLevel, <a class="el" href="a04558.html#a15">uint</a> maxLevel)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera8">setupMaxHLSColoringPerFrame</a> (<a class="el" href="a04558.html#a15">uint</a> maxCol)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Setup max texture HLS Coloring per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 20K. <a href="#NL3D_1_1CAsyncTextureManagera8"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera9">setupMaxTotalTextureSize</a> (<a class="el" href="a04558.html#a15">uint</a> maxText)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Setup max total texture size allowed. Default is 10Mo. <a href="#NL3D_1_1CAsyncTextureManagera9"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera10">setupMaxUploadPerFrame</a> (<a class="el" href="a04558.html#a15">uint</a> maxup)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Setup max texture upload in driver per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 64K. <a href="#NL3D_1_1CAsyncTextureManagera10"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update</a> (<a class="el" href="a02434.html">IDriver</a> *pDriver)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera12">~CAsyncTextureManager</a> ()</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02638.html">CHLSTextureManager</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">HLSManager</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">User is free to add bank to this manager. Other methods are used by the async manager. <a href="#NL3D_1_1CAsyncTextureManagero0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef TTextureEntryMap::iterator </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery0">ItTextureEntryMap</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map< std::string,<br> + <a class="el" href="a04558.html#a15">uint</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">TTextureEntryMap</a></td></tr> + +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd0">deleteTexture</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd1">getNextTextureToUpLoad</a> (<a class="el" href="a04558.html#a15">uint</a> &nTotalColored, <a class="el" href="a02434.html">IDriver</a> *pDriver)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd2">updateTextureLodSystem</a> (<a class="el" href="a02434.html">IDriver</a> *pDriver)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd3">uploadTexturePart</a> (<a class="el" href="a03487.html">ITexture</a> *pText, <a class="el" href="a02434.html">IDriver</a> *pDriver, <a class="el" href="a04558.html#a15">uint</a> &nTotalUpload)</td></tr> + +<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerh0">validDXTCMipMap</a> (<a class="el" href="a03487.html">ITexture</a> *pText)</td></tr> + +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02233.html">CTextureLod</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02231.html">CTextureBase</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">_CurrentUploadTextureLine</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a04558.html#a15">uint</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a02232.html">CTextureEntry</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">TTextureEntryMap</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a04558.html#a15">uint</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a></td></tr> + +</table> +<hr><h2>Member Typedef Documentation</h2> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagery0" doxytag="NL3D::CAsyncTextureManager::ItTextureEntryMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> typedef TTextureEntryMap::iterator <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery0">NL3D::CAsyncTextureManager::ItTextureEntryMap</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00122">122</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagery1" doxytag="NL3D::CAsyncTextureManager::TTextureEntryMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> typedef std::map<std::string, <a class="el" href="a04558.html#a15">uint</a>> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">NL3D::CAsyncTextureManager::TTextureEntryMap</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00121">121</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera1" doxytag="NL3D::CAsyncTextureManager::CAsyncTextureManager" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NL3D::CAsyncTextureManager::CAsyncTextureManager </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00104">104</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00218">_LastTextureSizeGot</a>, <a class="el" href="a05464.html#l00215">_MaxHLSColoringPerFrame</a>, <a class="el" href="a05464.html#l00213">_MaxLodLevel</a>, <a class="el" href="a05464.html#l00216">_MaxTotalTextureSize</a>, <a class="el" href="a05464.html#l00214">_MaxUploadPerFrame</a>, and <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>. +<p> +<div class="fragment"><pre>00105 { +00106 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>= 3; +00107 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a>= 1; +00108 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>= 65536; +00109 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a>= 20*1024; +00110 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL; +00111 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a>= 10*1024*1024; +00112 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>= 0; +00113 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a>= 0; +00114 +00115 <span class="comment">// Do not share this texture, to force uploading of the lods.</span> +00116 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= NULL; +00117 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera12" doxytag="NL3D::CAsyncTextureManager::~CAsyncTextureManager" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NL3D::CAsyncTextureManager::~<a class="el" href="a02230.html">CAsyncTextureManager</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00089">89</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00223">_TextureEntryMap</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00090 { +00091 <span class="comment">// For all remaining textures, delete them.</span> +00092 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();i++) +00093 { +00094 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]) +00095 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd0">deleteTexture</a>(i); +00096 } +00097 +00098 <span class="comment">// there must be no waitting textures, nor map, nor current upload texture</span> +00099 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.empty() && <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.empty() && <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==NULL +00100 && <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>==NULL); +00101 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera0" doxytag="NL3D::CAsyncTextureManager::addTextureRef" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CAsyncTextureManager::addTextureRef </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname" nowrap> <em>textName</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02873.html">CMeshBaseInstance</a> * </td> + <td class="mdname" nowrap> <em>instance</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> & </td> + <td class="mdname" nowrap> <em>position</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Add a reference to a texture owned by an instance. If the texture still exist, only the refcount is incremented Else If texture is found in the HLSTextureManager, it is builded (async) from it, else Begin Async loading<p> +ThereFore, only <a class="el" href="a03502.html">CTextureFile</a> are possible. Note also that the texture is uploaded with mipmap by default, and UpLoadFormat is also default (say <a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew2">ITexture::Auto</a>)<p> +If the texture file is not a DDS with mipmap, this is an error. But the system doens't fail and the file is entirely loaded and uploaded. The problem is that upload is not cut according to maxUpLoadPerFrame, so some freeze may occur. +<p> +Definition at line <a class="el" href="a05463.html#l00151">151</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05994.html#l00237">NL3D::CMeshBaseInstance::_AsyncTextureToLoadRefCount</a>, <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00222">_FreeTextureIds</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00223">_TextureEntryMap</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05794.html#l00077">NL3D::CHLSTextureManager::findTexture()</a>, <a class="el" href="a05464.html#l00057">HLSManager</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00122">ItTextureEntryMap</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>. +<p> +Referenced by <a class="el" href="a05993.html#l00445">NL3D::CMeshBaseInstance::startAsyncTextureLoading()</a>. +<p> +<div class="fragment"><pre>00152 { +00153 <a class="code" href="a04558.html#a15">uint</a> ret; +00154 +00155 <span class="comment">// strlwr name</span> +00156 string textName= textNameNotLwr; +00157 <a class="code" href="a05378.html#a273">strlwr</a>(textName); +00158 +00159 <span class="comment">// find the texture in map</span> +00160 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagery0">ItTextureEntryMap</a> it; +00161 it= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.find(textName); +00162 +00163 <span class="comment">// not found, create.</span> +00164 <span class="keywordflow">if</span>(it==<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.end()) +00165 { +00166 <span class="comment">// search a free id.</span> +00167 <a class="code" href="a04558.html#a15">uint</a> i= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size(); +00168 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.empty()) +00169 { +00170 i= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.back(); +00171 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.pop_back(); +00172 } +00173 <span class="comment">// resize if needed.</span> +00174 <span class="keywordflow">if</span>(i>=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size()) +00175 { +00176 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.push_back(NULL); +00177 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.reserve(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.capacity()); +00178 } +00179 +00180 <span class="comment">// alloc new.</span> +00181 CTextureEntry *text= <span class="keyword">new</span> CTextureEntry(); +00182 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]= text; +00183 text->Texture= <span class="keyword">new</span> CTextureFile; +00184 <span class="comment">// Do not allow degradation.</span> +00185 text->Texture->setAllowDegradation(<span class="keyword">false</span>); +00186 +00187 <span class="comment">// add to map.</span> +00188 it= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.insert(make_pair(textName, i)).first; +00189 <span class="comment">// bkup the it for deletion</span> +00190 text->ItMap= it; +00191 +00192 <span class="comment">// Start Color or Async loading.</span> +00193 text->Texture->setFileName(textName); +00194 <span class="comment">// First try with the HLSManager</span> +00195 <a class="code" href="a04558.html#a14">sint</a> colorTextId= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">HLSManager</a>.findTexture(textName); +00196 <span class="comment">// If found</span> +00197 <span class="keywordflow">if</span>(colorTextId!=-1) +00198 { +00199 <span class="comment">// Mark the texture as Loaded, and ready to colorize (done in update()).</span> +00200 text->Loaded= <span class="keyword">true</span>; +00201 text->BuildFromHLSManager= <span class="keyword">true</span>; +00202 text->HLSManagerTextId= colorTextId; +00203 } +00204 <span class="comment">// else must async load it.</span> +00205 <span class="keywordflow">else</span> +00206 { +00207 <span class="comment">// start to load a small DDS version if possible</span> +00208 text->Texture->setMipMapSkipAtLoad(_BaseLodLevel); +00209 <span class="comment">// load it async.</span> +00210 CAsyncFileManager3D::getInstance().loadTexture(text->Texture, &text->Loaded, position); +00211 } +00212 <span class="comment">// Add to a list so we can check each frame if it has ended.</span> +00213 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.push_back(i); +00214 } +00215 +00216 <span class="comment">// get the id of the text entry.</span> +00217 ret= it->second; +00218 +00219 <span class="comment">// add this instance to the list of ones which use this texture.</span> +00220 CTextureEntry *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[ret]; +00221 text->Instances.push_back(instance); +00222 +00223 <span class="comment">// if the texture is not yet ready, must increment the instance refCount.</span> +00224 <span class="keywordflow">if</span>(!text->UpLoaded) +00225 instance->_AsyncTextureToLoadRefCount++; +00226 +00227 <span class="keywordflow">return</span> ret; +00228 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd0" doxytag="NL3D::CAsyncTextureManager::deleteTexture" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::deleteTexture </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>id</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00232">232</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00222">_FreeTextureIds</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00223">_TextureEntryMap</a>, <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05464.html#l00200">NL3D::CAsyncTextureManager::CTextureEntry::HDLod</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00176">NL3D::CAsyncTextureManager::CTextureEntry::ItMap</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a05464.html#l00178">NL3D::CAsyncTextureManager::CTextureEntry::Loaded</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05464.html#l00197">NL3D::CAsyncTextureManager::CTextureEntry::TotalTextureSizeAsked</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00302">releaseTexture()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>. +<p> +<div class="fragment"><pre>00233 { +00234 CTextureEntry *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>]; +00235 +00236 +00237 <span class="comment">// **** Stop AsyncLoading/UpLoading of main texture.</span> +00238 +00239 <span class="comment">// stop async loading if not ended</span> +00240 <span class="keywordflow">if</span>(!text->Loaded) +00241 { +00242 CAsyncFileManager3D::getInstance().cancelLoadTexture(text->Texture); +00243 } +00244 +00245 <span class="comment">// remove map entry</span> +00246 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.erase(text->ItMap); +00247 +00248 <span class="comment">// remove in list of waiting textures</span> +00249 vector<uint>::iterator itWait= find(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.begin(),<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.end(), <span class="keywordtype">id</span>); +00250 <span class="keywordflow">if</span>(itWait!=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.end()) +00251 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.erase(itWait); +00252 +00253 <span class="comment">// If it was the currently uploaded one, abort</span> +00254 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==text) +00255 { +00256 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL; +00257 } +00258 +00259 <span class="comment">// If not uploaded.</span> +00260 <span class="keywordflow">if</span>(!text->UpLoaded) +00261 { +00262 <span class="comment">// For all its remainding instances, dec refcount</span> +00263 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<text->Instances.size();i++) +00264 { +00265 text->Instances[i]->_AsyncTextureToLoadRefCount--; +00266 } +00267 } +00268 +00269 <span class="comment">// remove from bench</span> +00270 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>-= text->TotalTextureSizeAsked; +00271 +00272 +00273 <span class="comment">// **** Stop AsyncLoading/UpLoading of HDLod 's texture.</span> +00274 +00275 <span class="comment">// Check if must stop TextureLod loading/uploading.</span> +00276 CTextureLod *textLod= &text->HDLod; +00277 <span class="keywordflow">if</span>(textLod==<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>) +00278 { +00279 <span class="comment">// stop the async loading if not ended.</span> +00280 <span class="keywordflow">if</span>(!textLod->Loaded) +00281 { +00282 CAsyncFileManager3D::getInstance().cancelLoadTexture(textLod->Texture); +00283 } +00284 <span class="comment">// stop uploading if was me</span> +00285 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==textLod) +00286 { +00287 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL; +00288 } +00289 <span class="comment">// stop loading me.</span> +00290 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= NULL; +00291 } +00292 +00293 <span class="comment">// At last delete texture entry.</span> +00294 <span class="keyword">delete</span> text; +00295 _TextureEntries[<span class="keywordtype">id</span>]= NULL; +00296 <span class="comment">// add a new free id.</span> +00297 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.push_back(<span class="keywordtype">id</span>); +00298 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera2" doxytag="NL3D::CAsyncTextureManager::getCoarseBitmap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a02268.html">NLMISC::CBitmap</a> * NL3D::CAsyncTextureManager::getCoarseBitmap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>id</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +get the RAM LowDef version of a texture. Used For CLodCharacters return NULL if bad Id or if the texture is still not loaded. The bitmap returned has no mipmaps and should be in DXTC1 (not guaranteed). +<p> +Definition at line <a class="el" href="a05463.html#l00343">343</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00203">NL3D::CAsyncTextureManager::CTextureEntry::CoarseBitmap</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>. +<p> +Referenced by <a class="el" href="a06393.html#l00866">NL3D::CSkeletonModel::computeLodTexture()</a>. +<p> +<div class="fragment"><pre>00344 { +00345 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>>=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size()) +00346 <span class="keywordflow">return</span> NULL; +00347 CTextureEntry *textEntry= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>]; +00348 <span class="keywordflow">if</span>(!textEntry) +00349 <span class="keywordflow">return</span> NULL; +00350 +00351 <span class="comment">// if the textEntry not uploaded, return NULL</span> +00352 <span class="keywordflow">if</span>(!textEntry->UpLoaded) +00353 <span class="keywordflow">return</span> NULL; +00354 +00355 <span class="comment">// ok return the CoarseBitmap</span> +00356 <span class="keywordflow">return</span> &textEntry->CoarseBitmap; +00357 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera3" doxytag="NL3D::CAsyncTextureManager::getLastTextureSizeGot" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CAsyncTextureManager::getLastTextureSizeGot </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +get what the system really allows +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00115">115</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +References <a class="el" href="a05464.html#l00218">_LastTextureSizeGot</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01375">NL3D::CDriverUser::getLastAsyncTextureSizeGot()</a>. +<p> +<div class="fragment"><pre>00115 {<span class="keywordflow">return</span> <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd1" doxytag="NL3D::CAsyncTextureManager::getNextTextureToUpLoad" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::getNextTextureToUpLoad </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> & </td> + <td class="mdname" nowrap> <em>nTotalColored</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> * </td> + <td class="mdname" nowrap> <em>pDriver</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00553">553</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00229">_CurrentUploadTextureLine</a>, <a class="el" href="a05464.html#l00228">_CurrentUploadTextureMipMap</a>, <a class="el" href="a05464.html#l00215">_MaxHLSColoringPerFrame</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05464.html#l00184">NL3D::CAsyncTextureManager::CTextureEntry::BuildFromHLSManager</a>, <a class="el" href="a05794.html#l00101">NL3D::CHLSTextureManager::buildTexture()</a>, <a class="el" href="a05464.html#l00057">HLSManager</a>, <a class="el" href="a05464.html#l00186">NL3D::CAsyncTextureManager::CTextureEntry::HLSManagerTextId</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a05464.html#l00178">NL3D::CAsyncTextureManager::CTextureEntry::Loaded</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00361">update()</a>. +<p> +<div class="fragment"><pre>00554 { +00555 <span class="comment">// Reset texture uploading</span> +00556 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL; +00557 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>= 0; +00558 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">_CurrentUploadTextureLine</a>= 0; +00559 +00560 <span class="comment">// Search in WaitingTextures if one has ended async loading</span> +00561 vector<uint>::iterator it; +00562 <span class="keywordflow">for</span>(it=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.begin();it!=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.end();it++) +00563 { +00564 CTextureEntry *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[*it]; +00565 <span class="comment">// If Async loading done.</span> +00566 <span class="keywordflow">if</span>(text->Loaded) +00567 { +00568 <span class="comment">// Is it a "texture to color" with HLSManager? yes=> color it now.</span> +00569 <span class="keywordflow">if</span>(text->BuildFromHLSManager) +00570 { +00571 <span class="comment">// If not beyond the max coloring texture</span> +00572 <span class="keywordflow">if</span>(nTotalColored<<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a>) +00573 { +00574 <span class="comment">// Build the texture directly in the TextureFile.</span> +00575 <a class="code" href="a04199.html#a9">nlverify</a>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">HLSManager</a>.buildTexture(text->HLSManagerTextId, *text->Texture)); +00576 <span class="comment">// Must validate the textureFile generation. NB: little weird since this is not really a textureFile.</span> +00577 <span class="comment">// But it is the easier way to do it.</span> +00578 text->Texture->validateGenerateFlag(); +00579 <span class="comment">// compute the texture size (approx). NB: DXTC5 means 1 pixel==1 byte.</span> +00580 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a>= (<a class="code" href="a04558.html#a15">uint</a>)(text->Texture->getSize(0)*1.33); +00581 <span class="comment">// Add it to the num of colorised texture done in current update().</span> +00582 nTotalColored+= <a class="code" href="a04223.html#a587">size</a>; +00583 } +00584 <span class="comment">// Else must quit and don't update any more texture this frame (_CurrentUploadTexture==NULL)</span> +00585 <span class="keywordflow">else</span> +00586 <span class="keywordflow">return</span>; +00587 } +00588 +00589 <span class="comment">// upload this one</span> +00590 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= text; +00591 <span class="comment">// remove it from list of waiting textures</span> +00592 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.erase(it); +00593 <span class="comment">// found => end.</span> +00594 <span class="keywordflow">return</span>; +00595 } +00596 } +00597 +00598 <span class="comment">// If here, and if no more waiting textures, update the Lod system.</span> +00599 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.empty()) +00600 { +00601 <span class="comment">// if end to load the current lod.</span> +00602 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a> && <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>-><a class="code" href="a02233.html#NL3D_1_1CAsyncTextureManager_1_1CTextureLodo2">Loaded</a>) +00603 { +00604 <span class="comment">// upload this one</span> +00605 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>; +00606 <span class="keywordflow">return</span>; +00607 } +00608 +00609 <span class="comment">// if no Lod texture currently loading, try to load/unload one</span> +00610 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a> == NULL) +00611 { +00612 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd2">updateTextureLodSystem</a>(pDriver); +00613 } +00614 } +00615 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera4" doxytag="NL3D::CAsyncTextureManager::getTotalTextureSizeAsked" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CAsyncTextureManager::getTotalTextureSizeAsked </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +get the async texture Size asked (ie maybe bigger than MaxTotalTextureSize). +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00113">113</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +References <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01367">NL3D::CDriverUser::getTotalAsyncTextureSizeAsked()</a>. +<p> +<div class="fragment"><pre>00113 {<span class="keywordflow">return</span> <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera5" doxytag="NL3D::CAsyncTextureManager::isTextureUpLoaded" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NL3D::CAsyncTextureManager::isTextureUpLoaded </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>id</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +tells if a texture is loaded in the driver (ie ready to use) +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00334">334</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00335 { +00336 <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keywordtype">id</span><<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size()); +00337 <a class="code" href="a04199.html#a6">nlassert</a>(_TextureEntries[<span class="keywordtype">id</span>]); +00338 <span class="keywordflow">return</span> <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>]->UpLoaded; +00339 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera6" doxytag="NL3D::CAsyncTextureManager::releaseTexture" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::releaseTexture </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>id</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02873.html">CMeshBaseInstance</a> * </td> + <td class="mdname" nowrap> <em>instance</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +release a texture-instance tuple. the texture is released if no more instance use it. +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00302">302</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>. +<p> +Referenced by <a class="el" href="a05993.html#l00486">NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures()</a>. +<p> +<div class="fragment"><pre>00303 { +00304 <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keywordtype">id</span><<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size()); +00305 <a class="code" href="a04199.html#a6">nlassert</a>(_TextureEntries[<span class="keywordtype">id</span>]); +00306 +00307 <span class="comment">// find an instance in this texture an remove it.</span> +00308 CTextureEntry *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>]; +00309 <a class="code" href="a04558.html#a15">uint</a> instSize= text->Instances.size(); +00310 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i<instSize;i++) +00311 { +00312 <span class="keywordflow">if</span>(text->Instances[i]== instance) +00313 { +00314 <span class="comment">// Must first release the refCount if the texture is not uploaded</span> +00315 <span class="keywordflow">if</span>(!text->UpLoaded) +00316 text->Instances[i]->_AsyncTextureToLoadRefCount--; +00317 <span class="comment">// remove it by swapping with last texture</span> +00318 text->Instances[i]= text->Instances[instSize-1]; +00319 text->Instances.pop_back(); +00320 <span class="comment">// must stop: remove only the first occurence of instance.</span> +00321 <span class="keywordflow">break</span>; +00322 } +00323 } +00324 +00325 <span class="comment">// if no more instance occurence, the texture is no more used => release it.</span> +00326 <span class="keywordflow">if</span>(text->Instances.empty()) +00327 { +00328 <span class="comment">// do all the good stuff</span> +00329 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd0">deleteTexture</a>(<span class="keywordtype">id</span>); +00330 } +00331 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera7" doxytag="NL3D::CAsyncTextureManager::setupLod" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::setupLod </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>baseLevel</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>maxLevel</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +setup the mipMap levels. When the texture is first added, it is loaded skipping the baseLevel first mipmap During time, furhter mipmap are loaded, according to instance position etc... maxLevel tells where to stop. If 0, the texture will finally be entirely uploaded. Default is 3,1. +<p> +Definition at line <a class="el" href="a05463.html#l00121">121</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00213">_MaxLodLevel</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01333">NL3D::CDriverUser::setupAsyncTextureLod()</a>. +<p> +<div class="fragment"><pre>00122 { +00123 <a class="code" href="a04199.html#a6">nlassert</a>(baseLevel>=maxLevel); +00124 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>= baseLevel; +00125 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a>= maxLevel; +00126 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera8" doxytag="NL3D::CAsyncTextureManager::setupMaxHLSColoringPerFrame" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::setupMaxHLSColoringPerFrame </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>maxCol</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Setup max texture HLS Coloring per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 20K. +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00137">137</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00215">_MaxHLSColoringPerFrame</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01384">NL3D::CDriverUser::setupMaxHLSColoringPerFrame()</a>. +<p> +<div class="fragment"><pre>00138 { +00139 <span class="keywordflow">if</span>(maxCol>0) +00140 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a>= maxCol; +00141 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera9" doxytag="NL3D::CAsyncTextureManager::setupMaxTotalTextureSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::setupMaxTotalTextureSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>maxText</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Setup max total texture size allowed. Default is 10Mo. +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00144">144</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00216">_MaxTotalTextureSize</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01359">NL3D::CDriverUser::setupMaxTotalAsyncTextureSize()</a>. +<p> +<div class="fragment"><pre>00145 { +00146 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a>= maxText; +00147 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera10" doxytag="NL3D::CAsyncTextureManager::setupMaxUploadPerFrame" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::setupMaxUploadPerFrame </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>maxup</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Setup max texture upload in driver per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 64K. +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00130">130</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00214">_MaxUploadPerFrame</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01341">NL3D::CDriverUser::setupAsyncTextureMaxUploadPerFrame()</a>. +<p> +<div class="fragment"><pre>00131 { +00132 <span class="keywordflow">if</span>(maxup>0) +00133 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>= maxup; +00134 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagera11" doxytag="NL3D::CAsyncTextureManager::update" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::update </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>pDriver</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +update the manager. New loaded texture are uploaded. Instances are updated to know if all their pending textures have been uploaded. +<p> +Definition at line <a class="el" href="a05463.html#l00361">361</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00213">_MaxLodLevel</a>, <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>, <a class="el" href="a05464.html#l00189">NL3D::CAsyncTextureManager::CTextureEntry::BaseSize</a>, <a class="el" href="a05464.html#l00182">NL3D::CAsyncTextureManager::CTextureEntry::CanHaveLOD</a>, <a class="el" href="a05463.html#l00059">NL3D::CAsyncTextureManager::CTextureEntry::createCoarseBitmap()</a>, <a class="el" href="a05464.html#l00157">NL3D::CAsyncTextureManager::CTextureLod::ExtraSize</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a05464.html#l00200">NL3D::CAsyncTextureManager::CTextureEntry::HDLod</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00132">NL3D::CAsyncTextureManager::CTextureBase::isTextureEntry()</a>, <a class="el" href="a05464.html#l00151">NL3D::CAsyncTextureManager::CTextureLod::Level</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a06506.html#l00327">NL3D::ITexture::release()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera80">NL3D::IDriver::swapTextureHandle()</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05464.html#l00147">NL3D::CAsyncTextureManager::CTextureLod::TextureEntry</a>, <a class="el" href="a05464.html#l00197">NL3D::CAsyncTextureManager::CTextureEntry::TotalTextureSizeAsked</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05464.html#l00155">NL3D::CAsyncTextureManager::CTextureLod::UpLoaded</a>, <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>, <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>, and <a class="el" href="a05463.html#l00619">validDXTCMipMap()</a>. +<p> +Referenced by <a class="el" href="a05657.html#l01349">NL3D::CDriverUser::updateAsyncTexture()</a>. +<p> +<div class="fragment"><pre>00362 { +00363 <a class="code" href="a04558.html#a15">uint</a> nTotalUploaded = 0; +00364 <a class="code" href="a04558.html#a15">uint</a> nTotalColored = 0; +00365 +00366 <span class="comment">// if no texture to upload, get the next one</span> +00367 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==NULL) +00368 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd1">getNextTextureToUpLoad</a>(nTotalColored, pDriver); +00369 +00370 <span class="comment">// while some texture to upload</span> +00371 <span class="keywordflow">while</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>) +00372 { +00373 ITexture *pText= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>-><a class="code" href="a02231.html#NL3D_1_1CAsyncTextureManager_1_1CTextureLodo3">Texture</a>; +00374 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd3">uploadTexturePart</a>(pText, pDriver, nTotalUploaded)) +00375 { +00376 <span class="comment">// Stuff for TextureEntry</span> +00377 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>-><a class="code" href="a02231.html#NL3D_1_1CAsyncTextureManager_1_1CTextureLoda1">isTextureEntry</a>()) +00378 { +00379 <a class="code" href="a04558.html#a15">uint</a> i; +00380 CTextureEntry *textEntry= static_cast<CTextureEntry*>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>); +00381 <span class="comment">// If we are here, the texture is finally entirely uploaded. Compile it!</span> +00382 textEntry->UpLoaded= <span class="keyword">true</span>; +00383 <span class="comment">// Can Have lod if texture is DXTC and have mipMaps! Also disalbe if system disable it</span> +00384 textEntry->CanHaveLOD= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerh0">validDXTCMipMap</a>(pText) && <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>><a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a>; +00385 <span class="comment">// compute the size it takes in VRAM</span> +00386 <a class="code" href="a04558.html#a15">uint</a> baseMipMapSize= pText->getSize(0)*CBitmap::bitPerPixels[pText->getPixelFormat()]/8; +00387 <span class="comment">// full size with mipmap</span> +00388 textEntry->BaseSize= (<a class="code" href="a04558.html#a15">uint</a>)(baseMipMapSize*1.33f); +00389 <span class="comment">// UpLoaded !! => signal all instances.</span> +00390 <span class="keywordflow">for</span>(i=0;i<textEntry->Instances.size();i++) +00391 { +00392 textEntry->Instances[i]->_AsyncTextureToLoadRefCount--; +00393 } +00394 +00395 <span class="comment">// Create the coarse bitmap with the text (NB: still in memory here)</span> +00396 textEntry->createCoarseBitmap(); +00397 +00398 <span class="comment">// If CanHaveLOD, create now the lods entries.</span> +00399 <span class="keywordflow">if</span>(textEntry->CanHaveLOD) +00400 { +00401 <span class="comment">/* Allow only the MaxLod to be loaded async</span> +00402 <span class="comment"> This is supposed to be faster since a fseek is much longer than a texture Read.</span> +00403 <span class="comment"> Then it is more intelligent to read only One texture (the High Def), than to try to</span> +00404 <span class="comment"> read intermediate ones (512, 256, 128) because this made 3 more fseek.</span> +00405 <span class="comment"> */</span> +00406 <span class="comment">// create only the MaxLod possible entry</span> +00407 CTextureLod &textLod= textEntry->HDLod; +00408 <span class="comment">// fill textLod</span> +00409 textLod.TextureEntry= textEntry; +00410 textLod.Level= _MaxLodLevel; +00411 <span class="comment">// extra size of the lod only (important for LoadBalacing in updateTextureLodSystem())</span> +00412 textLod.ExtraSize= textEntry->BaseSize*(1<<(2*(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>-_MaxLodLevel))) - textEntry->BaseSize; +00413 <span class="comment">// not yet loaded/upLoaded</span> +00414 textLod.Loaded= <span class="keyword">false</span>; +00415 textLod.UpLoaded= <span class="keyword">false</span>; +00416 } +00417 +00418 <span class="comment">// compute texture size for bench</span> +00419 textEntry->TotalTextureSizeAsked= textEntry->BaseSize + textEntry->HDLod.ExtraSize; +00420 +00421 <span class="comment">// Add texture size to global texture size</span> +00422 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>+= textEntry->TotalTextureSizeAsked; +00423 } +00424 <span class="comment">// else, stuff for textureLod.</span> +00425 <span class="keywordflow">else</span> +00426 { +00427 CTextureLod *textLod= static_cast<CTextureLod*>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>); +00428 <span class="comment">// Swap the uploaded Driver Handle with the Main texture.</span> +00429 pDriver->swapTextureHandle(*textLod->Texture, *textLod->TextureEntry->Texture); +00430 <span class="comment">// Flag the Lod.</span> +00431 textLod->UpLoaded= <span class="keyword">true</span>; +00432 <span class="comment">// Ok, ended to completly load this textureLod.</span> +00433 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= NULL; +00434 } +00435 +00436 <span class="comment">// finally uploaded in VRAM, can release the RAM texture memory</span> +00437 pText->release(); +00438 +00439 <span class="comment">// if not break because can't upload all parts, get next texture to upload</span> +00440 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL; +00441 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd1">getNextTextureToUpLoad</a>(nTotalColored, pDriver); +00442 } +00443 <span class="keywordflow">else</span> +00444 <span class="comment">// Fail to upload all, abort.</span> +00445 <span class="keywordflow">return</span>; +00446 } +00447 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd2" doxytag="NL3D::CAsyncTextureManager::updateTextureLodSystem" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CAsyncTextureManager::updateTextureLodSystem </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>pDriver</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00629">629</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00218">_LastTextureSizeGot</a>, <a class="el" href="a05464.html#l00216">_MaxTotalTextureSize</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00189">NL3D::CAsyncTextureManager::CTextureEntry::BaseSize</a>, <a class="el" href="a05464.html#l00182">NL3D::CAsyncTextureManager::CTextureEntry::CanHaveLOD</a>, <a class="el" href="a05464.html#l00200">NL3D::CAsyncTextureManager::CTextureEntry::HDLod</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00151">NL3D::CAsyncTextureManager::CTextureLod::Level</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a05464.html#l00163">NL3D::CAsyncTextureManager::CTextureLodToSort::Lod</a>, <a class="el" href="a05464.html#l00193">NL3D::CAsyncTextureManager::CTextureEntry::MinDistance</a>, <a class="el" href="a05464.html#l00195">NL3D::CAsyncTextureManager::CTextureEntry::MinPosition</a>, <a class="el" href="a05463.html#l00041">NL3D_ATM_MIN_DISTANCE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05464.html#l00164">NL3D::CAsyncTextureManager::CTextureLodToSort::Position</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera80">NL3D::IDriver::swapTextureHandle()</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05464.html#l00147">NL3D::CAsyncTextureManager::CTextureLod::TextureEntry</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05464.html#l00155">NL3D::CAsyncTextureManager::CTextureLod::UpLoaded</a>, and <a class="el" href="a05464.html#l00149">NL3D::CAsyncTextureManager::CTextureLod::Weight</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>. +<p> +<div class="fragment"><pre>00630 { +00631 <a class="code" href="a04558.html#a14">sint</a> i; +00632 +00633 <span class="comment">// the array to sort</span> +00634 <span class="keyword">static</span> vector<CTextureLodToSort> lodArray; +00635 lodArray.clear(); +00636 <a class="code" href="a04558.html#a15">uint</a> reserveSize= 0; +00637 +00638 <span class="comment">// for each texture entry compute min distance of use</span> +00639 <span class="comment">//=============</span> +00640 <a class="code" href="a04558.html#a15">uint</a> currentBaseSize= 0; +00641 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();i++) +00642 { +00643 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]) +00644 <span class="keywordflow">continue</span>; +00645 CTextureEntry &text= *<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]; +00646 <span class="comment">// do it only for Lodable textures</span> +00647 <span class="keywordflow">if</span>(text.CanHaveLOD) +00648 { +00649 text.MinDistance= FLT_MAX; +00650 <span class="comment">// for all instances.</span> +00651 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0;j<text.Instances.size();j++) +00652 { +00653 <span class="keywordtype">float</span> instDist= text.Instances[j]->getAsyncTextureDistance(); +00654 +00655 <span class="keywordflow">if</span> (instDist<text.MinDistance) +00656 { +00657 text.MinPosition = text.Instances[j]->getPos(); +00658 text.MinDistance = instDist; +00659 } +00660 } +00661 +00662 <span class="comment">// avoid /0</span> +00663 text.MinDistance= max(NL3D_ATM_MIN_DISTANCE, text.MinDistance); +00664 +00665 <span class="comment">// how many textLods to add</span> +00666 reserveSize++; +00667 +00668 <span class="comment">// the minimum mem size the system take with base lod.</span> +00669 currentBaseSize+= text.BaseSize; +00670 } +00671 } +00672 <span class="comment">// reserve space</span> +00673 lodArray.reserve(reserveSize); +00674 +00675 +00676 <span class="comment">// for each texture lod compute weight, and append</span> +00677 <span class="comment">//=============</span> +00678 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();i++) +00679 { +00680 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]) +00681 <span class="keywordflow">continue</span>; +00682 CTextureEntry &text= *<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]; +00683 <span class="comment">// do it only for Lodable textures</span> +00684 <span class="keywordflow">if</span>(text.CanHaveLOD) +00685 { +00686 <span class="comment">// This Weight is actually a screen Pixel Ratio! (divide by distance)</span> +00687 CTextureLod *textLod= &text.HDLod; +00688 textLod->Weight= (1<<textLod->Level) / text.MinDistance; +00689 <span class="comment">// add to array</span> +00690 CTextureLodToSort toSort; +00691 toSort.Lod = textLod; +00692 toSort.Position = text.MinPosition; +00693 lodArray.push_back(toSort); +00694 } +00695 } +00696 +00697 +00698 <span class="comment">// sort</span> +00699 <span class="comment">//=============</span> +00700 sort(lodArray.begin(), lodArray.end()); +00701 +00702 +00703 <span class="comment">// Compute lod to load/unload</span> +00704 <span class="comment">//=============</span> +00705 <span class="comment">// Compute Pivot, ie what lods have to be loaded, and what lods do not</span> +00706 <a class="code" href="a04558.html#a15">uint</a> pivot= 0; +00707 <a class="code" href="a04558.html#a15">uint</a> currentWantedSize= currentBaseSize; +00708 <a class="code" href="a04558.html#a15">uint</a> currentLoadedSize= currentBaseSize; +00709 <span class="keywordflow">for</span>(i=lodArray.size()-1;i>=0;i--) +00710 { +00711 <a class="code" href="a04558.html#a15">uint</a> lodSize= lodArray[i].Lod->ExtraSize; +00712 currentWantedSize+= lodSize; +00713 <span class="keywordflow">if</span>(lodArray[i].Lod->UpLoaded) +00714 currentLoadedSize+= lodSize; +00715 <span class="comment">// if > max allowed, stop the pivot here. NB: the pivot is included in the "must load them" part.</span> +00716 <span class="keywordflow">if</span>(currentWantedSize > <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a>) +00717 { +00718 pivot= i; +00719 <span class="keywordflow">break</span>; +00720 } +00721 } +00722 <span class="comment">// continue to count currentLoadedSize</span> +00723 <span class="keywordflow">for</span>(;i>=0;i--) +00724 { +00725 <span class="keywordflow">if</span>(lodArray[i].Lod->UpLoaded) +00726 currentLoadedSize+= lodArray[i].Lod->ExtraSize; +00727 } +00728 <span class="comment">// save bench.</span> +00729 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a>= currentLoadedSize; +00730 +00731 +00732 <span class="comment">// if the loadedSize is inferior to the wanted size, we can load a new LOD</span> +00733 CTextureLodToSort *textLod= NULL; +00734 <span class="keywordtype">bool</span> unload; +00735 <span class="keywordflow">if</span>(currentLoadedSize<currentWantedSize) +00736 { +00737 unload= <span class="keyword">false</span>; +00738 <span class="comment">// search from end of the list to pivot (included), the first LOD (ie the most important) to load.</span> +00739 <span class="keywordflow">for</span>(i=lodArray.size()-1;i>=(<a class="code" href="a04558.html#a14">sint</a>)pivot;i--) +00740 { +00741 <span class="keywordflow">if</span>(!lodArray[i].Lod->UpLoaded) +00742 { +00743 textLod= &(lodArray[i]); +00744 <span class="keywordflow">break</span>; +00745 } +00746 } +00747 <span class="comment">// One must have been found, since currentLoadedSize<currentWantedSize</span> +00748 <a class="code" href="a04199.html#a6">nlassert</a>(textLod); +00749 } +00750 <span class="keywordflow">else</span> +00751 { +00752 unload= <span class="keyword">true</span>; +00753 <span class="comment">// search from start to pivot (exclued), the first LOD (ie the less important) to unload.</span> +00754 <span class="keywordflow">for</span>(i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)pivot;i++) +00755 { +00756 <span class="keywordflow">if</span>(lodArray[i].Lod->UpLoaded) +00757 { +00758 textLod= &(lodArray[i]); +00759 <span class="keywordflow">break</span>; +00760 } +00761 } +00762 <span class="comment">// it is possible that not found here. It means that All is Ok!!</span> +00763 <span class="keywordflow">if</span>(textLod==NULL) +00764 <span class="comment">// no-op.</span> +00765 <span class="keywordflow">return</span>; +00766 } +00767 +00768 +00769 <span class="comment">// load/unload</span> +00770 <span class="comment">//=============</span> +00771 <span class="keywordflow">if</span>(!unload) +00772 { +00773 <span class="comment">// create a new TextureFile, with no sharing system.</span> +00774 <a class="code" href="a04199.html#a6">nlassert</a>(textLod->Lod->Texture==NULL); +00775 textLod->Lod->Texture= <span class="keyword">new</span> CTextureFile; +00776 <span class="comment">// Do not allow degradation.</span> +00777 textLod->Lod->Texture->setAllowDegradation(<span class="keyword">false</span>); +00778 textLod->Lod->Texture->enableSharing(<span class="keyword">false</span>); +00779 textLod->Lod->Texture->setFileName(textLod->Lod->TextureEntry->Texture->getFileName()); +00780 textLod->Lod->Texture->setMipMapSkipAtLoad(textLod->Lod->Level); +00781 <span class="comment">// setup async loading</span> +00782 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= textLod->Lod; +00783 <span class="comment">// load it async.</span> +00784 CAsyncFileManager3D::getInstance().loadTexture(textLod->Lod->Texture, &textLod->Lod->Loaded, textLod->Position); +00785 } +00786 <span class="keywordflow">else</span> +00787 { +00788 <span class="comment">// Swap now the lod.</span> +00789 <a class="code" href="a04199.html#a6">nlassert</a>(textLod->Lod->Texture!=NULL); +00790 <span class="comment">// Swap the uploaded Driver Handle with the Main texture (ot get the Ugly one)</span> +00791 pDriver->swapTextureHandle(*textLod->Lod->Texture, *textLod->Lod->TextureEntry->Texture); +00792 <span class="comment">// Flag the Lod.</span> +00793 textLod->Lod->UpLoaded= <span class="keyword">false</span>; +00794 textLod->Lod->Loaded= <span class="keyword">false</span>; +00795 <span class="comment">// Release completly the texture in driver. (SmartPtr delete)</span> +00796 textLod->Lod->Texture= NULL; +00797 } +00798 +00799 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd3" doxytag="NL3D::CAsyncTextureManager::uploadTexturePart" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NL3D::CAsyncTextureManager::uploadTexturePart </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> * </td> + <td class="mdname" nowrap> <em>pText</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> * </td> + <td class="mdname" nowrap> <em>pDriver</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> & </td> + <td class="mdname" nowrap> <em>nTotalUpload</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00451">451</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05464.html#l00229">_CurrentUploadTextureLine</a>, <a class="el" href="a05464.html#l00228">_CurrentUploadTextureMipMap</a>, <a class="el" href="a05464.html#l00214">_MaxUploadPerFrame</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05487.html#l00369">NLMISC::CBitmap::getMipMapCount()</a>, <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>, <a class="el" href="a06506.html#l00267">NL3D::ITexture::getReleasable()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06319.html#l00065">NLMISC::CRect::set()</a>, <a class="el" href="a06506.html#l00278">NL3D::ITexture::setReleasable()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera71">NL3D::IDriver::setupTextureEx()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera82">NL3D::IDriver::uploadTexture()</a>, and <a class="el" href="a05463.html#l00619">validDXTCMipMap()</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00361">update()</a>. +<p> +<div class="fragment"><pre>00452 { +00453 <a class="code" href="a04558.html#a15">uint</a> nMipMap; +00454 nMipMap = pText->getMipMapCount(); +00455 +00456 +00457 <span class="comment">// If this is the start of uploading, setup the texture in driver.</span> +00458 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>==0 && <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">_CurrentUploadTextureLine</a>==0) +00459 { +00460 <span class="comment">// If the texture is not a valid DXTC with mipmap</span> +00461 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerh0">validDXTCMipMap</a>(pText)) +00462 { +00463 <span class="comment">/* For now, prefer do nothing, because this may be an error (texture not found)</span> +00464 <span class="comment"> and the texture may not be used at all, so don't take VRAM for nothing.</span> +00465 <span class="comment"> => if the texture is used, it will be loaded synchronously by the caller later in the process</span> +00466 <span class="comment"> => frame freeze.</span> +00467 <span class="comment"> */</span> +00468 <span class="comment">/*</span> +00469 <span class="comment"> // upload All now.</span> +00470 <span class="comment"> // MipMap generation and compression may be done here => Maybe Big Freeze.</span> +00471 <span class="comment"> // approximate*2 instead of *1.33 for mipmaps.</span> +00472 <span class="comment"> uint nWeight = pText->getSize (0) * 2;</span> +00473 <span class="comment"> nWeight= (nWeight*CBitmap::bitPerPixels[pText->getPixelFormat()])/8;</span> +00474 <span class="comment"> nTotalUploaded+= nWeight;</span> +00475 <span class="comment"> pDriver->setupTexture(*pText);</span> +00476 <span class="comment"> return true;*/</span> +00477 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00478 } +00479 <span class="keywordflow">else</span> +00480 { +00481 <span class="comment">// Create the texture only and do not upload anything</span> +00482 <span class="keywordtype">bool</span> isRel = pText->getReleasable (); +00483 pText->setReleasable (<span class="keyword">false</span>); +00484 <span class="keywordtype">bool</span> isAllUploaded = <span class="keyword">false</span>; +00485 <span class="comment">/* Even if the shared texture is still referenced and so still exist in driver, we MUST recreate with good size</span> +00486 <span class="comment"> the texture. This is important for Texture Memory Load Balancing</span> +00487 <span class="comment"> (this may means that is used elsewhere than in the CAsyncTextureManager)</span> +00488 <span class="comment"> Hence: bMustRecreateSharedTexture==true</span> +00489 <span class="comment"> */</span> +00490 pDriver->setupTextureEx (*pText, <span class="keyword">false</span>, isAllUploaded, <span class="keyword">true</span>); +00491 pText->setReleasable (isRel); +00492 <span class="comment">// if the texture is already uploaded, abort partial uploading.</span> +00493 <span class="keywordflow">if</span> (isAllUploaded) +00494 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00495 } +00496 } +00497 +00498 +00499 <span class="comment">// try to upload all mipmap</span> +00500 <span class="keywordflow">for</span>(; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a><nMipMap; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>++) +00501 { +00502 <a class="code" href="a03319.html">CRect</a> zeRect; +00503 <a class="code" href="a04558.html#a15">uint</a> nMM= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>; +00504 +00505 <span class="comment">// What is left to upload ?</span> +00506 <a class="code" href="a04558.html#a15">uint</a> nWeight = pText->getSize (nMM) - _CurrentUploadTextureLine*pText->getWidth(nMM); +00507 nWeight= (nWeight*CBitmap::bitPerPixels[pText->getPixelFormat()])/8; +00508 +00509 <span class="keywordflow">if</span> ((nTotalUploaded + nWeight) > <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>) +00510 { +00511 <span class="comment">// We cannot upload the whole mipmap -> we have to cut it</span> +00512 <a class="code" href="a04558.html#a15">uint</a> nSizeToUpload = <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a> - nTotalUploaded ; +00513 <span class="comment">// DXTC => min block of 4x4 </span> +00514 <a class="code" href="a04558.html#a15">uint</a> nLineWeight = (max(pText->getWidth(nMM), (<a class="code" href="a04558.html#a11">uint32</a>)4)*CBitmap::bitPerPixels[pText->getPixelFormat()])/8; +00515 <a class="code" href="a04558.html#a15">uint</a> nNbLineToUpload = nSizeToUpload / nLineWeight; +00516 <span class="comment">// Upload 4 line by 4 line, and upload at leat one 4*line.</span> +00517 nNbLineToUpload = nNbLineToUpload / 4; +00518 nNbLineToUpload= max(nNbLineToUpload, 1U); +00519 nNbLineToUpload *= 4; +00520 <span class="comment">// comput rect to upload</span> +00521 <a class="code" href="a04558.html#a11">uint32</a> nNewLine = _CurrentUploadTextureLine + nNbLineToUpload; +00522 nNewLine= <a class="code" href="a04061.html#a0">min</a>(nNewLine, pText->getHeight(nMM)); +00523 zeRect.<a class="code" href="a03319.html#NLMISC_1_1CRecta9">set</a> (0, _CurrentUploadTextureLine, pText->getWidth(nMM), nNewLine); +00524 _CurrentUploadTextureLine = nNewLine; +00525 <span class="comment">// if fill all the mipmap, must go to next</span> +00526 <span class="keywordflow">if</span> (_CurrentUploadTextureLine == pText->getHeight(nMM)) +00527 { +00528 _CurrentUploadTextureLine = 0; +00529 _CurrentUploadTextureMipMap++; +00530 } +00531 } +00532 <span class="keywordflow">else</span> +00533 { +00534 <span class="comment">// We can upload the whole mipmap (or the whole rest of the mipmap)</span> +00535 zeRect.<a class="code" href="a03319.html#NLMISC_1_1CRecta9">set</a> (0, _CurrentUploadTextureLine, pText->getWidth(nMM), pText->getHeight(nMM)); +00536 _CurrentUploadTextureLine= 0; +00537 } +00538 +00539 <span class="comment">// upload the texture </span> +00540 pDriver->uploadTexture (*pText, zeRect, (<a class="code" href="a04558.html#a7">uint8</a>)nMM); +00541 +00542 nTotalUploaded += nWeight; +00543 <span class="comment">// If outpass max allocated upload, abort.</span> +00544 <span class="keywordflow">if</span> (nTotalUploaded > <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>) +00545 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00546 } +00547 +00548 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00549 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerh0" doxytag="NL3D::CAsyncTextureManager::validDXTCMipMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool NL3D::CAsyncTextureManager::validDXTCMipMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>pText</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05463.html#l00619">619</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00369">NLMISC::CBitmap::getMipMapCount()</a>, and <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00361">update()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>. +<p> +<div class="fragment"><pre>00620 { +00621 <span class="keywordflow">return</span> pText->getMipMapCount()>1 && ( +00622 pText->getPixelFormat() == CBitmap::DXTC1 || +00623 pText->getPixelFormat() == CBitmap::DXTC1Alpha || +00624 pText->getPixelFormat() == CBitmap::DXTC3 || +00625 pText->getPixelFormat() == CBitmap::DXTC5 ); +00626 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr0" doxytag="NL3D::CAsyncTextureManager::_BaseLodLevel" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">NL3D::CAsyncTextureManager::_BaseLodLevel</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00213">213</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00121">setupLod()</a>, and <a class="el" href="a05463.html#l00361">update()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr1" doxytag="NL3D::CAsyncTextureManager::_CurrentTextureLodLoaded" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02233.html">CTextureLod</a>* <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">NL3D::CAsyncTextureManager::_CurrentTextureLodLoaded</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00232">232</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05463.html#l00361">update()</a>, <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr2" doxytag="NL3D::CAsyncTextureManager::_CurrentUploadTexture" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02231.html">CTextureBase</a>* <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">NL3D::CAsyncTextureManager::_CurrentUploadTexture</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00227">227</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05463.html#l00361">update()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr3" doxytag="NL3D::CAsyncTextureManager::_CurrentUploadTextureLine" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">NL3D::CAsyncTextureManager::_CurrentUploadTextureLine</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00229">229</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr4" doxytag="NL3D::CAsyncTextureManager::_CurrentUploadTextureMipMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">NL3D::CAsyncTextureManager::_CurrentUploadTextureMipMap</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00228">228</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr5" doxytag="NL3D::CAsyncTextureManager::_FreeTextureIds" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a04558.html#a15">uint</a>> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">NL3D::CAsyncTextureManager::_FreeTextureIds</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00222">222</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, and <a class="el" href="a05463.html#l00232">deleteTexture()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr6" doxytag="NL3D::CAsyncTextureManager::_LastTextureSizeGot" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">NL3D::CAsyncTextureManager::_LastTextureSizeGot</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00218">218</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05464.html#l00115">getLastTextureSizeGot()</a>, and <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr7" doxytag="NL3D::CAsyncTextureManager::_MaxHLSColoringPerFrame" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">NL3D::CAsyncTextureManager::_MaxHLSColoringPerFrame</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00215">215</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00137">setupMaxHLSColoringPerFrame()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr8" doxytag="NL3D::CAsyncTextureManager::_MaxLodLevel" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">NL3D::CAsyncTextureManager::_MaxLodLevel</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00213">213</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00121">setupLod()</a>, and <a class="el" href="a05463.html#l00361">update()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr9" doxytag="NL3D::CAsyncTextureManager::_MaxTotalTextureSize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">NL3D::CAsyncTextureManager::_MaxTotalTextureSize</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00216">216</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00144">setupMaxTotalTextureSize()</a>, and <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr10" doxytag="NL3D::CAsyncTextureManager::_MaxUploadPerFrame" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">NL3D::CAsyncTextureManager::_MaxUploadPerFrame</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00214">214</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00130">setupMaxUploadPerFrame()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr11" doxytag="NL3D::CAsyncTextureManager::_TextureEntries" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a02232.html">CTextureEntry</a>*> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">NL3D::CAsyncTextureManager::_TextureEntries</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00221">221</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00343">getCoarseBitmap()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05463.html#l00334">isTextureUpLoaded()</a>, <a class="el" href="a05463.html#l00302">releaseTexture()</a>, <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr12" doxytag="NL3D::CAsyncTextureManager::_TextureEntryMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">TTextureEntryMap</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">NL3D::CAsyncTextureManager::_TextureEntryMap</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00223">223</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr13" doxytag="NL3D::CAsyncTextureManager::_TotalTextureSizeAsked" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">NL3D::CAsyncTextureManager::_TotalTextureSizeAsked</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00217">217</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05464.html#l00113">getTotalTextureSizeAsked()</a>, and <a class="el" href="a05463.html#l00361">update()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr14" doxytag="NL3D::CAsyncTextureManager::_WaitingTextures" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a04558.html#a15">uint</a>> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">NL3D::CAsyncTextureManager::_WaitingTextures</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00224">224</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CAsyncTextureManagero0" doxytag="NL3D::CAsyncTextureManager::HLSManager" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02638.html">CHLSTextureManager</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">NL3D::CAsyncTextureManager::HLSManager</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +User is free to add bank to this manager. Other methods are used by the async manager. +<p> + +<p> +Definition at line <a class="el" href="a05464.html#l00057">57</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05657.html#l01393">NL3D::CDriverUser::loadHLSBank()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05464.html">async_texture_manager.h</a><li><a class="el" href="a05463.html">async_texture_manager.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:44:33 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |