summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-04-13 17:20:36 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-04-13 17:20:36 -0400
commitd516a8729e413e3097c468e8f3c2c39ff73181bd (patch)
tree3ba17c58af42f23e77199516be4674245328cd86 /indra/newview/llviewertexture.cpp
parent3f001b520c42d9182de89c3cacb79f6684dd0471 (diff)
parenta647b8f1cbab13f07ea889c80df28414bc906129 (diff)
merge
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-xindra/newview/llviewertexture.cpp37
1 files changed, 33 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 4e2eef39d6..e684be4361 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -655,12 +655,36 @@ S8 LLViewerTexture::getType() const
void LLViewerTexture::cleanup()
{
+ notifyAboutMissingAsset();
+
mFaceList[LLRender::DIFFUSE_MAP].clear();
mFaceList[LLRender::NORMAL_MAP].clear();
mFaceList[LLRender::SPECULAR_MAP].clear();
mVolumeList.clear();
}
+void LLViewerTexture::notifyAboutCreatingTexture()
+{
+ for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+ {
+ for(U32 f = 0; f < mNumFaces[ch]; f++)
+ {
+ mFaceList[ch][f]->notifyAboutCreatingTexture(this);
+ }
+ }
+}
+
+void LLViewerTexture::notifyAboutMissingAsset()
+{
+ for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+ {
+ for(U32 f = 0; f < mNumFaces[ch]; f++)
+ {
+ mFaceList[ch][f]->notifyAboutMissingAsset(this);
+ }
+ }
+}
+
// virtual
void LLViewerTexture::dump()
{
@@ -1281,7 +1305,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
llassert(mNumFaces[j] <= mFaceList[j].size());
for(U32 i = 0; i < mNumFaces[j]; i++)
- {
+ {
mFaceList[j][i]->dirtyTexture();
}
}
@@ -1431,9 +1455,11 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
destroyRawImage();
return FALSE;
}
-
- res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
-
+
+ res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
+
+ notifyAboutCreatingTexture();
+
setActive();
if (!needsToSaveRawImage())
@@ -1441,6 +1467,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
mNeedsAux = FALSE;
destroyRawImage();
}
+
return res;
}
@@ -2132,6 +2159,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
}
if (is_missing)
{
+ notifyAboutMissingAsset();
+
if (mUrl.empty())
{
LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL;