summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llgltfmaterial.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/llgltfmaterial.h')
-rw-r--r--indra/llprimitive/llgltfmaterial.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h
index 9f817d6a19..90f1ecfa8f 100644
--- a/indra/llprimitive/llgltfmaterial.h
+++ b/indra/llprimitive/llgltfmaterial.h
@@ -110,6 +110,25 @@ public:
static const char* const GLTF_FILE_EXTENSION_TRANSFORM_ROTATION;
static const LLUUID GLTF_OVERRIDE_NULL_UUID;
+ // *TODO: If/when we implement additional GLTF extensions, they may not be
+ // compatible with our GLTF terrain implementation. We may want to disallow
+ // materials with some features from being set on terrain, if their
+ // implementation on terrain is not compliant with the spec:
+ // - KHR_materials_transmission: Probably OK?
+ // - KHR_materials_ior: Probably OK?
+ // - KHR_materials_volume: Likely incompatible, as our terrain
+ // heightmaps cannot currently be described as finite enclosed
+ // volumes.
+ // See also LLPanelRegionTerrainInfo::validateMaterials
+ bool mDoubleSided = false;
+
+
+ // 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;
+
+public:
+
// get a UUID based on a hash of this LLGLTFMaterial
LLUUID getHash() const;
@@ -209,7 +228,6 @@ public:
bool hasLocalTextures() { return !mTrackingIdToLocalTexture.empty(); }
virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id);
virtual void updateTextureTracking();
-
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);
@@ -257,10 +275,10 @@ public:
F32 mAlphaCutoff;
AlphaMode mAlphaMode;
- bool mDoubleSided;
+ bool mDoubleSided = false;
// Override specific flags for state that can't use off-by-epsilon or UUID
// hack
- bool mOverrideDoubleSided;
- bool mOverrideAlphaMode;
+ bool mOverrideDoubleSided = false;
+ bool mOverrideAlphaMode = false;
};