summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp27
-rwxr-xr-xindra/newview/llfloaterpreference.h2
-rw-r--r--indra/newview/llpanelpresetspulldown.cpp2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml70
4 files changed, 61 insertions, 40 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 4b83b104fd..cb59cc27d7 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -341,6 +341,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
+ mCommitCallbackRegistrar.add("Pref.AvatarImpostorsEnable", boost::bind(&LLFloaterPreference::onAvatarImpostorsEnable, this));
mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::refreshUI,this));
@@ -748,6 +749,11 @@ void LLFloaterPreference::onVertexShaderEnable()
refreshEnabledGraphics();
}
+void LLFloaterPreference::onAvatarImpostorsEnable()
+{
+ refreshEnabledGraphics();
+}
+
//static
void LLFloaterPreference::initDoNotDisturbResponse()
{
@@ -1223,6 +1229,13 @@ void LLFloaterPreference::refreshEnabledState()
ctrl_shadow->setEnabled(enabled);
shadow_text->setEnabled(enabled);
+ LLTextBox* maximum_arc_text = getChild<LLTextBox>("MaximumARCText");
+
+ enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors") && gSavedSettings.getBOOL("RenderUseImpostors");
+ getChildView("MaximumARC")->setEnabled(enabled);
+ maximum_arc_text->setEnabled(enabled);
+ getChildView("MaxNumberAvatarDrawn")->setEnabled(enabled);
+
// Hardware settings
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
S32Megabytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
@@ -1297,6 +1310,9 @@ void LLFloaterPreference::disableUnavailableSettings()
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
+ LLSliderCtrl* ctrl_maximum_arc = getChild<LLSliderCtrl>("MaximumARC");
+ LLTextBox* maximum_arc_text = getChild<LLTextBox>("MaximumARCText");
+ LLSliderCtrl* ctrl_max_visible = getChild<LLSliderCtrl>("MaxNumberAvatarDrawn");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
@@ -1451,6 +1467,9 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_avatar_impostors->setEnabled(FALSE);
ctrl_avatar_impostors->setValue(FALSE);
+ ctrl_maximum_arc->setEnabled(FALSE);
+ maximum_arc_text->setEnabled(FALSE);
+ ctrl_max_visible->setEnabled(FALSE);
}
}
@@ -1770,13 +1789,9 @@ void LLFloaterPreference::updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* te
else
{
- // Invert value because a higher value on the slider control needs a decreasing final
- // value in order to obtain larger numbers of imposters
- value = 100.0f - value;
-
// 100 is the maximum value of this control set in panel_preferences_graphics1.xml
- F32 minp = 0.0f;
- F32 maxp = 99.0f;
+ F32 minp = 1.0f;
+ F32 maxp = 100.0f;
// The result should be between min_result and max_result
F32 minv = log(min_result);
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 98b05cca03..96d026277f 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -116,6 +116,8 @@ protected:
void setRecommended();
// callback for when client turns on shaders
void onVertexShaderEnable();
+ // callback for when client turns on impostors
+ void onAvatarImpostorsEnable();
// callback for commit in the "Single click on land" and "Double click on land" comboboxes.
void onClickActionChange();
diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp
index 66f2f4c3f3..2c5ae01b12 100644
--- a/indra/newview/llpanelpresetspulldown.cpp
+++ b/indra/newview/llpanelpresetspulldown.cpp
@@ -91,7 +91,7 @@ void LLPanelPresetsPulldown::populatePanel()
{
row["columns"][1]["column"] = "icon";
row["columns"][1]["type"] = "icon";
- row["columns"][1]["value"] = "Checkbox_On";
+ row["columns"][1]["value"] = "Check_Mark";
}
scroll->addElement(row);
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 888b86482a..983e0edb97 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -453,6 +453,20 @@
Avatar
</text>
+ <check_box
+ control_name="RenderUseImpostors"
+ height="16"
+ initial_value="true"
+ label="Impostors"
+ layout="topleft"
+ left="30"
+ name="AvatarImpostors"
+ top_delta="20"
+ width="300">
+ <check_box.commit_callback
+ function="Pref.AvatarImpostorsEnable" />
+ </check_box>
+
<slider
control_name="MaximumARC"
follows="left|top"
@@ -460,15 +474,15 @@
initial_value="0"
increment="1"
label="Maximum ARC:"
- label_width="185"
+ label_width="165"
layout="topleft"
- left="30"
+ left="50"
min_val="0"
max_val="100"
name="MaximumARC"
show_text="false"
top_delta="16"
- width="300">
+ width="280">
<slider.commit_callback
function="Pref.UpdateSliderText"
parameter="MaximumARCText" />
@@ -480,13 +494,31 @@
height="16"
layout="topleft"
top_delta="0"
- left_delta="304"
+ left_delta="284"
+ text_readonly_color="LabelDisabledColor"
name="MaximumARCText"
width="128">
- Low
+ 0
</text>
<slider
+ control_name="RenderAvatarMaxVisible"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="1"
+ initial_value="12"
+ label="Max. # of non-impostors:"
+ label_width="165"
+ layout="topleft"
+ left="50"
+ min_val="1"
+ max_val="65"
+ name="MaxNumberAvatarDrawn"
+ top_delta="16"
+ width="305" />
+
+ <slider
control_name="RenderAvatarLODFactor"
follows="left|top"
height="16"
@@ -548,34 +580,6 @@
Low
</text>
- <slider
- control_name="RenderAvatarMaxVisible"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="12"
- label="Max. # of non-impostor avatars:"
- label_width="185"
- layout="topleft"
- left="30"
- min_val="1"
- max_val="65"
- name="MaxNumberAvatarDrawn"
- top_delta="16"
- width="325" />
-
- <check_box
- control_name="RenderUseImpostors"
- height="16"
- initial_value="true"
- label="Avatar impostors"
- layout="topleft"
- left="30"
- name="AvatarImpostors"
- top_delta="20"
- width="300" />
-
<text
type="string"
length="1"