diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-03-19 21:39:05 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-03-19 21:39:05 +0200 |
commit | 6b203f2ee4bbaf893b7256e35581403b18de68f3 (patch) | |
tree | 42182cc96aa21f84a28386ac6543960b872fac99 /indra/newview/llviewertexturelist.cpp | |
parent | f5ec281b1b578dfee17353ecf6d469a29de86d25 (diff) |
SL-12607 FMOD Logo
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 06524847d1..b29e65923b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -190,6 +190,35 @@ void LLViewerTextureList::doPreloadImages() mImagePreloads.insert(image); } + // Normally images are located in 'skins' folder in working directory, + // but 3p images were added from packages and had to stay in separate folder + // with path relative to exe. + + std::string full_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "3p_icons", "fmod.png"); + if (full_path.empty()) + { + LL_WARNS() << "Failed to find local image file fmod.png at " << full_path << LL_ENDL; + } + else if (gDirUtilp->fileExists(full_path)) + { + image = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + full_path, FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + 0, 0, IMG_LOGO_FMOD); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + // Speed up load (this texture will be used early) + image->setKnownDrawSize(364, 98); + image->processTextureStats(); + image->setDecodePriority(LLViewerFetchedTexture::maxDecodePriority()); + image->updateFetch(); + // Fmod logo is only needed at startup, if we will get more logos + // for startup, might be good idea to save resources and do loading + // in scope of llprogressview and then unload everything once no + // longer needed + } + } + LLPointer<LLImageRaw> img_blak_square_tex(new LLImageRaw(2, 2, 3)); memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize()); LLPointer<LLViewerFetchedTexture> img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE)); |