summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-03 16:53:33 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-03 16:53:33 +0200
commit51142d1341bfd5f4f9749fe1aaf23d4f4270fe0e (patch)
tree1ced5dc14755b357886eb9fdf3606f5073ed9aaa /indra/llmath
parentdb80fdb55b646164a71c58e9f4751b368afa3b9f (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge branch 'main' into DRTVWR-567
# Conflicts: # indra/newview/llappearancemgr.cpp # indra/newview/llpanelmaininventory.cpp
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolume.cpp20
-rw-r--r--indra/llmath/llvolume.h6
2 files changed, 24 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index be25592d54..281f1bd87a 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2386,7 +2386,25 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
LL_DEBUGS("MeshStreaming") << "Failed to unzip LLSD blob for LoD with code " << uzip_result << " , will probably fetch from sim again." << LL_ENDL;
return false;
}
-
+ return unpackVolumeFacesInternal(mdl);
+}
+
+bool LLVolume::unpackVolumeFaces(U8* in_data, S32 size)
+{
+ //input data is now pointing at a zlib compressed block of LLSD
+ //decompress block
+ LLSD mdl;
+ U32 uzip_result = LLUZipHelper::unzip_llsd(mdl, in_data, size);
+ if (uzip_result != LLUZipHelper::ZR_OK)
+ {
+ LL_DEBUGS("MeshStreaming") << "Failed to unzip LLSD blob for LoD with code " << uzip_result << " , will probably fetch from sim again." << LL_ENDL;
+ return false;
+ }
+ return unpackVolumeFacesInternal(mdl);
+}
+
+bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
+{
{
U32 face_count = mdl.size();
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 3ccaed47f1..1509241623 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -1101,8 +1101,12 @@ protected:
BOOL generate();
void createVolumeFaces();
public:
- virtual bool unpackVolumeFaces(std::istream& is, S32 size);
+ bool unpackVolumeFaces(std::istream& is, S32 size);
+ bool unpackVolumeFaces(U8* in_data, S32 size);
+private:
+ bool unpackVolumeFacesInternal(const LLSD& mdl);
+public:
virtual void setMeshAssetLoaded(BOOL loaded);
virtual BOOL isMeshAssetLoaded();