diff options
author | RunitaiLinden <davep@lindenlab.com> | 2024-01-19 11:36:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-19 11:36:56 -0600 |
commit | 6dd260c3699148b4ddf8e7bff84f4b19f8bbf076 (patch) | |
tree | 6c9144f701ecb2cda859baaeed4e2f4ee6f9a683 /indra/llprimitive/llgltfmaterial.h | |
parent | 45547c7bbadf15804f54bb28fd1c94eb5f080bf5 (diff) | |
parent | 09ee84f675cf08f98cbd49516c5e01c289b42a20 (diff) |
Merge branch 'release/materials_featurette' into DRTVWR-592
Diffstat (limited to 'indra/llprimitive/llgltfmaterial.h')
-rw-r--r-- | indra/llprimitive/llgltfmaterial.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index a078a530a4..02f62fb08c 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -34,6 +34,7 @@ #include "lluuid.h" #include "hbxxh.h" +#include <array> #include <string> #include <map> @@ -195,7 +196,7 @@ public: // write to given tinygltf::Model void writeToModel(tinygltf::Model& model, S32 mat_index) const; - void applyOverride(const LLGLTFMaterial& override_mat); + virtual void applyOverride(const LLGLTFMaterial& override_mat); // apply the given LLSD override data void applyOverrideLLSD(const LLSD& data); @@ -221,6 +222,17 @@ public: virtual void addTextureEntry(LLTextureEntry* te) {}; virtual void removeTextureEntry(LLTextureEntry* te) {}; + // For local textures so that editor will know to track changes + void addLocalTextureTracking(const LLUUID& tracking_id, const LLUUID &tex_id); + void removeLocalTextureTracking(const LLUUID& tracking_id); + bool hasLocalTextures() { return !mTrackingIdToLocalTexture.empty(); } + virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id); + virtual void updateTextureTracking(); + + // These fields are local to viewer and are a part of local bitmap support + typedef std::map<LLUUID, LLUUID> local_tex_map_t; + local_tex_map_t mTrackingIdToLocalTexture; + protected: static LLVector2 vec2FromJson(const std::map<std::string, tinygltf::Value>& object, const char* key, const LLVector2& default_value); static F32 floatFromJson(const std::map<std::string, tinygltf::Value>& object, const char* key, const F32 default_value); |