From ca5e49d5fab171bc455c58b8f745d7f00d46bb41 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 23 Nov 2009 15:12:48 -0500 Subject: EXT-2718 EXT-2434 avatar render cost changes Fixing a but in new ARC function where textures added 5 to the ARC for each use. Expected (and previous) behavior restored, where 5 is added to ARC for each unique texture, regardless of how many faces it is used on. Confirmed new ARC is 99 points higher than previous (20 for each body part), or 119 if avatar is wearing a skirt. Will be post-reviewed before pushing --HG-- branch : avatar-pipeline --- indra/newview/llfloatertools.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatertools.cpp') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 9854d2594b..6d30d375f9 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -975,6 +975,8 @@ void LLFloaterTools::onClickGridOptions() S32 LLFloaterTools::calcRenderCost() { S32 cost = 0; + std::set textures; + for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin(); selection_iter != LLSelectMgr::getInstance()->getSelection()->end(); ++selection_iter) @@ -985,11 +987,13 @@ S32 LLFloaterTools::calcRenderCost() LLVOVolume *viewer_volume = (LLVOVolume*)select_node->getObject(); if (viewer_volume) { - cost += viewer_volume->getRenderCost(); + cost += viewer_volume->getRenderCost(textures); } } } + cost += textures.size() * 5; + return cost; } -- cgit v1.2.3 From c36973dbc8694c418993d567505ec115456d218e Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 23 Nov 2009 17:21:00 -0500 Subject: tweaking render cost calculations based on code review feedback. Following commits were reviewed by vir: 3054bae2bf21 dcc420c4d3f0 05341c33f01e d9cb3bf709f8 dad4281217d3 f1d887a950ba - Nyx --HG-- branch : avatar-pipeline --- indra/newview/llfloatertools.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloatertools.cpp') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 6d30d375f9..b4d248bc40 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -563,7 +563,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); - childSetVisible("RenderingCost", edit_visible || focus_visible || move_visible); + bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); + childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible)); if (mCheckSelectIndividual) { @@ -988,11 +989,12 @@ S32 LLFloaterTools::calcRenderCost() if (viewer_volume) { cost += viewer_volume->getRenderCost(textures); + cost += textures.size() * 5; + textures.clear(); } } } - cost += textures.size() * 5; return cost; } -- cgit v1.2.3