diff options
author | Kitty Barnett <develop@catznip.com> | 2013-05-12 12:39:52 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2013-05-12 12:39:52 +0200 |
commit | 6fd7f146d458dcea5e1bf9b829dc7234fd338647 (patch) | |
tree | f934fa6eba360effd30f4c33feaac4bdac38c72a /indra/llprimitive/lltextureentry.cpp | |
parent | e1c1428569b03bbb20e7597ebec7d707151ce802 (diff) | |
parent | 269b8b7de53f368791fbffde8a6f8d47d9cbbcdc (diff) |
Merged with viewer-dev-materials
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
-rwxr-xr-x | indra/llprimitive/lltextureentry.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 1d581da897..8365c9d7b6 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -61,6 +61,8 @@ LLTextureEntry* LLTextureEntry::newTextureEntry() //=============================================================== LLTextureEntry::LLTextureEntry() : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { init(LLUUID::null,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } @@ -537,10 +539,17 @@ S32 LLTextureEntry::setGlow(F32 glow) S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) { - if (mMaterialID != pMaterialID) + if ( (mMaterialID != pMaterialID) || (mMaterialUpdatePending && !mSelected) ) { + if (mSelected) + { + mMaterialUpdatePending = true; + mMaterialID = pMaterialID; + return TEM_CHANGE_NONE; + } + + mMaterialUpdatePending = false; mMaterialID = pMaterialID; - } if (mMaterialID.isNull()) { @@ -551,7 +560,10 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { - + if (mSelected) + { + mMaterialUpdatePending = true; + } mMaterial = pMaterialParams; return TEM_CHANGE_TEXTURE; } |