本文整理汇总了C++中LLViewerTexture::setBoostLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerTexture::setBoostLevel方法的具体用法?C++ LLViewerTexture::setBoostLevel怎么用?C++ LLViewerTexture::setBoostLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerTexture
的用法示例。
在下文中一共展示了LLViewerTexture::setBoostLevel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
LLVOClouds::LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
: LLAlphaObject(id, LL_VO_CLOUDS, regionp)
{
mCloudGroupp = NULL;
mbCanSelect = FALSE;
setNumTEs(1);
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(gCloudTextureID);
image->setBoostLevel(LLViewerTexture::BOOST_CLOUDS);
setTEImage(0, image);
}
示例2: exportNextTexture
void LLObjectBackup::exportNextTexture()
{
if (mTexturesList.empty())
{
llinfos << "Finished exporting textures." << llendl;
return;
}
LLUUID id;
std::list<LLUUID>::iterator iter;
iter = mTexturesList.begin();
while (1)
{
if (iter == mTexturesList.end())
{
mNextTextureReady = true;
return;
}
id = (*iter);
LLViewerTexture* imagep = LLViewerTextureManager::findTexture(id);
if (imagep != NULL)
{
S32 cur_discard = imagep->getDiscardLevel();
if (cur_discard > 0)
{
if (imagep->getBoostLevel() != LLViewerTexture::BOOST_PREVIEW)
{
// we want to force discard 0: this one does this.
imagep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
}
}
else
{
break;
}
}
else
{
llwarns << "We *DON'T* have the texture " << llendl;
mNonExportedTextures |= TEXTURE_MISSING;
}
iter++;
}
mTexturesList.remove(id);
llinfos << "Requesting texture " << id << llendl;
LLImageJ2C* mFormattedImage = new LLImageJ2C;
CacheReadResponder* responder = new CacheReadResponder(id, mFormattedImage);
LLAppViewer::getTextureCache()->readFromCache(id, LLWorkerThread::PRIORITY_HIGH, 0, 999999, responder);
}
示例3: exportNextTexture
void LLObjectBackup::exportNextTexture()
{
LLUUID id;
textures_set_t::iterator iter = mTexturesList.begin();
while (true)
{
if (mTexturesList.empty())
{
mCheckNextTexture = true;
LL_INFOS() << "Finished exporting textures." << LL_ENDL;
return;
}
if (iter == mTexturesList.end())
{
// Not yet ready, wait and re-check at next idle callback...
mCheckNextTexture = true;
return;
}
id = *iter++;
if (id.isNull())
{
// NULL texture id: just remove and ignore.
mTexturesList.erase(id);
LL_DEBUGS("ObjectBackup") << "Null texture UUID found, ignoring."
<< LL_ENDL;
continue;
}
LLViewerTexture* imagep = LLViewerTextureManager::findTexture(id);
if (imagep)
{
if (imagep->getDiscardLevel() > 0)
{
// Boost texture loading
imagep->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
LL_DEBUGS("ObjectBackup") << "Boosting texture: " << id
<< LL_ENDL;
LLViewerFetchedTexture* tex;
tex = LLViewerTextureManager::staticCastToFetchedTexture(imagep);
if (tex && tex->getDesiredDiscardLevel() > 0)
{
// Set min discard level to 0
tex->setMinDiscardLevel(0);
LL_DEBUGS("ObjectBackup") << "Min discard level set to 0 for texture: "
<< id << LL_ENDL;
}
}
else
{
// Texture is ready !
break;
}
}
else
{
LL_WARNS() << "We *DON'T* have the texture " << id << LL_ENDL;
mNonExportedTextures |= TEXTURE_MISSING;
mTexturesList.erase(id);
}
}
mTexturesList.erase(id);
LL_INFOS() << "Requesting texture " << id << " from cache." << LL_ENDL;
LLImageJ2C* mFormattedImage = new LLImageJ2C;
BackupCacheReadResponder* responder;
responder = new BackupCacheReadResponder(id, mFormattedImage);
LLAppViewer::getTextureCache()->readFromCache(id,
LLWorkerThread::PRIORITY_HIGH,
0, 999999, responder);
}