diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-04-25 09:13:23 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-04-25 09:13:23 -0400 |
commit | f162693a23fe5cfda8dab3857718624033812d30 (patch) | |
tree | 0768f9ea570b248b48e4caa33103e3d55c625466 /indra/llprimitive/lltextureentry.h | |
parent | d8931c9269a90cd01f6f6ff4de83b8fb41df11d3 (diff) | |
parent | d98fc504a1d4bc292ba86acdda053c8b4598a193 (diff) |
Merge Maint YZ branch 'main' into DRTVWR-588-cleanup-timers
Diffstat (limited to 'indra/llprimitive/lltextureentry.h')
-rw-r--r-- | indra/llprimitive/lltextureentry.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h index dc2e201044..f5f2c0172d 100644 --- a/indra/llprimitive/lltextureentry.h +++ b/indra/llprimitive/lltextureentry.h @@ -32,6 +32,7 @@ #include "llsd.h" #include "llmaterialid.h" #include "llmaterial.h" +#include "llgltfmaterial.h" // These bits are used while unpacking TEM messages to tell which aspects of // the texture entry changed. @@ -193,6 +194,23 @@ public: // Media flags enum { MF_NONE = 0x0, MF_HAS_MEDIA = 0x1 }; + // GLTF asset + void setGLTFMaterial(LLGLTFMaterial* material, bool local_origin = true); + LLGLTFMaterial* getGLTFMaterial() const { return mGLTFMaterial; } + + // GLTF override + LLGLTFMaterial* getGLTFMaterialOverride() const { return mGLTFMaterialOverrides; } + S32 setGLTFMaterialOverride(LLGLTFMaterial* mat); + // Clear most overrides so the render material better matches the material + // ID (preserve transforms). If the overrides become passthrough, set the + // overrides to nullptr. + S32 setBaseMaterial(); + + // 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; + S32 setGLTFRenderMaterial(LLGLTFMaterial* mat); + public: F32 mScaleS; // S, T offset F32 mScaleT; // S, T offset @@ -219,6 +237,17 @@ protected: bool mMaterialUpdatePending; LLMaterialID mMaterialID; LLMaterialPtr mMaterial; + + // Reference to GLTF material asset state + // On the viewer, this should be the same LLGLTFMaterial instance that exists in LLGLTFMaterialList + LLPointer<LLGLTFMaterial> mGLTFMaterial; + + // GLTF material parameter overrides -- the viewer will use this data to override material parameters + // set by the asset and store the results in mRenderGLTFMaterial + LLPointer<LLGLTFMaterial> mGLTFMaterialOverrides; + + // GLTF material to use for rendering -- will always be an LLFetchedGLTFMaterial + LLPointer<LLGLTFMaterial> mGLTFRenderMaterial; // Note the media data is not sent via the same message structure as the rest of the TE LLMediaEntry* mMediaEntry; // The media data for the face |