diff options
author | Oz Linden <oz@lindenlab.com> | 2015-06-15 15:53:45 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-06-15 15:53:45 -0400 |
commit | 95fc2d48eced78b2aaa29b9e8b3f9410eed1ad8c (patch) | |
tree | 7748f0142e0ecbc91daa33c42a679799c4375d5e /indra/newview/llviewertexture.cpp | |
parent | 96d16928600dbf3666221a19575af9330840cfd5 (diff) | |
parent | e0f5ed29daa3b2803aaec60a77bde8df7df292ee (diff) |
merge changes for 3.7.30-release
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-x | indra/newview/llviewertexture.cpp | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 023457c0c8..a957367f61 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -654,12 +654,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() { @@ -1280,7 +1304,7 @@ void LLViewerFetchedTexture::addToCreateTexture() llassert(mNumFaces[j] <= mFaceList[j].size()); for(U32 i = 0; i < mNumFaces[j]; i++) - { + { mFaceList[j][i]->dirtyTexture(); } } @@ -1430,9 +1454,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()) @@ -1440,6 +1466,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mNeedsAux = FALSE; destroyRawImage(); } + return res; } @@ -2131,6 +2158,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing) } if (is_missing) { + notifyAboutMissingAsset(); + if (mUrl.empty()) { LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL; |