Yefei He's updates to Pool and flt2osg to use lazy loading of textures from a

texture pallette.
This commit is contained in:
Robert Osfield
2002-10-31 10:35:15 +00:00
parent da84f9b4aa
commit 85af8cc4ba
3 changed files with 146 additions and 77 deletions

View File

@@ -109,12 +109,25 @@ osg::StateSet* TexturePool::getTexture(int nIndex)
return NULL;
}
std::string* TexturePool::getTextureName(int nIndex)
{
TextureNameMap::iterator fitr = _textureNameMap.find(nIndex);
if (fitr != _textureNameMap.end())
return (*fitr).second;
else
return NULL;
}
void TexturePool::addTexture(int nIndex, osg::StateSet* stateset)
{
_textureMap[nIndex] = stateset;
}
void TexturePool::addTextureName(int nIndex, std::string* name)
{
_textureNameMap[nIndex] = name;
}
////////////////////////////////////////////////////////////////////