本文整理汇总了C++中LLViewerFetchedTexture::doLoadedCallbacks方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerFetchedTexture::doLoadedCallbacks方法的具体用法?C++ LLViewerFetchedTexture::doLoadedCallbacks怎么用?C++ LLViewerFetchedTexture::doLoadedCallbacks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerFetchedTexture
的用法示例。
在下文中一共展示了LLViewerFetchedTexture::doLoadedCallbacks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateImages
void LLViewerTextureList::updateImages(F32 max_time)
{
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
S32 global_raw_memory;
{
global_raw_memory = *AIAccess<S32>(LLImageRaw::sGlobalRawMemory);
}
sNumImagesStat.addValue(sNumImages);
sNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
sGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
sGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
sRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(global_raw_memory));
sFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
updateImagesDecodePriorities();
F32 total_max_time = max_time;
max_time -= updateImagesFetchTextures(max_time);
max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
max_time -= updateImagesCreateTextures(max_time);
if (!mDirtyTextureList.empty())
{
LLFastTimer t(LLFastTimer::FTM_IMAGE_MARK_DIRTY);
gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
mDirtyTextureList.clear();
}
bool didone = false;
for (image_list_t::iterator iter = mCallbackList.begin();
iter != mCallbackList.end(); )
{
//trigger loaded callbacks on local textures immediately
LLViewerFetchedTexture* image = *iter++;
if (!image->getUrl().empty())
{
// Do stuff to handle callbacks, update priorities, etc.
didone = image->doLoadedCallbacks();
}
else if (!didone)
{
// Do stuff to handle callbacks, update priorities, etc.
didone = image->doLoadedCallbacks();
}
}
//Required for old media system
if (!gNoRender && !gGLManager.mIsDisabled)
{
LLViewerMedia::updateMedia();
}
updateImagesUpdateStats();
}