summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-02-02 14:35:22 -0600
committerDave Parks <davep@lindenlab.com>2023-02-02 14:35:22 -0600
commit55ee008035cd41ac2c8c2b95bd251adcb3699c5a (patch)
tree3c39277e429b8742c7cff815e6aea4e75e942490 /indra/llmath
parent93b1da52f56293663d9bfe5272a83a77185f4cff (diff)
parentdc1dd7a274e1ce49eb68ca525eba7f2e39032fa8 (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
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 33659e6b81..9919af5368 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2394,7 +2394,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 e8faf549f4..ad6a669531 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -1105,8 +1105,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();