summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llmaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/llmaterial.cpp')
-rw-r--r--indra/llprimitive/llmaterial.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index a219ac1450..37525e4a3d 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "llmaterial.h"
+#include "hbxxh.h"
/**
* Materials cap parameters
@@ -331,6 +332,17 @@ void LLMaterial::setAlphaMaskCutoff(U8 cutoff)
mAlphaMaskCutoff = cutoff;
}
+LLUUID LLMaterial::getMaterialID() const
+{
+ // TODO - not null
+ return LLUUID::null;
+}
+
+void LLMaterial::setMaterialID(const LLUUID &material_id)
+{
+ // TODO - set
+}
+
LLSD LLMaterial::asLLSD() const
{
LLSD material_data;
@@ -464,4 +476,12 @@ U32 LLMaterial::getShaderMask(U32 alpha_mode)
return ret;
}
+LLUUID LLMaterial::getHash() const
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+ // HACK - hash the bytes of this LLMaterial, but trim off the S32 in LLRefCount
+ LLUUID id;
+ HBXXH128::digest(id, (unsigned char*)this + sizeof(LLRefCount), sizeof(*this) - sizeof(LLRefCount));
+ return id;
+}