diff options
author | Kitty Barnett <develop@catznip.com> | 2013-05-10 10:50:50 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2013-05-10 10:50:50 +0200 |
commit | 269b8b7de53f368791fbffde8a6f8d47d9cbbcdc (patch) | |
tree | ecf0e433fb897a2e30d1e283004e8cdb69c0fbbc /indra/llprimitive/lltextureentry.cpp | |
parent | d8f2ecd5b3f0cb8475fa1d092cc7a315ca1e8ca9 (diff) |
NORSPEC-102 Rapid materials updates are not smooth to viewer which is editing the object
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
-rw-r--r-- | indra/llprimitive/lltextureentry.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 691216e035..6e5d27bb94 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -61,18 +61,24 @@ 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); } LLTextureEntry::LLTextureEntry(const LLUUID& tex_id) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { init(tex_id,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { mID = rhs.mID; mScaleS = rhs.mScaleS; @@ -532,8 +538,16 @@ 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()) { @@ -548,6 +562,10 @@ S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { if (mMaterial != pMaterialParams) { + if (mSelected) + { + mMaterialUpdatePending = true; + } mMaterial = pMaterialParams; return TEM_CHANGE_TEXTURE; } |