summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 8fa4065fa6..7ff58f5d34 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6522,32 +6522,32 @@ U32 LLObjectSelection::getSelectedObjectTriangleCount()
return count;
}
-/*S32 LLObjectSelection::getSelectedObjectRenderCost()
+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);
- }
+ std::set<LLUUID> textures;
- for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ for (list_t::iterator selection_iter = mList.begin(); selection_iter != mList.end();
+ ++selection_iter)
+ {
+ LLSelectNode *select_node = *selection_iter;
+ if (select_node)
{
- // add the cost of each individual texture in the linkset
- cost += iter->second;
+ LLViewerObject *vobj = select_node->getObject();
+ if (vobj->getVolume())
+ {
+ LLVOVolume* volume = (LLVOVolume*) vobj;
+
+ cost += volume->getRenderCost(textures);
+ cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST;
+ textures.clear();
+ }
}
- textures.clear();
}
return cost;
-}*/
-
+}
//-----------------------------------------------------------------------------
// getTECount()