diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-26 17:22:50 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-26 17:22:50 -0500 |
commit | 65eec2ca8fb34fb2aca8e93c8ce6d8e39cfae3e9 (patch) | |
tree | 3e3c9812af98bc209c274fae70f9aa8eaf2c3c90 /indra/llprimitive | |
parent | 8f47657d646c06dbba8d44497c0f81fd00730cc8 (diff) | |
parent | 800044fb33e5e177e45e1bfa9f840a287e0bd186 (diff) |
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/lltextureentry.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 7640dd70bd..2803afde60 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -512,16 +512,19 @@ S32 LLTextureEntry::setBumpShiny(U8 bump_shiny) void LLTextureEntry::setGLTFMaterial(LLGLTFMaterial* material) { - // assert on precondtion: - // whether or not mGLTFMaterial is null, any existing override should have been nulled out - // before calling setGLTFMaterial - // NOTE: if you're hitting this assert, try to make sure calling code is using LLViewerObject::setRenderMaterialID - llassert(getGLTFMaterialOverride() == nullptr); - - mGLTFMaterial = material; - if (mGLTFMaterial == nullptr) + if (material != getGLTFMaterial()) { - setGLTFRenderMaterial(nullptr); + // assert on precondtion: + // whether or not mGLTFMaterial is null, any existing override should have been nulled out + // before calling setGLTFMaterial + // NOTE: if you're hitting this assert, try to make sure calling code is using LLViewerObject::setRenderMaterialID + llassert(getGLTFMaterialOverride() == nullptr); + + mGLTFMaterial = material; + if (mGLTFMaterial == nullptr) + { + setGLTFRenderMaterial(nullptr); + } } } |