summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-08-16 17:51:11 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-08-16 17:51:11 -0400
commit53187303436d06038e40c5938219863c0d75ae5f (patch)
tree9518405e84ff57c99d283d22b282fe2280833d80 /indra/newview/llmeshrepository.cpp
parent402a2de7651105d63693deb2872dd6646dd1bd85 (diff)
FIX SH-859, SH-1274 - added fix for determining triangle count and
performance tested impact of animated textures Also did some cleanup to ensure branch built and ran properly after last merge.
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 2b6b2a84e1..fd66d7c515 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2509,7 +2509,7 @@ S32 LLMeshRepository::getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lo
return mThread->getActualMeshLOD(mesh_params, lod);
}
-const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj)
+const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const LLVOVolume* requesting_obj)
{
if (mesh_id.notNull())
{
@@ -2765,7 +2765,7 @@ void LLMeshRepository::uploadError(LLSD& args)
}
//static
-F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod)
+F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod, F32 *unscaled_value)
{
F32 max_distance = 512.f;
@@ -2854,6 +2854,11 @@ F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32
triangles_low*low_area +
triangles_lowest*lowest_area;
+ if (unscaled_value)
+ {
+ *unscaled_value = weighted_avg;
+ }
+
return weighted_avg/gSavedSettings.getU32("MeshTriangleBudget")*15000.f;
}