summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml29
-rw-r--r--indra/newview/llfloaterpreference.cpp15
-rw-r--r--indra/newview/llfloaterpreference.h6
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.cpp37
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.h3
-rw-r--r--indra/newview/llviewercontrol.cpp10
-rw-r--r--indra/newview/llvoavatar.cpp26
-rw-r--r--indra/newview/llvoavatar.h9
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml36
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_nearby.xml41
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml49
11 files changed, 199 insertions, 62 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a9b4ebcc04..a787010346 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8817,17 +8817,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>AlwaysRenderFriends</key>
- <map>
- <key>Comment</key>
- <string>Always render friends regardless of max complexity</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>RenderAvatar</key>
<map>
<key>Comment</key>
@@ -10921,16 +10910,16 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>RenderUseImpostors</key>
+ <key>RenderAvatarComplexityMode</key>
<map>
- <key>Comment</key>
- <string>OBSOLETE and UNUSED. See RenderAvatarMaxNonImpostors and RenderAvatarMaxComplexity.</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
+ <key>Comment</key>
+ <string>0 - complexity limit applies to everyone, 1 - always show friends, 2 - only show friends</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>0</real>
</map>
<key>RenderAvatarMaxNonImpostors</key>
<map>
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 5b4138e2e9..93292926b6 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -437,6 +437,12 @@ bool LLFloaterPreference::postBuild()
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this));
+ gSavedSettings.getControl("RenderAvatarComplexityMode")->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ onChangeComplexityMode(new_val);
+ });
+
gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this));
gSavedPerAccountSettings.getControl("PBRUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangePBRFolder, this));
gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this));
@@ -476,6 +482,9 @@ bool LLFloaterPreference::postBuild()
LLSliderCtrl* fov_slider = getChild<LLSliderCtrl>("camera_fov");
fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView());
fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView());
+
+ bool enable_complexity = gSavedSettings.getS32("RenderAvatarComplexityMode") != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
// Hook up and init for filtering
mFilterEdit = getChild<LLSearchEditor>("search_prefs_edit");
@@ -1629,6 +1638,12 @@ void LLFloaterPreference::onChangeMaturity()
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
}
+void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue)
+{
+ bool enable_complexity = newvalue.asInteger() != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
+}
+
std::string get_category_path(LLUUID cat_id)
{
LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 8a231cc10b..c6891c61aa 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -164,7 +164,6 @@ public:
void onClickLogPath();
void changeLogPath(const std::vector<std::string>& filenames, std::string proposed_name);
bool moveTranscriptsAndLog();
- void enableHistory();
void setPersonalInfo(const std::string& visibility);
void refreshEnabledState();
void onCommitWindowedMode();
@@ -174,10 +173,8 @@ public:
void refreshUI();
- void onCommitMediaEnabled();
- void onCommitMusicEnabled();
- void applyResolution();
void onChangeMaturity();
+ void onChangeComplexityMode(const LLSD& newvalue);
void onChangeModelFolder();
void onChangePBRFolder();
void onChangeTextureFolder();
@@ -199,7 +196,6 @@ public:
void buildPopupLists();
static void refreshSkin(void* data);
void selectPanel(const LLSD& name);
- void saveCameraPreset(std::string& preset);
void saveGraphicsPreset(std::string& preset);
void setRecommendedSettings();
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index 77482fc75e..6741dbb7e4 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -51,14 +51,14 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L
mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnCancel, this, _2));
mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnOK, this, _2));
-
- gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateIndirectMaxNonImpostors, this, _2));
}
LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced()
{
mComplexityChangedSignal.disconnect();
+ mComplexityModeChangedSignal.disconnect();
mLODFactorChangedSignal.disconnect();
+ mNumImpostorsChangedSignal.disconnect();
}
bool LLFloaterPreferenceGraphicsAdvanced::postBuild()
@@ -78,8 +78,26 @@ bool LLFloaterPreferenceGraphicsAdvanced::postBuild()
use_HiDPI->setVisible(false);
#endif
- mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this));
- mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText, this));
+ mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateComplexityText();
+ });
+ mComplexityModeChangedSignal = gSavedSettings.getControl("RenderAvatarComplexityMode")->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateComplexityMode(new_val);
+ });
+ mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateObjectMeshDetailText();
+ });
+ mNumImpostorsChangedSignal = gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect(
+ [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
+ {
+ updateIndirectMaxNonImpostors(new_val);
+ });
return true;
}
@@ -144,6 +162,10 @@ void LLFloaterPreferenceGraphicsAdvanced::refresh()
gSavedSettings.getU32("RenderAvatarMaxComplexity"),
getChild<LLTextBox>("IndirectMaxComplexityText", true));
refreshEnabledState();
+
+ bool enable_complexity = gSavedSettings.getS32("RenderAvatarComplexityMode") != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
+ getChild<LLSliderCtrl>("IndirectMaxNonImpostors")->setEnabled(enable_complexity);
}
void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledGraphics()
@@ -159,6 +181,13 @@ void LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity()
getChild<LLTextBox>("IndirectMaxComplexityText"));
}
+void LLFloaterPreferenceGraphicsAdvanced::updateComplexityMode(const LLSD& newvalue)
+{
+ bool enable_complexity = newvalue.asInteger() != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS;
+ getChild<LLSliderCtrl>("IndirectMaxComplexity")->setEnabled(enable_complexity);
+ getChild<LLSliderCtrl>("IndirectMaxNonImpostors")->setEnabled(enable_complexity);
+}
+
void LLFloaterPreferenceGraphicsAdvanced::updateComplexityText()
{
LLAvatarComplexityControls::setText(gSavedSettings.getU32("RenderAvatarMaxComplexity"),
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h
index ed7c1fc926..8791bdce19 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h
@@ -48,6 +48,7 @@ public:
void updateIndirectMaxNonImpostors(const LLSD& newvalue);
void setMaxNonImpostorsText(U32 value, LLTextBox* text_box);
void updateMaxComplexity();
+ void updateComplexityMode(const LLSD& newvalue);
void updateComplexityText();
void updateObjectMeshDetailText();
void refresh();
@@ -61,7 +62,9 @@ protected:
void onBtnCancel(const LLSD& userdata);
boost::signals2::connection mComplexityChangedSignal;
+ boost::signals2::connection mComplexityModeChangedSignal;
boost::signals2::connection mLODFactorChangedSignal;
+ boost::signals2::connection mNumImpostorsChangedSignal;
};
#endif //LLFLOATERPREFERENCEGRAPHICSADVANCED_H
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index a7583136eb..2a248cd120 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -638,8 +638,13 @@ void handlePerformanceStatsEnabledChanged(const LLSD& newValue)
}
void handleUserImpostorByDistEnabledChanged(const LLSD& newValue)
{
- const auto newval = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled");
- LLPerfStats::tunables.userImpostorDistanceTuningEnabled = newval;
+ bool auto_tune_newval = false;
+ S32 mode = gSavedSettings.getS32("RenderAvatarComplexityMode");
+ if (mode != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS)
+ {
+ auto_tune_newval = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled");
+ }
+ LLPerfStats::tunables.userImpostorDistanceTuningEnabled = auto_tune_newval;
}
void handleUserImpostorDistanceChanged(const LLSD& newValue)
{
@@ -708,6 +713,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderGlowNoise", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderGammaFull", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderVolumeLODFactor", handleVolumeLODChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderAvatarComplexityMode", handleUserImpostorByDistEnabledChanged);
setting_setup_signal_listener(gSavedSettings, "RenderAvatarLODFactor", handleAvatarLODChanged);
setting_setup_signal_listener(gSavedSettings, "RenderAvatarPhysicsLODFactor", handleAvatarPhysicsLODChanged);
setting_setup_signal_listener(gSavedSettings, "RenderTerrainLODFactor", handleTerrainLODChanged);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 0ab0006fc9..1e785ba757 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8344,13 +8344,17 @@ bool LLVOAvatar::isFullyLoaded() const
bool LLVOAvatar::isTooComplex() const
{
bool too_complex;
- static LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends");
- bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends);
+ static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
+ bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
too_complex = false;
}
+ else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar)
+ {
+ too_complex = true;
+ }
else
{
// Determine if visually muted or not
@@ -8370,13 +8374,17 @@ bool LLVOAvatar::isTooComplex() const
bool LLVOAvatar::isTooSlow() const
{
- static LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends");
- bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends);
+ static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
+ bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
return false;
}
+ else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar)
+ {
+ return true;
+ }
return mTooSlow;
}
@@ -8384,7 +8392,7 @@ bool LLVOAvatar::isTooSlow() const
void LLVOAvatar::updateTooSlow()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- static LLCachedControl<bool> alwaysRenderFriends(gSavedSettings, "AlwaysRenderFriends");
+ static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
static LLCachedControl<bool> allowSelfImpostor(gSavedSettings, "AllowSelfImpostor");
const auto id = getID();
@@ -8417,12 +8425,14 @@ void LLVOAvatar::updateTooSlow()
if(!mTooSlowWithoutShadows) // if we were not previously above the full impostor cap
{
- bool render_friend_or_exception = ( alwaysRenderFriends && LLAvatarTracker::instance().isBuddy( id ) ) ||
+ bool always_render_friends = compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;
+ bool render_friend_or_exception = (always_render_friends && LLAvatarTracker::instance().isBuddy( id ) ) ||
( getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER );
- if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception )
+ if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception)
{
// Note: slow rendering Friends still get their shadows zapped.
- mTooSlowWithoutShadows = getGPURenderTime()*2.f >= max_art_ms; // NOTE: assumes shadow rendering doubles render time
+ mTooSlowWithoutShadows = (getGPURenderTime()*2.f >= max_art_ms) // NOTE: assumes shadow rendering doubles render time
+ || (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar);
}
}
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index f8b71aa364..979eac6dbc 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -487,7 +487,14 @@ public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
bool isVisuallyMuted();
bool isInMuteList() const;
- void forceUpdateVisualMuteSettings();
+
+ // states for RenderAvatarComplexityMode
+ enum ERenderComplexityMode
+ {
+ AV_RENDER_LIMIT_BY_COMPLEXITY = 0,
+ AV_RENDER_ALWAYS_SHOW_FRIENDS = 1,
+ AV_RENDER_ONLY_SHOW_FRIENDS = 2
+ };
// Visual Mute Setting is an input. Does not necessarily determine
// what the avatar looks like, because it interacts with other
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index bc237322af..af6df9dad3 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -128,6 +128,42 @@
Avatar
</text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="30"
+ top_delta="16"
+ width="128"
+ name="AvatarComplexityModeLabel"
+ text_readonly_color="LabelDisabledColor">
+ Detail Mode:
+ </text>
+
+ <combo_box
+ control_name="RenderAvatarComplexityMode"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ top_delta="0"
+ name="AvatarComplexityMode"
+ width="150">
+ <combo_box.item
+ label="Limit by complexity"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Always show friends"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Only show friends"
+ name="2"
+ value="2"/>
+ </combo_box>
+
<slider
control_name="IndirectMaxComplexity"
tool_tip="Controls at what point a visually complex avatar is drawn as a JellyDoll"
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 cb795e59a9..77cf90e71c 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
@@ -135,18 +135,41 @@
name="exceptions_btn"
width="100">
</button>
- <check_box
- control_name="AlwaysRenderFriends"
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
height="16"
- initial_value="true"
- label="Always display friends in full detail"
- label_text.text_color="White"
layout="topleft"
- name="display_friends"
- top_pad="3"
left="18"
- width="256">
- </check_box>
+ top_pad="3"
+ name="AvatarComplexityModeLabel"
+ text_readonly_color="LabelDisabledColor"
+ width="128">
+ Detail Mode:
+ </text>
+ <combo_box
+ control_name="RenderAvatarComplexityMode"
+ height="23"
+ layout="topleft"
+ left_delta="130"
+ top_delta="-4"
+ name="AvatarComplexityMode"
+ width="150">
+ <combo_box.item
+ label="Limit by complexity"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Always show friends"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Only show friends"
+ name="2"
+ value="2"/>
+ </combo_box>
<view_border
bevel_style="in"
height="0"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index fe74cea2f1..9d47864c56 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -242,6 +242,41 @@
<button.commit_callback
function="Pref.AutoAdjustments"/>
</button>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="30"
+ top_delta="42"
+ width="128"
+ name="AvatarComplexityModeLabel"
+ text_readonly_color="LabelDisabledColor">
+ Avatar Detail Mode:
+ </text>
+ <combo_box
+ control_name="RenderAvatarComplexityMode"
+ height="23"
+ layout="topleft"
+ left_delta="130"
+ top_delta="-4"
+ name="AvatarComplexityMode"
+ width="150">
+ <combo_box.item
+ label="Limit by complexity"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Always show friends"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Only show friends"
+ name="2"
+ value="2"/>
+ </combo_box>
<slider
control_name="IndirectMaxComplexity"
@@ -258,7 +293,7 @@
max_val="101"
name="IndirectMaxComplexity"
show_text="false"
- top_delta="40"
+ top_delta="28"
width="300">
<slider.commit_callback
function="Pref.UpdateIndirectMaxComplexity"
@@ -291,18 +326,6 @@ width="120">
[https://community.secondlife.com/t5/Featured-News/Why-are-all-these-people-made-of-colored-jelly/ba-p/3031255 What's this?]
</text>
-
- <check_box
- control_name="AlwaysRenderFriends"
- height="16"
- initial_value="true"
- label="Always Render Friends"
- layout="topleft"
- left="30"
- name="AlwaysRenderFriends"
- top_delta="24"
- width="256">
- </check_box>
<button
height="23"
label="Exceptions..."