summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lltextureentry.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-19 17:23:54 -0500
committerDave Parks <davep@lindenlab.com>2022-10-19 17:23:54 -0500
commit8741c05cc10d3f39f272bb4739e7313309539d07 (patch)
tree871d2340a7e22cce1504948a79a703811a084d5a /indra/llprimitive/lltextureentry.h
parentde4c018499ddaebbe466fb5a8938554a2d4a3b19 (diff)
SL-18105 Hook up TE override material to render pipe by way of render material.
Diffstat (limited to 'indra/llprimitive/lltextureentry.h')
-rw-r--r--indra/llprimitive/lltextureentry.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h
index bb74d258fd..2c932a10df 100644
--- a/indra/llprimitive/lltextureentry.h
+++ b/indra/llprimitive/lltextureentry.h
@@ -163,8 +163,6 @@ public:
const LLMaterialID& getMaterialID() const { return mMaterialID; };
const LLMaterialPtr getMaterialParams() const { return mMaterial; };
- LLGLTFMaterial* getGLTFMaterial() const { return mGLTFMaterial; }
-
// *NOTE: it is possible for hasMedia() to return true, but getMediaData() to return NULL.
// CONVERSELY, it is also possible for hasMedia() to return false, but getMediaData()
// to NOT return NULL.
@@ -197,16 +195,17 @@ public:
enum { MF_NONE = 0x0, MF_HAS_MEDIA = 0x1 };
// GLTF asset
- void setGLTFMaterial(LLGLTFMaterial* material) { mGLTFMaterial = material; }
- LLGLTFMaterial* getGLTFMaterial() { return mGLTFMaterial; }
+ void setGLTFMaterial(LLGLTFMaterial* material);
+ LLGLTFMaterial* getGLTFMaterial() const { return mGLTFMaterial; }
// GLTF override
LLGLTFMaterial* getGLTFMaterialOverride() { return mGLTFMaterialOverrides; }
void setGLTFMaterialOverride(LLGLTFMaterial* mat) { mGLTFMaterialOverrides = mat; }
- // GLTF render
- LLGLTFMaterial* getGLTFRenderMaterial() { return mGLTFRenderMaterial; }
- void setGLTFRenderMaterial(LLGLTFMaterial* mat) { mGLTFRenderMaterial = mat; }
+ // GLTF render material
+ // nuanced behavior here -- if there is no render material, fall back to getGLTFMaterial, but ONLY for the getter, not the setter
+ LLGLTFMaterial* getGLTFRenderMaterial() const { return mGLTFRenderMaterial.notNull() ? mGLTFRenderMaterial : getGLTFMaterial(); }
+ S32 setGLTFRenderMaterial(LLGLTFMaterial* mat);
public:
F32 mScaleS; // S, T offset