summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-11-18 16:42:57 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-11-18 16:42:57 -0500
commit5e57352e1295d33cf9815800393212824d53bb75 (patch)
treeb72aaeaf91e55ce3d143bf0757c899d6068deca2 /indra/newview/llselectmgr.cpp
parent57e5841a9c642e8f1044daf33f44ede173ef48b9 (diff)
SH-350 SH-351 SH-355 FIX Several fixes for ARC
Fixed the texture resolution calculation against the rounding errors we had before. Fixed the bug where linking prims changed the combined cost Fixed the bug where twisting was not computed properly Code reviewed by davep.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 728694117c..eb1ca66334 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6335,6 +6335,33 @@ U32 LLObjectSelection::getSelectedObjectTriangleCount()
return count;
}
+S32 LLObjectSelection::getSelectedObjectRenderCost()
+{
+ S32 cost = 0;
+ LLVOVolume::texture_cost_t textures;
+ for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
+ {
+ LLSelectNode* node = *iter;
+ LLVOVolume* object = (LLVOVolume*)node->getObject();
+
+ if (object)
+ {
+ cost += object->getRenderCost(textures);
+ }
+
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ llinfos << "adding texture cost of: " << iter->second << llendl;
+ }
+ textures.clear();
+ }
+
+
+ return cost;
+}
+
//-----------------------------------------------------------------------------
// getTECount()