diff options
author | Kitty Barnett <develop@catznip.com> | 2013-05-14 21:14:46 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2013-05-14 21:14:46 +0200 |
commit | ad09e2111cd980117ae937b79155ef6c24e4567c (patch) | |
tree | 0bbf02937ba6eec67bf93329388a5bfde1c52849 /indra/llprimitive/lltextureentry.cpp | |
parent | be712ba6b56bc087c947203290d172275aa975d9 (diff) |
NORSPEC-102 & Co Reloaded
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
-rwxr-xr-x | indra/llprimitive/lltextureentry.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index ca57f1edbd..597f078490 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -539,21 +539,28 @@ S32 LLTextureEntry::setGlow(F32 glow) S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) { - if (mMaterialID != pMaterialID) + if ( (mMaterialID != pMaterialID) || (mMaterialUpdatePending && !mSelected) ) { - mMaterialID = pMaterialID; - - } - if (mMaterialID.isNull()) + if (mSelected) { - setMaterialParams(NULL); + mMaterialUpdatePending = true; + mMaterialID = pMaterialID; + return TEM_CHANGE_NONE; } + + mMaterialUpdatePending = false; + mMaterialID = pMaterialID; return TEM_CHANGE_TEXTURE; } + return TEM_CHANGE_NONE; +} S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { - + if (mSelected) + { + mMaterialUpdatePending = true; + } mMaterial = pMaterialParams; return TEM_CHANGE_TEXTURE; } |