diff options
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 |