diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-20 13:55:42 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-20 13:55:42 -0500 |
commit | 40695bbd316ceb15db2c3eb203cbe35188a00aa9 (patch) | |
tree | d3a78dd1f42d0cc66bedc5061d9da726ec95577a /indra | |
parent | 8741c05cc10d3f39f272bb4739e7313309539d07 (diff) |
SL-18105 Fix for overrides not showing until a forced mesh update.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llgltfmateriallist.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 2 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llvovolume.h | 1 |
5 files changed, 22 insertions, 7 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 86f4faa9d0..0a104d1db5 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -36,7 +36,6 @@ #include "llviewercontrol.h" #include "llviewergenericmessage.h" #include "llviewerobjectlist.h" -#include "pipeline.h" #include "tinygltf/tiny_gltf.h" #include <strstream> @@ -87,10 +86,7 @@ namespace if(obj) { - if (obj->setTEGLTFMaterialOverride(side, override_data)) - { - gPipeline.markTextured(obj->mDrawable); - } + obj->setTEGLTFMaterialOverride(side, override_data); } LL_DEBUGS() << "successfully parsed override: " << override_data->asJSON() << LL_ENDL; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 4923771a31..eaf0287dae 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5315,7 +5315,6 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri setTENormalMap(te, (pMaterialParams) ? pMaterialParams->getNormalID() : LLUUID::null); setTESpecularMap(te, (pMaterialParams) ? pMaterialParams->getSpecularID() : LLUUID::null); - refreshMaterials(); return retval; } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index bd70532ab7..31e82545ec 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -356,7 +356,7 @@ public: /*virtual*/ S32 setTEGlow(const U8 te, const F32 glow); /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); - S32 setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat); + virtual S32 setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat); // Used by Materials update functions to properly kick off rebuilds // of VBs etc when materials updates require changes. diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 127abde19e..98919921ff 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2609,6 +2609,24 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa return TEM_CHANGE_TEXTURE; } +S32 LLVOVolume::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat) +{ + S32 retval = LLViewerObject::setTEGLTFMaterialOverride(te, mat); + + if (retval == TEM_CHANGE_TEXTURE) + { + if (!mDrawable.isNull()) + { + gPipeline.markTextured(mDrawable); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); + } + mFaceMappingChanged = TRUE; + } + + return retval; +} + + S32 LLVOVolume::setTEScale(const U8 te, const F32 s, const F32 t) { S32 res = LLViewerObject::setTEScale(te, s, t); @@ -2642,6 +2660,7 @@ S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t) return res; } + void LLVOVolume::updateTEData() { /*if (mDrawable.notNull()) diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 391351c13e..f0c2ce7cce 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -209,6 +209,7 @@ public: static void setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams, U32 te); /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) override; + S32 setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat) override; /*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t) override; /*virtual*/ S32 setTEScaleS(const U8 te, const F32 s) override; /*virtual*/ S32 setTEScaleT(const U8 te, const F32 t) override; |