Yefei He's updates to Pool and flt2osg to use lazy loading of textures from a
texture pallette.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user