summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-09-01 10:59:45 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-09-01 10:59:45 -0400
commite3fec30097a28689a7022d06005d7d59a3004f0c (patch)
treee143c9775e3c2867bb95b7726598f5b057a04770 /indra/newview/llmeshrepository.cpp
parentd8fd52341a2ff47c6f929540628f2f0017c8b185 (diff)
CTS-231 WIP create new ARC algorithm to be more accurate and account for meshes
First pass - uses the new algorithm to hopefully be more accurate of render load on low-end machines. Also accounts for mesh complexity, including if a mesh is weighted or non-weighted. Code reviewed by davep
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rw-r--r--indra/newview/llmeshrepository.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 96a170ef07..069642b711 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2104,6 +2104,30 @@ void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3
thread->start();
}
+S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod)
+{
+ if (mThread)
+ {
+ LLMeshRepoThread::mesh_header_map::iterator iter = mThread->mMeshHeader.find(mesh_id);
+ if (iter != mThread->mMeshHeader.end())
+ {
+ LLSD& header = iter->second;
+
+ if (header.has("404"))
+ {
+ return -1;
+ }
+
+ S32 size = header[header_lod[lod]]["size"].asInteger();
+ return size;
+ }
+
+ }
+
+ return -1;
+
+}
+
void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data)
{
//write model file to memory buffer