summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-12-09 16:34:28 -0500
committerNat Goodspeed <nat@lindenlab.com>2022-12-09 16:34:28 -0500
commitf41278082f2ab204ec60c15ee1530ca4440937a5 (patch)
treec382bb0e6cde299e853d09b19a47f1d82dc537fa /indra/newview/llviewertexturelist.cpp
parentfc424a0db90fd2d2e44e85a19750ad6eaa57b28a (diff)
parente3b34fec6962e6deda3dd9dd83bf9fa20ab594af (diff)
SL-18809: Merge 'DRTVWR-559' of secondlife/viewer into sl-18809
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r--indra/newview/llviewertexturelist.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 338aac2ccc..674c387430 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -45,6 +45,7 @@
#include "llxmltree.h"
#include "message.h"
+#include "lldrawpoolbump.h" // to init bumpmap images
#include "lltexturecache.h"
#include "lltexturefetch.h"
#include "llviewercontrol.h"
@@ -135,9 +136,6 @@ void LLViewerTextureList::doPreloadImages()
//uv_test->setClamp(FALSE, FALSE);
//uv_test->setMipFilterNearest(TRUE, TRUE);
- // prefetch specific UUIDs
- LLViewerTextureManager::getFetchedTexture(IMG_SHOT);
- LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF);
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
@@ -206,13 +204,26 @@ void LLViewerTextureList::doPrefetchImages()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, FTT_DEFAULT, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
- if (imagep)
+ // todo: do not load without getViewerAssetUrl()
+ // either fail login without caps or provide this
+ // in some other way, textures won't load otherwise
+ LLViewerFetchedTexture *imagep = findImage(DEFAULT_WATER_NORMAL, TEX_LIST_STANDARD);
+ if (!imagep)
{
- imagep->setAddressMode(LLTexUnit::TAM_WRAP);
- mImagePreloads.insert(imagep);
+ // add it to mImagePreloads only once
+ imagep = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, FTT_DEFAULT, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
+ if (imagep)
+ {
+ imagep->setAddressMode(LLTexUnit::TAM_WRAP);
+ mImagePreloads.insert(imagep);
+ }
}
+ LLViewerTextureManager::getFetchedTexture(IMG_SHOT);
+ LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF);
+
+ LLStandardBumpmap::addstandard();
+
if (LLAppViewer::instance()->getPurgeCache())
{
// cache was purged, no point