diff options
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r-- | indra/newview/llfloatertools.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 00a0da3cde..c3b5cd4260 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -435,7 +435,8 @@ void LLFloaterTools::refresh() if (sShowObjectCost) { std::string prim_cost_string; - LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); + S32 cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectRenderCost(); + LLResMgr::getInstance()->getIntegerString(prim_cost_string, cost); getChild<LLUICtrl>("RenderingCost")->setTextArg("[COUNT]", prim_cost_string); } @@ -1014,35 +1015,6 @@ void LLFloaterTools::onClickGridOptions() //floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE); } -S32 LLFloaterTools::calcRenderCost() -{ - S32 cost = 0; - std::set<LLUUID> textures; - - for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin(); - selection_iter != LLSelectMgr::getInstance()->getSelection()->end(); - ++selection_iter) - { - LLSelectNode *select_node = *selection_iter; - if (select_node) - { - 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(); - } - } - } - - - return cost; -} - - // static void LLFloaterTools::setEditTool(void* tool_pointer) { |