summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-06-02 22:59:18 -0500
committerDave Parks <davep@lindenlab.com>2011-06-02 22:59:18 -0500
commit837dd6e943c3ef64de8a32a3963fb75c6aa06e7d (patch)
treeb2e6142256f2c006e1d8976c5134eb5df23dc913 /indra/newview
parent535842211f3eabb6c436d4bce7e25f8e70d36b2f (diff)
parentde5f93ca52f207380baca6895b499cb7fcffead8 (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvovolume.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c917a5fd9d..39e555f781 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3096,16 +3096,28 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes)
{
+ F32 radius = getScale().length();
+
if (isMesh())
{
LLSD& header = gMeshRepo.getMeshHeader(getVolume()->getParams().getSculptID());
- F32 radius = getScale().length();
-
return LLMeshRepository::getStreamingCost(header, radius, bytes, visible_bytes, mLOD);
}
-
- return 0.f;
+ else
+ {
+ LLVolume* volume = getVolume();
+ S32 counts[4];
+ LLVolume::getLoDTriangleCounts(volume->getParams(), counts);
+
+ LLSD header;
+ header["lowest_lod"]["size"] = counts[0] * 10;
+ header["low_lod"]["size"] = counts[1] * 10;
+ header["medium_lod"]["size"] = counts[2] * 10;
+ header["high_lod"]["size"] = counts[3] * 10;
+
+ return LLMeshRepository::getStreamingCost(header, radius);
+ }
}
U32 LLVOVolume::getTriangleCount()