From 53187303436d06038e40c5938219863c0d75ae5f Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 16 Aug 2011 17:51:11 -0400 Subject: 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. --- indra/newview/llmeshrepository.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llmeshrepository.cpp') 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; } -- cgit v1.2.3