summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterperformance.cpp45
-rw-r--r--indra/newview/llfloaterperformance.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_performance.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_nearby.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_preferences.xml255
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_presets.xml223
6 files changed, 461 insertions, 77 deletions
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index c96d3dac5e..424ca04b1f 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -63,18 +63,21 @@ BOOL LLFloaterPerformance::postBuild()
mComplexityPanel = getChild<LLPanel>("panel_performance_complexity");
mSettingsPanel = getChild<LLPanel>("panel_performance_preferences");
mHUDsPanel = getChild<LLPanel>("panel_performance_huds");
+ mPresetsPanel = getChild<LLPanel>("panel_performance_presets");
getChild<LLPanel>("troubleshooting_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mTroubleshootingPanel));
getChild<LLPanel>("nearby_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mNearbyPanel));
getChild<LLPanel>("complexity_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mComplexityPanel));
getChild<LLPanel>("settings_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mSettingsPanel));
getChild<LLPanel>("huds_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mHUDsPanel));
+ getChild<LLPanel>("presets_subpanel")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mPresetsPanel));
initBackBtn(mTroubleshootingPanel);
initBackBtn(mNearbyPanel);
initBackBtn(mComplexityPanel);
initBackBtn(mSettingsPanel);
initBackBtn(mHUDsPanel);
+ initBackBtn(mPresetsPanel);
mHUDList = mHUDsPanel->getChild<LLNameListCtrl>("hud_list");
mHUDList->setNameListType(LLNameListCtrl::SPECIAL);
@@ -87,11 +90,13 @@ BOOL LLFloaterPerformance::postBuild()
mObjectList->setIconClickedCallback(boost::bind(&LLFloaterPerformance::detachItem, this, _1));
mSettingsPanel->getChild<LLButton>("advanced_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickAdvanced, this));
- mSettingsPanel->getChild<LLButton>("defaults_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickRecommended, this));
mNearbyPanel->getChild<LLButton>("exceptions_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickExceptions, this));
mNearbyList = mNearbyPanel->getChild<LLNameListCtrl>("nearby_list");
+ mPresetsPanel->getChild<LLTextBox>("avatars_nearby_link")->setURLClickedCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mNearbyPanel));
+ mPresetsPanel->getChild<LLTextBox>("settings_link")->setURLClickedCallback(boost::bind(&LLFloaterPerformance::showSelectedPanel, this, mSettingsPanel));
+
updateComplexityText();
mComplexityChangedSignal = gSavedSettings.getControl("IndirectMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateComplexityText, this));
mNearbyPanel->getChild<LLSliderCtrl>("IndirectMaxComplexity")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxComplexity, this));
@@ -103,8 +108,9 @@ BOOL LLFloaterPerformance::postBuild()
void LLFloaterPerformance::showSelectedPanel(LLPanel* selected_panel)
{
- selected_panel->setVisible(TRUE);
+ hidePanels();
mMainPanel->setVisible(FALSE);
+ selected_panel->setVisible(TRUE);
if (mHUDsPanel == selected_panel)
{
@@ -148,12 +154,18 @@ void LLFloaterPerformance::draw()
void LLFloaterPerformance::showMainPanel()
{
+ hidePanels();
+ mMainPanel->setVisible(TRUE);
+}
+
+void LLFloaterPerformance::hidePanels()
+{
mTroubleshootingPanel->setVisible(FALSE);
mNearbyPanel->setVisible(FALSE);
mComplexityPanel->setVisible(FALSE);
mHUDsPanel->setVisible(FALSE);
mSettingsPanel->setVisible(FALSE);
- mMainPanel->setVisible(TRUE);
+ mPresetsPanel->setVisible(FALSE);
}
void LLFloaterPerformance::initBackBtn(LLPanel* panel)
@@ -247,6 +259,7 @@ void LLFloaterPerformance::populateNearbyList()
mNearbyList->updateColumns(true);
S32 avatars = 0;
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
std::vector<LLCharacter*>::iterator char_iter = LLCharacter::sInstances.begin();
while (char_iter != LLCharacter::sInstances.end())
@@ -274,12 +287,21 @@ void LLFloaterPerformance::populateNearbyList()
row[2]["font"]["name"] = "SANSSERIF";
LLScrollListItem* av_item = mNearbyList->addElement(item);
- if(av_item && LLAvatarActions::isFriend(avatar->getID()))
+ if(av_item)
{
LLScrollListText* name_text = dynamic_cast<LLScrollListText*>(av_item->getColumn(2));
if (name_text)
{
- name_text->setColor(LLUIColorTable::instance().getColor("ConversationFriendColor"));
+ std::string color = "white";
+ if (avatar->getVisualComplexity() > max_render_cost)
+ {
+ color = "LabelDisabledColor";
+ }
+ else if (LLAvatarActions::isFriend(avatar->getID()))
+ {
+ color = "ConversationFriendColor";
+ }
+ name_text->setColor(LLUIColorTable::instance().getColor(color));
}
}
avatars++;
@@ -291,6 +313,7 @@ void LLFloaterPerformance::populateNearbyList()
void LLFloaterPerformance::updateNearbyComplexityDesc()
{
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
S32 max_complexity = 0;
std::vector<LLCharacter*>::iterator char_iter = LLCharacter::sInstances.begin();
while (char_iter != LLCharacter::sInstances.end())
@@ -302,7 +325,7 @@ void LLFloaterPerformance::updateNearbyComplexityDesc()
}
char_iter++;
}
- std::string desc = getString(max_complexity > COMPLEXITY_THRESHOLD_1 ? "very_high" : "medium");
+ std::string desc = getString(max_complexity > llmin((S32)max_render_cost, COMPLEXITY_THRESHOLD_1) ? "very_high" : "medium");
if (mMainPanel->getVisible())
{
@@ -316,13 +339,13 @@ void LLFloaterPerformance::detachItem(const LLUUID& item_id)
LLAppearanceMgr::instance().removeItemFromAvatar(item_id);
}
-void LLFloaterPerformance::onClickRecommended()
-{
- LLFeatureManager::getInstance()->applyRecommendedSettings();
-}
-
void LLFloaterPerformance::onClickAdvanced()
{
+ LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->saveSettings();
+ }
LLFloaterReg::showInstance("prefs_graphics_advanced");
}
diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h
index 1facfe9225..7aec7c3f6c 100644
--- a/indra/newview/llfloaterperformance.h
+++ b/indra/newview/llfloaterperformance.h
@@ -41,6 +41,7 @@ public:
void showSelectedPanel(LLPanel* selected_panel);
void showMainPanel();
+ void hidePanels();
void detachItem(const LLUUID& item_id);
@@ -51,7 +52,6 @@ private:
void populateNearbyList();
void onClickAdvanced();
- void onClickRecommended();
void onClickExceptions();
void updateMaxComplexity();
@@ -65,6 +65,7 @@ private:
LLPanel* mComplexityPanel;
LLPanel* mHUDsPanel;
LLPanel* mSettingsPanel;
+ LLPanel* mPresetsPanel;
LLNameListCtrl* mHUDList;
LLNameListCtrl* mObjectList;
LLNameListCtrl* mNearbyList;
diff --git a/indra/newview/skins/default/xui/en/floater_performance.xml b/indra/newview/skins/default/xui/en/floater_performance.xml
index 09af364266..e415ac5be0 100644
--- a/indra/newview/skins/default/xui/en/floater_performance.xml
+++ b/indra/newview/skins/default/xui/en/floater_performance.xml
@@ -194,7 +194,7 @@
text_color="PerformanceMid"
height="20"
layout="topleft"
- left_pad="5"
+ left_pad="2"
name="avatars_nearby_value"
width="100">
very high
@@ -383,6 +383,14 @@
</panel>
</panel>
<panel
+ filename="panel_performance_presets.xml"
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="panel_performance_presets"
+ visible="false"
+ top="55" />
+ <panel
filename="panel_performance_troubleshooting.xml"
follows="all"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
index 28ffbd5c2e..9d91e86b7a 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
@@ -46,7 +46,7 @@
</text>
<text
follows="left|top"
- font="SansSerifLargeBold"
+ font="SansSerifLarge"
text_color="PerformanceMid"
height="20"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
index aaa27061e3..ec1b624f13 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
@@ -2,7 +2,7 @@
<panel
bevel_style="none"
follows="left|top"
- height="490"
+ height="510"
width="580"
name="panel_performance_preferences"
layout="topleft"
@@ -35,37 +35,33 @@
<text
follows="left|top"
font="SansSerifLarge"
- text_color="PerformanceMid"
+ text_color="white"
height="20"
layout="topleft"
left="20"
top_pad="10"
- name="preferences_title"
+ name="settings_title"
width="300">
- This location is very complex
+ Individual settings
</text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="border1"
+ top_pad="8"
+ width="540"/>
<text
follows="left|top"
font="SansSerifSmall"
text_color="White"
height="18"
layout="topleft"
- top_pad="5"
- name="preferences_desc"
- width="580">
- While you are here, you may want to reduce graphics quality or draw distance.
- </text>
-
- <text
- follows="left|top"
- font="SansSerifSmall"
- text_color="White"
- height="18"
- layout="topleft"
- top_pad="35"
+ top_pad="20"
name="quality_lbl"
width="100">
Graphics quality
+shortcuts
</text>
<text
follows="left|top"
@@ -111,43 +107,31 @@
text_color="White"
height="18"
layout="topleft"
- top_pad="40"
- left="20"
- name="enhancements_lbl"
- width="100">
- Enhancements
+ top_pad="15"
+ left="160"
+ name="quality_desc"
+ width="380">
+ Choosing a shortcut will reset all manual changes you have made.
</text>
- <check_box
- control_name="WindLightUseAtmosShaders"
- height="16"
- initial_value="true"
- label="Atmospheric shaders"
+ <view_border
+ bevel_style="in"
+ height="0"
layout="topleft"
- name="atmospheric_shaders"
- left_pad="37"
- width="280">
- </check_box>
- <check_box
- control_name="RenderDeferred"
- height="16"
- initial_value="true"
- label="Advanced Lighting Model"
- layout="topleft"
- name="advanced_lighting_model"
- top_delta="24"
- width="256">
- </check_box>
+ name="border2"
+ top_pad="15"
+ left="20"
+ width="540"/>
<text
follows="left|top"
font="SansSerifSmall"
text_color="White"
height="18"
layout="topleft"
- top_pad="40"
+ top_pad="20"
left="20"
name="distance_lbl"
width="100">
- Draw distance
+ Visibility distance
</text>
<text
follows="left|top"
@@ -205,11 +189,11 @@
text_color="White"
height="18"
layout="topleft"
- top_pad="20"
+ top_pad="15"
left="160"
name="distance_desc1"
- width="100">
- Regions are 256 m x 256 m.
+ width="350">
+ To zoom out and see long distances, increase the distance.
</text>
<text
follows="left|top"
@@ -220,38 +204,183 @@
top_pad="5"
left="160"
name="distance_desc2"
- width="400">
- To zoom out and see long distances, increase the draw distance.
+ width="350">
+ If you are indoors, decrease the distance to improve speed.
</text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="border3"
+ top_pad="15"
+ left="20"
+ width="540"/>
<text
follows="left|top"
font="SansSerifSmall"
text_color="White"
height="18"
layout="topleft"
- top_pad="5"
+ top_pad="20"
+ left="20"
+ name="enhancements_lbl"
+ width="100">
+ Enhancements
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_delta="0"
left="160"
- name="distance_desc3"
- width="400">
- If you are socializing in a small area, decrease the draw distance.
+ name="enhancements_desc"
+ width="350">
+ Each enhancement improves realism but can reduce speed.
</text>
- <button
- follows="top|left"
- height="23"
- label="Reset to recommended settings"
+ <check_box
+ control_name="WindLightUseAtmosShaders"
+ height="16"
+ initial_value="true"
+ label="Atmospheric shaders"
+ layout="topleft"
+ name="atmospheric_shaders"
+ top_pad="5"
+ left="157"
+ width="280">
+ </check_box>
+ <check_box
+ control_name="RenderDeferred"
+ height="16"
+ initial_value="true"
+ label="Advanced Lighting"
+ layout="topleft"
+ name="advanced_lighting_model"
+ top_delta="24"
+ width="280">
+ </check_box>
+ <check_box
+ control_name="RenderTransparentWater"
+ height="16"
+ initial_value="true"
+ label="Transparent Water"
+ layout="topleft"
+ name="TransparentWater"
+ top_delta="24"
+ width="280">
+ </check_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="ReflectionsText"
+ text_readonly_color="LabelDisabledColor"
+ top_pad="16"
+ left="160"
+ width="128">
+ Water Reflections:
+ </text>
+ <combo_box
+ control_name="RenderReflectionDetail"
+ height="18"
+ layout="topleft"
+ left_delta="150"
+ top_delta="0"
+ name="Reflections"
+ width="150">
+ <combo_box.item
+ label="None; opaque"
+ name="0"
+ value="-2"/>
+ <combo_box.item
+ label="None; transparent"
+ name="0"
+ value="-1"/>
+ <combo_box.item
+ label="Minimal"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Terrain and trees"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="All static objects"
+ name="2"
+ value="2"/>
+ <combo_box.item
+ label="All avatars and objects"
+ name="3"
+ value="3"/>
+ <combo_box.item
+ label="Everything"
+ name="4"
+ value="4"/>
+ </combo_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
layout="topleft"
+ left="160"
+ name="RenderShadowDetailText"
+ text_readonly_color="LabelDisabledColor"
+ top_pad="10"
+ width="128">
+ Shadows:
+ </text>
+ <combo_box
+ control_name="RenderShadowDetail"
+ height="18"
+ layout="topleft"
+ left_delta="150"
+ top_delta="0"
+ name="ShadowDetail"
+ width="150">
+ <combo_box.item
+ label="None"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Sun/Moon"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Sun/Moon + Projectors"
+ name="2"
+ value="2"/>
+ </combo_box>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ height="18"
+ layout="topleft"
+ top_pad="8"
+ left="160"
+ skip_link_underline="true"
+ name="settings_help"
+ width="350">
+ [secondlife:/// What do these settings mean?]
+ </text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="border3"
+ top_pad="10"
left="20"
- name="defaults_btn"
- top_delta="50"
- width="210">
- </button>
+ width="540"/>
<button
follows="top|left"
height="23"
- label="Advanced Settings..."
+ label="Open Advanced Settings"
layout="topleft"
- left_pad="10"
+ left="160"
name="advanced_btn"
- top_delta="0"
+ top_pad="12"
width="200"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_performance_presets.xml b/indra/newview/skins/default/xui/en/panel_performance_presets.xml
new file mode 100644
index 0000000000..51516020a2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_performance_presets.xml
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ bevel_style="none"
+ follows="left|top"
+ height="490"
+ width="580"
+ name="panel_performance_presets"
+ layout="topleft"
+ left="0"
+ top="0">
+ <button
+ height="16"
+ width="16"
+ layout="topleft"
+ mouse_opaque="true"
+ follows="left|top"
+ name="back_btn"
+ top="7"
+ image_selected="Arrow_Left_Off"
+ image_pressed="Arrow_Left_Off"
+ image_unselected="Arrow_Left_Off"
+ left="15"
+ is_toggle="true">
+ </button>
+ <text
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="3"
+ top="10"
+ name="back_lbl"
+ width="40">
+ Back
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifLarge"
+ text_color="White"
+ height="20"
+ layout="topleft"
+ left="20"
+ top_pad="10"
+ name="presets_title"
+ width="300">
+ Quick settings
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="5"
+ name="presets_desc"
+ width="580">
+ Note: Quick settings will reset all manual changes you have made.
+ </text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="top_border"
+ top_pad="12"
+ width="540"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Social"
+ label_color="White"
+ layout="topleft"
+ name="social"
+ top_pad="14"
+ width="130">
+ </button>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="14"
+ name="social_desc1"
+ width="580">
+ Tuned for many avatars in a room.
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="5"
+ name="social_desc2"
+ width="180">
+ Nearby avatar complexity is high.
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ height="18"
+ layout="topleft"
+ left_pad="5"
+ name="avatars_nearby_link"
+ skip_link_underline="true"
+ width="200">
+ [secondlife:/// Choose avatars to show and hide]
+ </text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="social_border"
+ left="20"
+ top_pad="12"
+ width="540"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Outdoors"
+ label_color="White"
+ layout="topleft"
+ name="outdoors"
+ top_pad="14"
+ width="130">
+ </button>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="14"
+ name="outdoors_desc"
+ width="580">
+ Fewer avatars, higher visibility distance.
+ </text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="outdoors_border"
+ top_pad="12"
+ width="540"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Maximum distance"
+ label_color="White"
+ layout="topleft"
+ name="max_distance"
+ top_pad="14"
+ width="130">
+ </button>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="14"
+ name="max_distance_desc"
+ width="580">
+ Good for zooming your camera far out and viewing large land areas.
+ </text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="max_distance_border"
+ top_pad="12"
+ width="540"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Photography"
+ label_color="White"
+ layout="topleft"
+ name="photography"
+ top_pad="14"
+ width="130">
+ </button>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="14"
+ name="photography_desc"
+ width="580">
+ Maximum quality, minimum visibility distance.
+ </text>
+ <view_border
+ bevel_style="in"
+ height="0"
+ layout="topleft"
+ name="photography_border"
+ top_pad="12"
+ width="540"/>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ text_color="White"
+ height="18"
+ layout="topleft"
+ top_pad="14"
+ name="settings_desc"
+ width="110">
+ For more control, try
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifSmall"
+ height="18"
+ layout="topleft"
+ left_pad="3"
+ name="settings_link"
+ skip_link_underline="true"
+ width="200">
+ [secondlife:/// Idividual Settings]
+ </text>
+
+</panel>