summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt12
-rwxr-xr-xindra/newview/app_settings/high_graphics.xml6
-rwxr-xr-xindra/newview/app_settings/low_graphics.xml8
-rwxr-xr-xindra/newview/app_settings/mid_graphics.xml6
-rwxr-xr-xindra/newview/app_settings/settings.xml149
-rwxr-xr-xindra/newview/app_settings/ultra_graphics.xml7
-rwxr-xr-xindra/newview/featuretable.txt40
-rwxr-xr-xindra/newview/featuretable_linux.txt16
-rwxr-xr-xindra/newview/featuretable_mac.txt31
-rwxr-xr-xindra/newview/featuretable_solaris.txt2
-rwxr-xr-xindra/newview/featuretable_xp.txt24
-rwxr-xr-xindra/newview/llappviewer.cpp5
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp516
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.h33
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp7
-rwxr-xr-xindra/newview/llface.cpp12
-rwxr-xr-xindra/newview/llfeaturemanager.cpp4
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp101
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.h53
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.cpp201
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.h84
-rw-r--r--indra/newview/llfloaterloadprefpreset.cpp91
-rw-r--r--indra/newview/llfloaterloadprefpreset.h53
-rwxr-xr-xindra/newview/llfloaterpreference.cpp582
-rwxr-xr-xindra/newview/llfloaterpreference.h64
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp108
-rw-r--r--indra/newview/llfloatersaveprefpreset.h57
-rwxr-xr-xindra/newview/llpanelnearbymedia.cpp6
-rw-r--r--indra/newview/llpanelpresetspulldown.cpp188
-rw-r--r--indra/newview/llpanelpresetspulldown.h58
-rwxr-xr-xindra/newview/llpanelvolumepulldown.cpp4
-rw-r--r--indra/newview/llpresetsmanager.cpp279
-rw-r--r--indra/newview/llpresetsmanager.h76
-rwxr-xr-xindra/newview/llstatusbar.cpp36
-rwxr-xr-xindra/newview/llstatusbar.h5
-rwxr-xr-xindra/newview/llviewercontrol.cpp20
-rwxr-xr-xindra/newview/llviewerfloaterreg.cpp9
-rwxr-xr-xindra/newview/llviewermenu.cpp9
-rwxr-xr-xindra/newview/llviewerobject.cpp17
-rwxr-xr-xindra/newview/llviewerobject.h1
-rwxr-xr-xindra/newview/llviewerregion.cpp3
-rwxr-xr-xindra/newview/llviewerregion.h4
-rwxr-xr-xindra/newview/llviewerwindow.cpp2
-rwxr-xr-xindra/newview/llvoavatar.cpp319
-rwxr-xr-xindra/newview/llvoavatar.h24
-rwxr-xr-xindra/newview/llvoavatarself.cpp14
-rwxr-xr-xindra/newview/llvoavatarself.h2
-rwxr-xr-xindra/newview/pipeline.cpp9
-rwxr-xr-xindra/newview/pipeline.h2
-rw-r--r--indra/newview/skins/default/textures/icons/Presets_Icon.pngbin0 -> 268 bytes
-rwxr-xr-xindra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml49
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_hardware_settings.xml198
-rw-r--r--indra/newview/skins/default/xui/en/floater_load_pref_preset.xml49
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_preferences.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml918
-rw-r--r--indra/newview/skins/default/xui/en/floater_save_pref_preset.xml51
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_viewer.xml28
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml14
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml1188
-rw-r--r--indra/newview/skins/default/xui/en/panel_presets_pulldown.xml69
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_status_bar.xml10
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml7
63 files changed, 3797 insertions, 2147 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 13040ea423..45ee3bf7c1 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -231,6 +231,7 @@ set(viewer_SOURCE_FILES
llfloaterconversationlog.cpp
llfloaterconversationpreview.cpp
llfloaterdeleteenvpreset.cpp
+ llfloaterdeleteprefpreset.cpp
llfloaterdestinations.cpp
llfloaterdisplayname.cpp
llfloatereditdaycycle.cpp
@@ -248,7 +249,6 @@ set(viewer_SOURCE_FILES
llfloatergroupinvite.cpp
llfloatergroups.cpp
llfloaterhandler.cpp
- llfloaterhardwaresettings.cpp
llfloaterhelpbrowser.cpp
llfloaterhoverheight.cpp
llfloaterhud.cpp
@@ -262,6 +262,7 @@ set(viewer_SOURCE_FILES
llfloaterlagmeter.cpp
llfloaterland.cpp
llfloaterlandholdings.cpp
+ llfloaterloadprefpreset.cpp
llfloatermap.cpp
llfloatermediasettings.cpp
llfloatermemleak.cpp
@@ -285,6 +286,7 @@ set(viewer_SOURCE_FILES
llfloaterregioninfo.cpp
llfloaterreporter.cpp
llfloaterregionrestarting.cpp
+ llfloatersaveprefpreset.cpp
llfloatersceneloadstats.cpp
llfloaterscriptdebug.cpp
llfloaterscriptedprefs.cpp
@@ -458,6 +460,7 @@ set(viewer_SOURCE_FILES
llpanelplaceprofile.cpp
llpanelplaces.cpp
llpanelplacestab.cpp
+ llpanelpresetspulldown.cpp
llpanelprimmediacontrols.cpp
llpanelprofile.cpp
llpanelsnapshot.cpp
@@ -497,6 +500,7 @@ set(viewer_SOURCE_FILES
llplacesfolderview.cpp
llpopupview.cpp
llpostcard.cpp
+ llpresetsmanager.cpp
llpreview.cpp
llpreviewanim.cpp
llpreviewgesture.cpp
@@ -836,6 +840,7 @@ set(viewer_HEADER_FILES
llfloatercolorpicker.h
llfloaterconversationlog.h
llfloaterconversationpreview.h
+ llfloaterdeleteprefpreset.h
llfloaterdeleteenvpreset.h
llfloaterdestinations.h
llfloaterdisplayname.h
@@ -854,7 +859,6 @@ set(viewer_HEADER_FILES
llfloatergroupinvite.h
llfloatergroups.h
llfloaterhandler.h
- llfloaterhardwaresettings.h
llfloaterhelpbrowser.h
llfloaterhoverheight.h
llfloaterhud.h
@@ -871,6 +875,7 @@ set(viewer_HEADER_FILES
llfloaterlagmeter.h
llfloaterland.h
llfloaterlandholdings.h
+ llfloaterloadprefpreset.h
llfloatermap.h
llfloatermediasettings.h
llfloatermemleak.h
@@ -894,6 +899,7 @@ set(viewer_HEADER_FILES
llfloaterregioninfo.h
llfloaterreporter.h
llfloaterregionrestarting.h
+ llfloatersaveprefpreset.h
llfloatersceneloadstats.h
llfloaterscriptdebug.h
llfloaterscriptedprefs.h
@@ -1058,6 +1064,7 @@ set(viewer_HEADER_FILES
llpanelplaceprofile.h
llpanelplaces.h
llpanelplacestab.h
+ llpanelpresetspulldown.h
llpanelprimmediacontrols.h
llpanelprofile.h
llpanelsnapshot.h
@@ -1092,6 +1099,7 @@ set(viewer_HEADER_FILES
llplacesfolderview.h
llpopupview.h
llpostcard.h
+ llpresetsmanager.h
llpreview.h
llpreviewanim.h
llpreviewgesture.h
diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml
index 5bc2e1b7e6..4e7c0fa914 100755
--- a/indra/newview/app_settings/high_graphics.xml
+++ b/indra/newview/app_settings/high_graphics.xml
@@ -26,8 +26,10 @@
<RenderTerrainLODFactor value="2"/>
<!--Default for now-->
<RenderTreeLODFactor value="0.5"/>
- <!--Try Impostors-->
- <RenderUseImpostors value="TRUE"/>
+ <!--Avater Impostors and Visual Muting Limits-->
+ <RenderAvatarMaxNonImpostors value="20"/>
+ <RenderAvatarMaxComplexity value="350000"/>
+ <RenderAutoMuteSurfaceAreaLimit value="300"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->
diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml
index ca1dae0b86..b98d681018 100755
--- a/indra/newview/app_settings/low_graphics.xml
+++ b/indra/newview/app_settings/low_graphics.xml
@@ -7,7 +7,7 @@
<!--Default for now-->
<RenderAvatarPhysicsLODFactor value="0.0"/>
<!--Default for now-->
- <RenderAvatarMaxVisible value="3"/>
+ <RenderAvatarMaxNonImpostors value="10"/>
<!--NO SHADERS-->
<RenderAvatarVP value="FALSE"/>
<!--Short Range-->
@@ -28,8 +28,10 @@
<RenderTerrainLODFactor value="1.0"/>
<!--Default for now-->
<RenderTreeLODFactor value="0.5"/>
- <!--Try Impostors-->
- <RenderUseImpostors value="TRUE"/>
+ <!--Avater Impostors and Visual Muting Limits-->
+ <RenderAvatarMaxNonImpostors value="12"/>
+ <RenderAvatarMaxComplexity value="75000"/>
+ <RenderAutoMuteSurfaceAreaLimit value="150"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->
diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml
index 01822fe64c..fad48f9683 100755
--- a/indra/newview/app_settings/mid_graphics.xml
+++ b/indra/newview/app_settings/mid_graphics.xml
@@ -26,8 +26,10 @@
<RenderTerrainLODFactor value="1.0"/>
<!--Default for now-->
<RenderTreeLODFactor value="0.5"/>
- <!--Try Impostors-->
- <RenderUseImpostors value="TRUE"/>
+ <!--Avater Impostors and Visual Muting Limits-->
+ <RenderAvatarMaxNonImpostors value="18"/>
+ <RenderAvatarMaxComplexity value="100000"/>
+ <RenderAutoMuteSurfaceAreaLimit value="200"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 138bdde9e9..6933fe220e 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8217,17 +8217,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>RenderAvatarComplexityLimit</key>
- <map>
- <key>Comment</key>
- <string>Max visual complexity of avatars in a scene</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>-1</integer>
- </map>
<key>RenderComplexityColorMin</key>
<map>
<key>Comment</key>
@@ -8313,13 +8302,13 @@
<key>RenderAvatarMaxVisible</key>
<map>
<key>Comment</key>
- <string>Maximum number of avatars to display at any one time</string>
+ <string>OBSOLETE and UNUSED. See RenderAvatarMaxNonImpostors</string>
<key>Persist</key>
- <integer>1</integer>
+ <integer>0</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>12</integer>
+ <integer>0</integer>
</map>
<key>RenderAvatarPhysicsLODFactor</key>
<map>
@@ -9752,13 +9741,13 @@
<key>RenderTerrainDetail</key>
<map>
<key>Comment</key>
- <string>Detail applied to terrain texturing (0 = none, 1 or 2 = full)</string>
+ <string>Detail applied to terrain texturing (0 = none, 1 = full)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>2</integer>
+ <integer>1</integer>
</map>
<key>RenderTerrainLODFactor</key>
<map>
@@ -9870,29 +9859,28 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>RenderUseFarClip</key>
- <map>
- <key>Comment</key>
- <string>If false, frustum culling will ignore far clip plane.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>RenderUseImpostors</key>
- <map>
- <key>Comment</key>
- <string>Whether we want to use impostors for far away avatars.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
-
+ <key>RenderUseFarClip</key>
+ <map>
+ <key>Comment</key>
+ <string>If false, frustum culling will ignore far clip plane.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>RenderUseImpostors</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>
+ </map>
<key>RenderAutoMuteByteLimit</key>
<map>
<key>Comment</key>
@@ -9902,40 +9890,54 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>10000000</integer>
</map>
- <key>RenderAutoMuteRenderWeightLimit</key>
+ <key>RenderAvatarMaxNonImpostors</key>
<map>
<key>Comment</key>
- <string>Maximum render weight before an avatar is rendered as a simple impostor (0 to not use this limit).</string>
+ <string>Maximum number of avatars to fully render at one time;
+ over this limit uses impostor rendering (simplified rendering
+ with less frequent updates), reducing client lag.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
+ <integer>12</integer>
+ </map>
+ <key>RenderAutoMuteRenderWeightLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>OBSOLETE. This setting has been renamed RenderAvatarMaxNonImpostors.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
<integer>0</integer>
</map>
- <key>RenderAutoMuteSurfaceAreaLimit</key>
+ <key>RenderAvatarMaxComplexity</key>
<map>
<key>Comment</key>
- <string>Maximum surface area of attachments before an avatar is rendered as a simple impostor (0 to not use this limit).</string>
+ <string>Maximum Avatar Complexity; above this value, the avatar is
+ rendered as a solid color outline (0 to disable this limit).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>F32</string>
+ <string>U32</string>
<key>Value</key>
<integer>0</integer>
</map>
- <key>RenderAutoMuteFunctions</key>
+ <key>RenderAutoMuteSurfaceAreaLimit</key>
<map>
<key>Comment</key>
- <string>Developing feature to render some avatars using simple impostors or colored silhouettes. (Set to 7 for all functionality)</string>
+ <string>Maximum surface area of attachments before an avatar is rendered as a simple impostor (0 to not use this limit).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>U32</string>
+ <string>F32</string>
<key>Value</key>
- <real>0</real>
+ <integer>0</integer>
</map>
<key>RenderAutoMuteLogging</key>
<map>
@@ -9957,7 +9959,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>0</integer>
+ <real>1.0E6</real>
</map>
<key>RenderVBOEnable</key>
@@ -10544,17 +10546,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowAdvancedGraphicsSettings</key>
- <map>
- <key>Comment</key>
- <string>Show advanced graphics settings</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowAllObjectHoverTip</key>
<map>
<key>Comment</key>
@@ -15610,7 +15601,41 @@
<key>Value</key>
<integer>0</integer>
</map>
-
+ <key>PresetGraphicActive</key>
+ <map>
+ <key>Comment</key>
+ <string>Name of currently selected preference</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
+ <key>IndirectMaxComplexity</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls RenderAvatarMaxComplexity in a non-linear fashion (do
+ not set this value)</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>IndirectMaxNonImpostors</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls RenderAvatarMaxNonImpostors in a non-linear fashion (do
+ not set this value)</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml
index 71459e5470..270f91aeeb 100755
--- a/indra/newview/app_settings/ultra_graphics.xml
+++ b/indra/newview/app_settings/ultra_graphics.xml
@@ -26,8 +26,11 @@
<RenderTerrainLODFactor value="2.0"/>
<!--Default for now-->
<RenderTreeLODFactor value="1.0"/>
- <!--Try Impostors-->
- <RenderUseImpostors value="TRUE"/>
+ <!--Avater Impostors and Visual Muting Limits (real defaults set
+ based on default graphics setting -->
+ <RenderAvatarMaxNonImpostors value="0"/>
+ <RenderAvatarMaxComplexity value="0"/>
+ <RenderAutoMuteSurfaceAreaLimit value="10000"/>
<!--Default for now-->
<RenderVolumeLODFactor value="2.0"/>
<!--NO SHADERS-->
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 4030324ecb..4b4892f03b 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -31,7 +31,8 @@ RenderAnisotropic 1 1
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
RenderAvatarPhysicsLODFactor 1 1.0
-RenderAvatarMaxVisible 1 12
+RenderAvatarMaxNonImpostors 1 12
+RenderAvatarMaxComplexity 1 60000
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
@@ -49,7 +50,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
@@ -66,12 +66,10 @@ RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
-
//
// Low Graphics Settings (fixed function)
//
@@ -80,20 +78,20 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 12
+RenderAvatarMaxComplexity 1 30000
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
+RenderLocalLights 1 0
RenderMaxPartCount 1 0
RenderObjectBump 1 0
-RenderLocalLights 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
@@ -103,7 +101,6 @@ RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
-
//
// Low Graphics Settings
//
@@ -112,20 +109,20 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 12
+RenderAvatarMaxComplexity 1 30000
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
+RenderLocalLights 1 0
RenderMaxPartCount 1 0
RenderObjectBump 1 0
-RenderLocalLights 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -155,7 +152,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 1.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -185,7 +181,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -215,7 +210,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -245,7 +239,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -275,7 +268,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -293,19 +285,19 @@ list Ultra
RenderAnisotropic 1 1
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
+RenderAvatarPhysicsLODFactor 1 1.0
RenderAvatarVP 1 1
RenderFarClip 1 256
RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 9
+RenderLocalLights 1 1
RenderMaxPartCount 1 8192
RenderObjectBump 1 1
-RenderLocalLights 1 1
RenderReflectionDetail 1 4
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 2.0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -315,7 +307,6 @@ RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 2
-
//
// Class Unknown Hardware (unknown)
//
@@ -407,18 +398,18 @@ list safe
RenderAnisotropic 1 0
RenderAvatarCloth 0 0
RenderAvatarVP 0 0
+RenderAvatarMaxNonImpostors 1 16
+RenderAvatarMaxComplexity 1 60000
RenderObjectBump 0 0
RenderLocalLights 1 0
RenderMaxPartCount 1 1024
RenderTerrainDetail 1 0
-RenderUseImpostors 0 0
RenderVBOEnable 1 0
RenderReflectionDetail 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
-
//
// CPU based feature masks
@@ -462,37 +453,30 @@ UseOcclusion 0 0
list Intel_830M
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_845G
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_855GM
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_865G
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_900
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_915GM
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_915G
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_945GM
RenderTerrainDetail 1 0
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 6d5284c602..121559bb7a 100755
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -31,7 +31,7 @@ RenderAnisotropic 1 1
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
RenderAvatarPhysicsLODFactor 1 1.0
-RenderAvatarMaxVisible 1 12
+RenderAvatarMaxNonImpostors 1 12
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
@@ -49,7 +49,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
@@ -77,7 +76,7 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
@@ -90,7 +89,6 @@ RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -108,7 +106,7 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
@@ -121,7 +119,6 @@ RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
@@ -151,7 +148,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 1.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -181,7 +177,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -211,7 +206,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -241,7 +235,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -271,7 +264,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -301,7 +293,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 2.0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -405,7 +396,6 @@ RenderAvatarVP 0 0
RenderObjectBump 0 0
RenderMaxPartCount 1 1024
RenderTerrainDetail 1 0
-RenderUseImpostors 0 0
RenderVBOEnable 1 0
RenderReflectionDetail 0 0
WindLightUseAtmosShaders 0 0
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 628a96e988..c975678cea 100755
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -4,7 +4,7 @@ version 37
// resetting the graphics preferences of all users to the recommended
// defaults. This should be as rare an event as we can manage.
-// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
+// NOTE: This is mostly identical to featuretable.txt with a few differences
// Should be combined into one table
//
@@ -31,7 +31,8 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
RenderAvatarPhysicsLODFactor 1 1.0
-RenderAvatarMaxVisible 1 12
+RenderAvatarMaxNonImpostors 1 12
+RenderAvatarMaxComplexity 1 60000
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
@@ -49,7 +50,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
@@ -66,7 +66,6 @@ RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
@@ -79,7 +78,8 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 12
+RenderAvatarMaxComplexity 1 30000
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
@@ -92,7 +92,6 @@ RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
@@ -110,7 +109,8 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 12
+RenderAvatarMaxComplexity 1 30000
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
@@ -123,7 +123,6 @@ RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -153,7 +152,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 1.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -183,7 +181,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -213,7 +210,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -243,7 +239,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -273,7 +268,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -304,7 +298,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 2.0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -319,6 +312,9 @@ RenderFSAASamples 1 2
//
list Unknown
RenderVBOEnable 1 0
+RenderShadowDetail 1 0
+RenderDeferred 1 0
+RenderDeferredSSAO 1 0
//
// Class 0 Hardware (just old)
@@ -343,6 +339,7 @@ RenderVBOEnable 1 1
//
list Class3
RenderVBOEnable 1 1
+
//
// Class 4 Hardware
//
@@ -394,11 +391,12 @@ list safe
RenderAnisotropic 1 0
RenderAvatarCloth 0 0
RenderAvatarVP 0 0
-RenderLocalLights 1 0
+RenderAvatarMaxNonImpostors 1 16
+RenderAvatarMaxComplexity 1 60000
RenderObjectBump 0 0
+RenderLocalLights 1 0
RenderMaxPartCount 1 1024
RenderTerrainDetail 1 0
-RenderUseImpostors 0 0
RenderVBOEnable 1 0
RenderReflectionDetail 0 0
WindLightUseAtmosShaders 0 0
@@ -523,7 +521,6 @@ Disregard96DefaultDrawDistance 1 0
list NVIDIA_GeForce_8600
RenderTextureMemoryMultiple 1 1
-RenderUseImpostors 0 0
UseOcclusion 0 0
/// tweaked ATI to 96 Draw distance
diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt
index e7cae1abdc..f6f0a9cb17 100755
--- a/indra/newview/featuretable_solaris.txt
+++ b/indra/newview/featuretable_solaris.txt
@@ -129,7 +129,7 @@ RenderUseFBO 1 0
list low
RenderVBO 1 0
RenderAniso 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 3
RenderLighting 1 0
list medium
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index 68e09d010e..053dfb64d4 100755
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -31,7 +31,7 @@ RenderAnisotropic 1 1
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
RenderAvatarPhysicsLODFactor 1 1.0
-RenderAvatarMaxVisible 1 12
+RenderAvatarMaxNonImpostors 1 12
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
@@ -49,7 +49,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
@@ -79,7 +78,7 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
@@ -92,7 +91,6 @@ RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
@@ -110,7 +108,7 @@ RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
-RenderAvatarMaxVisible 1 3
+RenderAvatarMaxNonImpostors 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
@@ -123,7 +121,6 @@ RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -153,7 +150,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 1.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
@@ -183,7 +179,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -213,7 +208,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -243,7 +237,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -273,7 +266,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 0.5
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -303,7 +295,6 @@ RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
-RenderUseImpostors 1 1
RenderVolumeLODFactor 1 2.0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -404,7 +395,6 @@ RenderAvatarVP 0 0
RenderObjectBump 0 0
RenderMaxPartCount 1 1024
RenderTerrainDetail 1 0
-RenderUseImpostors 0 0
RenderVBOEnable 1 0
RenderReflectionDetail 0 0
WindLightUseAtmosShaders 0 0
@@ -454,37 +444,30 @@ UseOcclusion 0 0
list Intel_830M
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_845G
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_855GM
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_865G
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_900
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_915GM
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_915G
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 0 0
list Intel_945GM
RenderTerrainDetail 1 0
@@ -501,7 +484,6 @@ RenderVBOEnable 1 0
list Intel_965
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-RenderUseImpostors 1 0
UseOcclusion 0 0
list Intel_G33
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4bf719ec31..27e8b83e13 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -588,7 +588,7 @@ static void settings_to_globals()
LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor");
LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor");
LLVOAvatar::sPhysicsLODFactor = gSavedSettings.getF32("RenderAvatarPhysicsLODFactor");
- LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
+ LLVOAvatar::updateImpostorRendering(gSavedSettings.getU32("RenderAvatarMaxNonImpostors"));
LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible");
// clamp auto-open time to some minimum usable value
LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay"));
@@ -610,7 +610,6 @@ static void settings_modify()
LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred");
LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
LLPipeline::sRenderDeferred = LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
- LLVOAvatar::sUseImpostors = gSavedSettings.getBOOL("RenderUseImpostors");
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
@@ -5095,7 +5094,7 @@ void LLAppViewer::idle()
}
// Update AV render info
- LLAvatarRenderInfoAccountant::idle();
+ LLAvatarRenderInfoAccountant::getInstance()->idle();
{
LL_RECORD_BLOCK_TIME(FTM_AUDIO_UPDATE);
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 38e153137c..44e19b1449 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -28,14 +28,16 @@
// Precompiled header
#include "llviewerprecompiledheaders.h"
-// associated header
-#include "llavatarrenderinfoaccountant.h"
// STL headers
// std headers
// external library headers
// other Linden headers
#include "llcharacter.h"
-#include "llhttpclient.h"
+#include "httprequest.h"
+#include "httphandler.h"
+#include "httpresponse.h"
+#include "llcorehttputil.h"
+#include "llappcorehttp.h"
#include "lltimer.h"
#include "llviewercontrol.h"
#include "llviewermenu.h"
@@ -43,233 +45,273 @@
#include "llviewerregion.h"
#include "llvoavatar.h"
#include "llworld.h"
+// associated header
+#include "llavatarrenderinfoaccountant.h"
static const std::string KEY_AGENTS = "agents"; // map
static const std::string KEY_WEIGHT = "weight"; // integer
+static const std::string KEY_MUTED = "muted"; // bool
static const std::string KEY_IDENTIFIER = "identifier";
static const std::string KEY_MESSAGE = "message";
static const std::string KEY_ERROR = "error";
-// Send data updates about once per minute, only need per-frame resolution
-LLFrameTimer LLAvatarRenderInfoAccountant::sRenderInfoReportTimer;
+static const F32 SECS_BETWEEN_REGION_SCANS = 5.f; // Scan the region list every 5 seconds
+static const F32 SECS_BETWEEN_REGION_REQUEST = 15.0; // Look for new avs every 15 seconds
+static const F32 SECS_BETWEEN_REGION_REPORTS = 60.0; // Update each region every 60 seconds
+
+
+// The policy class for HTTP traffic; this is the right value for all capability requests.
+static LLCore::HttpRequest::policy_t http_policy(LLAppCoreHttp::AP_REPORTING);
+
+// Priority for HTTP requests. Use 0U.
+static LLCore::HttpRequest::priority_t http_priority(0U);
+LLAvatarRenderInfoAccountant::LLAvatarRenderInfoAccountant()
+ : mHttpRequest(new LLCore::HttpRequest)
+ , mHttpHeaders(new LLCore::HttpHeaders)
+ , mHttpOptions(new LLCore::HttpOptions)
+{
+ mHttpOptions->setTransferTimeout(SECS_BETWEEN_REGION_SCANS);
+
+ mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
+ mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML);
+}
+
+LLAvatarRenderInfoAccountant::~LLAvatarRenderInfoAccountant()
+{
+ mHttpOptions->release();
+ mHttpHeaders->release();
+ // delete mHttpRequest; ???
+}
// HTTP responder class for GET request for avatar render weight information
-class LLAvatarRenderInfoGetResponder : public LLHTTPClient::Responder
+class LLAvatarRenderInfoGetHandler : public LLCore::HttpHandler
{
+private:
+ LOG_CLASS(LLAvatarRenderInfoGetHandler);
+
public:
- LLAvatarRenderInfoGetResponder(U64 region_handle) : mRegionHandle(region_handle)
- {
- }
-
- virtual void error(U32 statusNum, const std::string& reason)
+ LLAvatarRenderInfoGetHandler() : LLCore::HttpHandler()
{
- LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
- if (regionp)
- {
- LL_WARNS() << "HTTP error result for avatar weight GET: " << statusNum
- << ", " << reason
- << " returned by region " << regionp->getName()
- << LL_ENDL;
- }
- else
- {
- LL_WARNS() << "Avatar render weight GET error recieved but region not found for "
- << mRegionHandle
- << ", error " << statusNum
- << ", " << reason
- << LL_ENDL;
- }
-
}
- virtual void result(const LLSD& content)
- {
- LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
- if (regionp)
+ void onCompleted(LLCore::HttpHandle handle,
+ LLCore::HttpResponse* response)
{
- if (LLAvatarRenderInfoAccountant::logRenderInfo())
- {
- LL_INFOS() << "LRI: Result for avatar weights request for region " << regionp->getName() << ":" << LL_ENDL;
- }
-
- if (content.isMap())
- {
- if (content.has(KEY_AGENTS))
+ LLCore::HttpStatus status = response->getStatus();
+ if (status)
+ {
+ LLSD avatar_render_info;
+ if (LLCoreHttpUtil::responseToLLSD(response, false /* quiet logging */,
+ avatar_render_info))
{
- const LLSD & agents = content[KEY_AGENTS];
- if (agents.isMap())
+ if (avatar_render_info.isMap())
{
- LLSD::map_const_iterator report_iter = agents.beginMap();
- while (report_iter != agents.endMap())
+ if (avatar_render_info.has(KEY_AGENTS))
{
- LLUUID target_agent_id = LLUUID(report_iter->first);
- const LLSD & agent_info_map = report_iter->second;
- LLViewerObject* avatarp = gObjectList.findObject(target_agent_id);
- if (avatarp &&
- avatarp->isAvatar() &&
- agent_info_map.isMap())
- { // Extract the data for this avatar
-
- if (LLAvatarRenderInfoAccountant::logRenderInfo())
- {
- LL_INFOS() << "LRI: Agent " << target_agent_id
- << ": " << agent_info_map << LL_ENDL;
- }
-
- if (agent_info_map.has(KEY_WEIGHT))
+ const LLSD & agents = avatar_render_info[KEY_AGENTS];
+ if (agents.isMap())
+ {
+ for (LLSD::map_const_iterator agent_iter = agents.beginMap();
+ agent_iter != agents.endMap();
+ agent_iter++
+ )
{
- ((LLVOAvatar *) avatarp)->setReportedVisualComplexity(agent_info_map[KEY_WEIGHT].asInteger());
- }
+ LLUUID target_agent_id = LLUUID(agent_iter->first);
+ LLViewerObject* avatarp = gObjectList.findObject(target_agent_id);
+ if (avatarp && avatarp->isAvatar())
+ {
+ const LLSD & agent_info_map = agent_iter->second;
+ if (agent_info_map.isMap())
+ {
+ LL_DEBUGS("AvatarRenderInfo") << " Agent " << target_agent_id
+ << ": " << agent_info_map << LL_ENDL;
+
+ if (agent_info_map.has(KEY_WEIGHT))
+ {
+ ((LLVOAvatar *) avatarp)->setReportedVisualComplexity(agent_info_map[KEY_WEIGHT].asInteger());
+ }
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "agent entry invalid"
+ << " agent " << target_agent_id
+ << " map " << agent_info_map
+ << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_DEBUGS("AvatarRenderInfo") << "Unknown agent " << target_agent_id << LL_ENDL;
+ }
+ } // for agent_iter
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "malformed get response agents avatar_render_info is not map" << LL_ENDL;
}
- report_iter++;
+ } // has "agents"
+ else if (avatar_render_info.has(KEY_ERROR))
+ {
+ const LLSD & error = avatar_render_info[KEY_ERROR];
+ LL_WARNS("AvatarRenderInfo") << "Avatar render info GET error: "
+ << error[KEY_IDENTIFIER]
+ << ": " << error[KEY_MESSAGE]
+ << LL_ENDL;
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "no agent key in get response" << LL_ENDL;
}
}
- } // has "agents"
- else if (content.has(KEY_ERROR))
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "malformed get response is not map" << LL_ENDL;
+ }
+ }
+ else
{
- const LLSD & error = content[KEY_ERROR];
- LL_WARNS() << "Avatar render info GET error: "
- << error[KEY_IDENTIFIER]
- << ": " << error[KEY_MESSAGE]
- << " from region " << regionp->getName()
- << LL_ENDL;
+ LL_WARNS("AvatarRenderInfo") << "malformed get response parse failure" << LL_ENDL;
}
- }
+ }
+ else
+ {
+ // Something went wrong. Translate the status to
+ // a meaningful message.
+ LL_WARNS("AvatarRenderInfo") << "GET failed Status: "
+ << status.toTerseString()
+ << ", Reason: " << status.toString()
+ << LL_ENDL;
+ }
+
+ delete this; // release the handler object
}
- else
- {
- LL_INFOS() << "Avatar render weight info recieved but region not found for "
- << mRegionHandle << LL_ENDL;
- }
- }
-
-private:
- U64 mRegionHandle;
};
// HTTP responder class for POST request for avatar render weight information
-class LLAvatarRenderInfoPostResponder : public LLHTTPClient::Responder
+class LLAvatarRenderInfoPostHandler : public LLCore::HttpHandler
{
-public:
- LLAvatarRenderInfoPostResponder(U64 region_handle) : mRegionHandle(region_handle)
- {
- }
+ private:
+ LOG_CLASS(LLAvatarRenderInfoPostHandler);
- virtual void error(U32 statusNum, const std::string& reason)
+ public:
+ LLAvatarRenderInfoPostHandler() : LLCore::HttpHandler()
{
- LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
- if (regionp)
- {
- LL_WARNS() << "HTTP error result for avatar weight POST: " << statusNum
- << ", " << reason
- << " returned by region " << regionp->getName()
- << LL_ENDL;
- }
- else
- {
- LL_WARNS() << "Avatar render weight POST error recieved but region not found for "
- << mRegionHandle
- << ", error " << statusNum
- << ", " << reason
- << LL_ENDL;
- }
}
- virtual void result(const LLSD& content)
- {
- LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
- if (regionp)
+ void onCompleted(LLCore::HttpHandle handle,
+ LLCore::HttpResponse* response)
{
- if (LLAvatarRenderInfoAccountant::logRenderInfo())
+ LLCore::HttpStatus status = response->getStatus();
+ if (status)
{
- LL_INFOS() << "LRI: Result for avatar weights POST for region " << regionp->getName()
- << ": " << content << LL_ENDL;
+ LL_DEBUGS("AvatarRenderInfo") << "post succeeded" << LL_ENDL;
}
-
- if (content.isMap())
+ else
{
- if (content.has(KEY_ERROR))
- {
- const LLSD & error = content[KEY_ERROR];
- LL_WARNS() << "Avatar render info POST error: "
- << error[KEY_IDENTIFIER]
- << ": " << error[KEY_MESSAGE]
- << " from region " << regionp->getName()
- << LL_ENDL;
- }
- }
- }
- else
- {
- LL_INFOS() << "Avatar render weight POST result recieved but region not found for "
- << mRegionHandle << LL_ENDL;
+ // Something went wrong. Translate the status to
+ // a meaningful message.
+ LL_WARNS("AvatarRenderInfo") << "POST failed Status: "
+ << status.toTerseString()
+ << ", Reason: " << status.toString()
+ << LL_ENDL;
+ }
+
+ delete this; // release the handler object
}
- }
-
-private:
- U64 mRegionHandle;
};
-// static
// Send request for one region, no timer checks
+// called when the
void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regionp)
{
- std::string url = regionp->getCapability("AvatarRenderInfo");
- if (!url.empty())
+ if ( regionp->getRenderInfoReportTimer().hasExpired() ) // Time to make request
{
- if (logRenderInfo())
+ U32 num_avs = 0;
+
+ std::string url = regionp->getCapability("AvatarRenderInfo");
+ if (!url.empty())
{
- LL_INFOS() << "LRI: Sending avatar render info to region "
- << regionp->getName()
- << " from " << url
- << LL_ENDL;
- }
-
- // Build the render info to POST to the region
- LLSD report = LLSD::emptyMap();
- LLSD agents = LLSD::emptyMap();
+ // Build the render info to POST to the region
+ LLSD agents = LLSD::emptyMap();
- std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- while( iter != LLCharacter::sInstances.end() )
- {
- LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);
- if (avatar &&
- avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded)
- !avatar->isDead() && // Not dead yet
- avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region
+ std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
+ while( iter != LLCharacter::sInstances.end() )
{
- avatar->calculateUpdateRenderCost(); // Make sure the numbers are up-to-date
-
- LLSD info = LLSD::emptyMap();
- if (avatar->getVisualComplexity() > 0)
+ LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);
+ if (avatar &&
+ avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded)
+ !avatar->isDead() && // Not dead yet
+ avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region
{
- info[KEY_WEIGHT] = avatar->getVisualComplexity();
- agents[avatar->getID().asString()] = info;
+ avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date
- if (logRenderInfo())
+ LLSD info = LLSD::emptyMap();
+ if (avatar->getVisualComplexity() > 0)
{
- LL_INFOS() << "LRI: Sending avatar render info for " << avatar->getID()
- << ": " << info << LL_ENDL;
- LL_INFOS() << "LRI: other info geometry " << avatar->getAttachmentGeometryBytes()
- << ", area " << avatar->getAttachmentSurfaceArea()
- << LL_ENDL;
+ info[KEY_WEIGHT] = avatar->getVisualComplexity();
+ info[KEY_MUTED] = avatar->isVisuallyMuted();
+ agents[avatar->getID().asString()] = info;
+
+ LL_DEBUGS("AvatarRenderInfo") << "Sending avatar render info for " << avatar->getID()
+ << ": " << info << LL_ENDL;
+ num_avs++;
}
}
+ iter++;
}
- iter++;
- }
- report[KEY_AGENTS] = agents;
- if (agents.size() > 0)
+ if (num_avs > 0)
+ {
+ LLSD report = LLSD::emptyMap();
+ report[KEY_AGENTS] = agents;
+
+ LLCore::HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID);
+ LLAvatarRenderInfoPostHandler* handler = new LLAvatarRenderInfoPostHandler;
+
+ handle = LLCoreHttpUtil::requestPostWithLLSD(mHttpRequest,
+ http_policy,
+ http_priority,
+ url,
+ report,
+ mHttpOptions,
+ mHttpHeaders,
+ handler);
+ if (LLCORE_HTTP_HANDLE_INVALID == handle)
+ {
+ LLCore::HttpStatus status(mHttpRequest->getStatus());
+ LL_WARNS("AvatarRenderInfo") << "HTTP POST request failed"
+ << " Status: " << status.toTerseString()
+ << " Reason: '" << status.toString() << "'"
+ << LL_ENDL;
+ delete handler;
+ }
+ else
+ {
+ LL_INFOS("AvatarRenderInfo") << "Sent render costs for " << num_avs
+ << " avatars to region " << regionp->getName()
+ << LL_ENDL;
+
+
+ }
+ }
+ else
+ {
+ LL_DEBUGS("AvatarRenderInfo") << "no agent info to send" << LL_ENDL;
+ }
+ }
+ else
{
- LLHTTPClient::post(url, report, new LLAvatarRenderInfoPostResponder(regionp->getHandle()));
+ LL_WARNS("AvatarRenderInfo") << "AvatarRenderInfo cap is empty" << LL_ENDL;
}
+
+ // Reset this regions timer, moving to longer intervals if there are lots of avatars around
+ regionp->getRenderInfoReportTimer().resetWithExpiry(SECS_BETWEEN_REGION_REPORTS + (2.f * num_avs));
}
}
@@ -280,19 +322,39 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
// Send request for one region, no timer checks
void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regionp)
{
- std::string url = regionp->getCapability("AvatarRenderInfo");
- if (!url.empty())
+ if (regionp->getRenderInfoRequestTimer().hasExpired())
{
- if (logRenderInfo())
+ std::string url = regionp->getCapability("AvatarRenderInfo");
+ if (!url.empty())
{
- LL_INFOS() << "LRI: Requesting avatar render info for region "
- << regionp->getName()
- << " from " << url
- << LL_ENDL;
+
+ LLAvatarRenderInfoGetHandler* handler = new LLAvatarRenderInfoGetHandler;
+ // First send a request to get the latest data
+ LLCore::HttpHandle handle = mHttpRequest->requestGet(http_policy,
+ http_priority,
+ url,
+ NULL,
+ NULL,
+ handler);
+ if (LLCORE_HTTP_HANDLE_INVALID != handle)
+ {
+ LL_INFOS("AvatarRenderInfo") << "Requested avatar render info for region "
+ << regionp->getName()
+ << LL_ENDL;
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "Failed to launch HTTP GET request. Try again."
+ << LL_ENDL;
+ delete handler;
+ }
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "no AvatarRenderInfo cap for " << regionp->getName() << LL_ENDL;
}
- // First send a request to get the latest data
- LLHTTPClient::get(url, new LLAvatarRenderInfoGetResponder(regionp->getHandle()));
+ regionp->getRenderInfoRequestTimer().resetWithExpiry(SECS_BETWEEN_REGION_REQUEST);
}
}
@@ -301,98 +363,60 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
// Called every frame - send render weight requests to every region
void LLAvatarRenderInfoAccountant::idle()
{
- if (sRenderInfoReportTimer.hasExpired())
- {
- const F32 SECS_BETWEEN_REGION_SCANS = 5.f; // Scan the region list every 5 seconds
- const F32 SECS_BETWEEN_REGION_REQUEST = 60.0; // Update each region every 60 seconds
+ mHttpRequest->update(0); // give any pending http operations a chance to call completion methods
- S32 num_avs = LLCharacter::sInstances.size();
-
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Scanning all regions and checking for render info updates"
- << LL_ENDL;
- }
+ if (mRenderInfoScanTimer.hasExpired())
+ {
+ LL_DEBUGS("AvatarRenderInfo") << "Scanning regions for render info updates"
+ << LL_ENDL;
- // Check all regions and see if it's time to fetch/send data
+ // Check all regions
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
- iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ iter != LLWorld::getInstance()->getRegionList().end();
+ ++iter)
{
LLViewerRegion* regionp = *iter;
- if (regionp &&
- regionp->isAlive() &&
- regionp->capabilitiesReceived() && // Region has capability URLs available
- regionp->getRenderInfoRequestTimer().hasExpired()) // Time to make request
+ if ( regionp
+ && regionp->isAlive()
+ && regionp->capabilitiesReceived())
{
+ // each of these is further governed by and resets its own timer
sendRenderInfoToRegion(regionp);
getRenderInfoFromRegion(regionp);
-
- // Reset this regions timer, moving to longer intervals if there are lots of avatars around
- regionp->getRenderInfoRequestTimer().resetWithExpiry(SECS_BETWEEN_REGION_REQUEST + (2.f * num_avs));
}
}
// We scanned all the regions, reset the request timer.
- sRenderInfoReportTimer.resetWithExpiry(SECS_BETWEEN_REGION_SCANS);
- }
-
- static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions", 0);
- static U32 prev_render_auto_mute_functions = (U32) -1;
- if (prev_render_auto_mute_functions != render_auto_mute_functions)
- {
- prev_render_auto_mute_functions = render_auto_mute_functions;
-
- // Adjust menus
- BOOL show_items = (BOOL)(render_auto_mute_functions & 0x04);
- gMenuAvatarOther->setItemVisible( std::string("Normal"), show_items);
- gMenuAvatarOther->setItemVisible( std::string("Always use impostor"), show_items);
- gMenuAvatarOther->setItemVisible( std::string("Never use impostor"), show_items);
- gMenuAvatarOther->setItemVisible( std::string("Impostor seperator"), show_items);
-
- gMenuAttachmentOther->setItemVisible( std::string("Normal"), show_items);
- gMenuAttachmentOther->setItemVisible( std::string("Always use impostor"), show_items);
- gMenuAttachmentOther->setItemVisible( std::string("Never use impostor"), show_items);
- gMenuAttachmentOther->setItemVisible( std::string("Impostor seperator"), show_items);
-
- if (!show_items)
- { // Turning off visual muting
- for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- iter != LLCharacter::sInstances.end(); ++iter)
- { // Make sure all AVs have the setting cleared
- LLVOAvatar* inst = (LLVOAvatar*) *iter;
- inst->setCachedVisualMute(false);
- }
- }
+ mRenderInfoScanTimer.resetWithExpiry(SECS_BETWEEN_REGION_SCANS);
}
}
+void LLAvatarRenderInfoAccountant::resetRenderInfoScanTimer()
+{
+ // this will force the next frame to rescan
+ mRenderInfoScanTimer.reset();
+}
// static
-// Make sRenderInfoReportTimer expire so the next call to idle() will scan and query a new region
-// called via LLViewerRegion::setCapabilitiesReceived() boost signals when the capabilities
+// Called via LLViewerRegion::setCapabilitiesReceived() boost signals when the capabilities
// are returned for a new LLViewerRegion, and is the earliest time to get render info
-void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& region_id)
+void LLAvatarRenderInfoAccountant::scanNewRegion(const LLUUID& region_id)
{
- if (logRenderInfo())
- {
- LL_INFOS() << "LRI: Viewer has new region capabilities, clearing global render info timer"
- << " and timer for region " << region_id
- << LL_ENDL;
- }
+ LL_INFOS("AvatarRenderInfo") << region_id << LL_ENDL;
- // Reset the global timer so it will scan regions immediately
- sRenderInfoReportTimer.reset();
+ // Reset the global timer so it will scan regions on the next call to ::idle
+ LLAvatarRenderInfoAccountant::getInstance()->resetRenderInfoScanTimer();
LLViewerRegion* regionp = LLWorld::instance().getRegionFromID(region_id);
if (regionp)
- { // Reset the region's timer so it will request data immediately
+ { // Reset the region's timers so we will:
+ // * request render info from it immediately
+ // * report on the following scan
regionp->getRenderInfoRequestTimer().reset();
+ regionp->getRenderInfoReportTimer().resetWithExpiry(SECS_BETWEEN_REGION_SCANS);
+ }
+ else
+ {
+ LL_WARNS("AvatarRenderInfo") << "unable to resolve region "<<region_id<<LL_ENDL;
}
-}
-
-// static
-bool LLAvatarRenderInfoAccountant::logRenderInfo()
-{
- static LLCachedControl<bool> render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging", false);
- return render_mute_logging_enabled;
}
diff --git a/indra/newview/llavatarrenderinfoaccountant.h b/indra/newview/llavatarrenderinfoaccountant.h
index d68f2dccfb..8117c18f4d 100644
--- a/indra/newview/llavatarrenderinfoaccountant.h
+++ b/indra/newview/llavatarrenderinfoaccountant.h
@@ -33,24 +33,33 @@ class LLViewerRegion;
// Class to gather avatar rendering information
// that is sent to or fetched from regions.
-class LLAvatarRenderInfoAccountant
+class LLAvatarRenderInfoAccountant : public LLSingleton<LLAvatarRenderInfoAccountant>
{
-public:
- LLAvatarRenderInfoAccountant() {};
- ~LLAvatarRenderInfoAccountant() {};
+ private:
+ LOG_CLASS(LLAvatarRenderInfoAccountant);
- static void sendRenderInfoToRegion(LLViewerRegion * regionp);
- static void getRenderInfoFromRegion(LLViewerRegion * regionp);
+ public:
+ LLAvatarRenderInfoAccountant();
+ ~LLAvatarRenderInfoAccountant();
- static void expireRenderInfoReportTimer(const LLUUID& region_id);
+ void sendRenderInfoToRegion(LLViewerRegion * regionp);
+ void getRenderInfoFromRegion(LLViewerRegion * regionp);
- static void idle();
+ void idle(); // called once per frame
- static bool logRenderInfo();
+ void resetRenderInfoScanTimer();
+
+ static void scanNewRegion(const LLUUID& region_id);
-private:
- // Send data updates about once per minute, only need per-frame resolution
- static LLFrameTimer sRenderInfoReportTimer;
+ private:
+ // frequency of region scans,
+ // further limited by per region Request and Report timers
+ LLFrameTimer mRenderInfoScanTimer;
+
+ //
+ LLCore::HttpRequest* mHttpRequest;
+ LLCore::HttpHeaders* mHttpHeaders;
+ LLCore::HttpOptions* mHttpOptions;
};
#endif /* ! defined(LL_llavatarrenderinfoaccountant_H) */
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index e1d3d1a905..e58c2c1037 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1281,13 +1281,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- llassert(LLPipeline::sImpostorRender || !avatarp->isVisuallyMuted());
-
- /*if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview, 3=morph view
- {
- gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f));
- }*/
-
if (pass == 1)
{
// render rigid meshes (eyeballs) first
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 32b510b21a..a85016dcb7 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -330,17 +330,17 @@ void LLFace::dirtyTexture()
{
vobj->mLODChanged = TRUE;
- LLVOAvatar* avatar = vobj->getAvatar();
- if (avatar)
- { //avatar render cost may have changed
- avatar->updateVisualComplexity();
- }
+ LLVOAvatar* avatar = vobj->getAvatar();
+ if (avatar)
+ { //avatar render cost may have changed
+ avatar->updateVisualComplexity();
+ }
}
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE);
}
}
}
-
+
gPipeline.markTextured(drawablep);
}
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index af84aea6a6..5c8926e54c 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -606,7 +606,7 @@ void LLFeatureManager::applyRecommendedSettings()
// cap the level at 2 (high)
U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
- LL_INFOS() << "Applying Recommended Features" << LL_ENDL;
+ LL_INFOS("RenderInit") << "Applying Recommended Features for level " << level << LL_ENDL;
setGraphicsLevel(level, false);
gSavedSettings.setU32("RenderQualityPerformance", level);
@@ -813,7 +813,7 @@ void LLFeatureManager::applyBaseMasks()
if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7)
{
maskFeatures("OSX_10_6_8");
- }
+ }
#endif
// now mask by gpu string
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
new file mode 100644
index 0000000000..7dedbbf984
--- /dev/null
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -0,0 +1,101 @@
+/**
+ * @file llfloaterdeleteprefpreset.cpp
+ * @brief Floater to delete a graphics / camera preset
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterdeleteprefpreset.h"
+
+#include "llbutton.h"
+#include "llcombobox.h"
+#include "llfloaterpreference.h"
+#include "llnotificationsutil.h"
+#include "llpresetsmanager.h"
+#include "llviewercontrol.h"
+#include "llfloaterreg.h"
+
+LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key)
+: LLFloater(key)
+{
+}
+
+// virtual
+BOOL LLFloaterDeletePrefPreset::postBuild()
+{
+ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (preferences)
+ {
+ preferences->addDependentFloater(this);
+ }
+ getChild<LLButton>("delete")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnDelete, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this));
+ LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this));
+
+ return TRUE;
+}
+
+void LLFloaterDeletePrefPreset::onOpen(const LLSD& key)
+{
+ mSubdirectory = key.asString();
+ std::string floater_title = getString(std::string("title_") + mSubdirectory);
+
+ setTitle(floater_title);
+
+ LLComboBox* combo = getChild<LLComboBox>("preset_combo");
+
+ EDefaultOptions option = DEFAULT_HIDE;
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
+}
+
+void LLFloaterDeletePrefPreset::onBtnDelete()
+{
+ LLComboBox* combo = getChild<LLComboBox>("preset_combo");
+ std::string name = combo->getSimple();
+
+ if (!LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name))
+ {
+ LLSD args;
+ args["NAME"] = name;
+ LLNotificationsUtil::add("PresetNotDeleted", args);
+ }
+
+ closeFloater();
+}
+
+void LLFloaterDeletePrefPreset::onPresetsListChange()
+{
+ LLComboBox* combo = getChild<LLComboBox>("preset_combo");
+ LLButton* delete_btn = getChild<LLButton>("delete");
+
+ EDefaultOptions option = DEFAULT_HIDE;
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
+
+ delete_btn->setEnabled(0 != combo->getItemCount());
+}
+
+void LLFloaterDeletePrefPreset::onBtnCancel()
+{
+ closeFloater();
+}
diff --git a/indra/newview/llfloaterdeleteprefpreset.h b/indra/newview/llfloaterdeleteprefpreset.h
new file mode 100644
index 0000000000..0ab3da7139
--- /dev/null
+++ b/indra/newview/llfloaterdeleteprefpreset.h
@@ -0,0 +1,53 @@
+/**
+ * @file llfloaterdeleteprefpreset.h
+ * @brief Floater to delete a graphics / camera preset
+
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERDELETEPREFPRESET_H
+#define LL_LLFLOATERDELETEPREFPRESET_H
+
+#include "llfloater.h"
+
+class LLComboBox;
+
+class LLFloaterDeletePrefPreset : public LLFloater
+{
+
+public:
+ LLFloaterDeletePrefPreset(const LLSD &key);
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ void onBtnDelete();
+ void onBtnCancel();
+
+private:
+ void onPresetsListChange();
+
+ std::string mSubdirectory;
+};
+
+#endif // LL_LLFLOATERDELETEPREFPRESET_H
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
deleted file mode 100755
index 035eb307c2..0000000000
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * @file llfloaterhardwaresettings.cpp
- * @brief Menu of all the different graphics hardware settings
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterhardwaresettings.h"
-
-// Viewer includes
-#include "llfloaterpreference.h"
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
-#include "llviewertexturelist.h"
-#include "llfeaturemanager.h"
-#include "llspinctrl.h"
-#include "llstartup.h"
-#include "lltextbox.h"
-#include "llcombobox.h"
-#include "pipeline.h"
-
-// Linden library includes
-#include "llradiogroup.h"
-#include "lluictrlfactory.h"
-#include "llwindow.h"
-#include "llsliderctrl.h"
-
-LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key)
- : LLFloater(key),
-
- // these should be set on imminent refresh() call,
- // but init them anyway
- mUseVBO(0),
- mUseAniso(0),
- mFSAASamples(0),
- mGamma(0.0),
- mVideoCardMem(0),
- mFogRatio(0.0),
- mProbeHardwareOnStartup(FALSE)
-{
-}
-
-LLFloaterHardwareSettings::~LLFloaterHardwareSettings()
-{
-}
-
-void LLFloaterHardwareSettings::initCallbacks(void)
-{
-}
-
-// menu maintenance functions
-
-void LLFloaterHardwareSettings::refresh()
-{
- LLPanel::refresh();
-
- mUseVBO = gSavedSettings.getBOOL("RenderVBOEnable");
- mUseAniso = gSavedSettings.getBOOL("RenderAnisotropic");
- mFSAASamples = gSavedSettings.getU32("RenderFSAASamples");
- mGamma = gSavedSettings.getF32("RenderGamma");
- mVideoCardMem = gSavedSettings.getS32("TextureMemory");
- mFogRatio = gSavedSettings.getF32("RenderFogRatio");
- mProbeHardwareOnStartup = gSavedSettings.getBOOL("ProbeHardwareOnStartup");
-
- getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) mFSAASamples);
- refreshEnabledState();
-}
-
-void LLFloaterHardwareSettings::refreshEnabledState()
-{
- F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
- S32Megabytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
- S32Megabytes max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
- getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem.value());
- getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem.value());
-
- if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
- !gGLManager.mHasVertexBufferObject)
- {
- getChildView("vbo")->setEnabled(FALSE);
- }
-
- if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures") ||
- !gGLManager.mHasVertexBufferObject)
- {
- getChildView("texture compression")->setEnabled(FALSE);
- }
-
- // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
- LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma");
- gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
- getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders());
- getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders());
-
- // anti-aliasing
- {
- LLUICtrl* fsaa_ctrl = getChild<LLUICtrl>("fsaa");
- LLTextBox* fsaa_text = getChild<LLTextBox>("antialiasing label");
- LLView* fsaa_restart = getChildView("antialiasing restart");
-
- // Enable or disable the control, the "Antialiasing:" label and the restart warning
- // based on code support for the feature on the current hardware.
-
- if (gPipeline.canUseAntiAliasing())
- {
- fsaa_ctrl->setEnabled(TRUE);
-
- // borrow the text color from the gamma control for consistency
- fsaa_text->setColor(gamma_ctrl->getEnabledTextColor());
-
- fsaa_restart->setVisible(!gSavedSettings.getBOOL("RenderDeferred"));
- }
- else
- {
- fsaa_ctrl->setEnabled(FALSE);
- fsaa_ctrl->setValue((LLSD::Integer) 0);
-
- // borrow the text color from the gamma control for consistency
- fsaa_text->setColor(gamma_ctrl->getDisabledTextColor());
-
- fsaa_restart->setVisible(FALSE);
- }
- }
-}
-
-//============================================================================
-
-BOOL LLFloaterHardwareSettings::postBuild()
-{
- childSetAction("OK", onBtnOK, this);
-
-// Don't do this on Mac as their braindead GL versioning
-// sets this when 8x and 16x are indeed available
-//
-#if !LL_DARWIN
- if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
- { //remove FSAA settings above "4x"
- LLComboBox* combo = getChild<LLComboBox>("fsaa");
- combo->remove("8x");
- combo->remove("16x");
- }
-#endif
-
- refresh();
- center();
-
- // load it up
- initCallbacks();
- return TRUE;
-}
-
-
-void LLFloaterHardwareSettings::apply()
-{
- refresh();
-}
-
-
-void LLFloaterHardwareSettings::cancel()
-{
- gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO);
- gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso);
- gSavedSettings.setU32("RenderFSAASamples", mFSAASamples);
- gSavedSettings.setF32("RenderGamma", mGamma);
- gSavedSettings.setS32("TextureMemory", mVideoCardMem);
- gSavedSettings.setF32("RenderFogRatio", mFogRatio);
- gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup );
-
- closeFloater();
-}
-
-// static
-void LLFloaterHardwareSettings::onBtnOK( void* userdata )
-{
- LLFloaterHardwareSettings *fp =(LLFloaterHardwareSettings *)userdata;
- fp->apply();
- fp->closeFloater(false);
-}
-
-
diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h
deleted file mode 100755
index 626771b1d2..0000000000
--- a/indra/newview/llfloaterhardwaresettings.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * @file llfloaterhardwaresettings.h
- * @brief Menu of all the different graphics hardware settings
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATER_HARDWARE_SETTINGS_H
-#define LL_LLFLOATER_HARDWARE_SETTINGS_H
-
-#include "llfloater.h"
-
-/// Menuing system for all of windlight's functionality
-class LLFloaterHardwareSettings : public LLFloater
-{
- friend class LLFloaterPreference;
-
-public:
-
- LLFloaterHardwareSettings(const LLSD& key);
- /*virtual*/ ~LLFloaterHardwareSettings();
-
- /*virtual*/ BOOL postBuild();
-
- /// initialize all the callbacks for the menu
- void initCallbacks(void);
-
- /// OK button
- static void onBtnOK( void* userdata );
-
- //// menu management
-
- /// show off our menu
- static void show();
-
- /// return if the menu exists or not
- static bool isOpen();
-
- /// sync up menu with parameters
- void refresh();
-
- /// Apply the changed values.
- void apply();
-
- /// don't apply the changed values
- void cancel();
-
- /// refresh the enabled values
- void refreshEnabledState();
-
-protected:
- BOOL mUseVBO;
- BOOL mUseAniso;
- BOOL mUseFBO;
- U32 mFSAASamples;
- F32 mGamma;
- S32 mVideoCardMem;
- F32 mFogRatio;
- BOOL mProbeHardwareOnStartup;
-
-private:
-};
-
-#endif
-
diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp
new file mode 100644
index 0000000000..403db35cc0
--- /dev/null
+++ b/indra/newview/llfloaterloadprefpreset.cpp
@@ -0,0 +1,91 @@
+/**
+ * @file llfloateloadprefpreset.cpp
+ * @brief Floater to load a graphics / camera preset
+ *
+ * $LicenseInfo:firstyear=2015&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2015, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterloadprefpreset.h"
+
+#include "llbutton.h"
+#include "llcombobox.h"
+#include "llfloaterpreference.h"
+#include "llfloaterreg.h"
+#include "llpresetsmanager.h"
+#include "llviewercontrol.h"
+
+LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key)
+: LLFloater(key)
+{
+}
+
+// virtual
+BOOL LLFloaterLoadPrefPreset::postBuild()
+{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (preferences)
+ {
+ preferences->addDependentFloater(this);
+ }
+ getChild<LLButton>("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this));
+ LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this));
+
+ return TRUE;
+}
+
+void LLFloaterLoadPrefPreset::onOpen(const LLSD& key)
+{
+ mSubdirectory = key.asString();
+ std::string floater_title = getString(std::string("title_") + mSubdirectory);
+
+ setTitle(floater_title);
+
+ LLComboBox* combo = getChild<LLComboBox>("preset_combo");
+
+ EDefaultOptions option = DEFAULT_TOP;
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
+}
+
+void LLFloaterLoadPrefPreset::onPresetsListChange()
+{
+ LLComboBox* combo = getChild<LLComboBox>("preset_combo");
+
+ EDefaultOptions option = DEFAULT_TOP;
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
+}
+
+void LLFloaterLoadPrefPreset::onBtnCancel()
+{
+ closeFloater();
+}
+
+void LLFloaterLoadPrefPreset::onBtnOk()
+{
+ LLComboBox* combo = getChild<LLComboBox>("preset_combo");
+ std::string name = combo->getSimple();
+
+ LLPresetsManager::getInstance()->loadPreset(mSubdirectory, name);
+
+ closeFloater();
+}
diff --git a/indra/newview/llfloaterloadprefpreset.h b/indra/newview/llfloaterloadprefpreset.h
new file mode 100644
index 0000000000..9471f6f1e1
--- /dev/null
+++ b/indra/newview/llfloaterloadprefpreset.h
@@ -0,0 +1,53 @@
+/**
+ * @file llfloaterloadprefpreset.h
+ * @brief Floater to load a graphics / camera preset
+
+ *
+ * $LicenseInfo:firstyear=2015&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2015, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERLOADPREFPRESET_H
+#define LL_LLFLOATERLOADPREFPRESET_H
+
+#include "llfloater.h"
+
+class LLComboBox;
+
+class LLFloaterLoadPrefPreset : public LLFloater
+{
+
+public:
+ LLFloaterLoadPrefPreset(const LLSD &key);
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ void onBtnOk();
+ void onBtnCancel();
+
+private:
+ void onPresetsListChange();
+
+ std::string mSubdirectory;
+};
+
+#endif // LL_LLFLOATERLOADPREFPRESET_H
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 4ccb8f23cd..306ee45ef2 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -48,7 +48,6 @@
//#include "llfirstuse.h"
#include "llfloaterreg.h"
#include "llfloaterabout.h"
-#include "llfloaterhardwaresettings.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterimsession.h"
#include "llkeyboard.h"
@@ -108,6 +107,11 @@
#include "lllogininstance.h" // to check if logged in yet
#include "llsdserialize.h"
+#include "llpresetsmanager.h"
+#include "llviewercontrol.h"
+#include "llpresetsmanager.h"
+#include "llfeaturemanager.h"
+#include "llviewertexturelist.h"
const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f;
char const* const VISIBILITY_DEFAULT = "default";
@@ -116,6 +120,18 @@ char const* const VISIBILITY_HIDDEN = "hidden";
//control value for middle mouse as talk2push button
const static std::string MIDDLE_MOUSE_CV = "MiddleMouse";
+/// This must equal the maximum value set for the IndirectMaxComplexity slider in panel_preferences_graphics1.xml
+static const U32 INDIRECT_MAX_ARC_OFF = 101; // all the way to the right == disabled
+static const U32 MIN_INDIRECT_ARC_LIMIT = 1; // must match minimum of IndirectMaxComplexity in panel_preferences_graphics1.xml
+static const U32 MAX_INDIRECT_ARC_LIMIT = INDIRECT_MAX_ARC_OFF-1; // one short of all the way to the right...
+
+/// These are the effective range of values for RenderAvatarMaxComplexity
+static const F32 MIN_ARC_LIMIT = 20000.0f;
+static const F32 MAX_ARC_LIMIT = 300000.0f;
+static const F32 MIN_ARC_LOG = log(MIN_ARC_LIMIT);
+static const F32 MAX_ARC_LOG = log(MAX_ARC_LIMIT);
+static const F32 ARC_LIMIT_MAP_SCALE = (MAX_ARC_LOG - MIN_ARC_LOG) / (MAX_INDIRECT_ARC_LIMIT - MIN_INDIRECT_ARC_LIMIT);
+
class LLVoiceSetKeyDialog : public LLModalDialog
{
public:
@@ -317,9 +333,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
registered_dialog = true;
}
- mCommitCallbackRegistrar.add("Pref.Apply", boost::bind(&LLFloaterPreference::onBtnApply, this));
- mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this));
- mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this));
+ mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this, _2));
+ mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this, _2));
mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this));
mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, this));
@@ -333,8 +348,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
- mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, 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));
@@ -348,6 +363,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.AutoReplace", boost::bind(&LLFloaterPreference::onClickAutoReplace, this));
mCommitCallbackRegistrar.add("Pref.PermsDefault", boost::bind(&LLFloaterPreference::onClickPermsDefault, this));
mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this));
+ mCommitCallbackRegistrar.add("Pref.Advanced", boost::bind(&LLFloaterPreference::onClickAdvanced, this));
sSkin = gSavedSettings.getString("SkinCurrent");
@@ -542,12 +558,6 @@ void LLFloaterPreference::apply()
if (panel)
panel->apply();
}
- // hardware menu apply
- LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance<LLFloaterHardwareSettings>("prefs_hardware_settings");
- if (hardware_settings)
- {
- hardware_settings->apply();
- }
gViewerWindow->requestResolutionUpdate(); // for UIScaleFactor
@@ -624,13 +634,9 @@ void LLFloaterPreference::cancel()
// hide spellchecker settings folder
LLFloaterReg::hideInstance("prefs_spellchecker");
-
- // cancel hardware menu
- LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance<LLFloaterHardwareSettings>("prefs_hardware_settings");
- if (hardware_settings)
- {
- hardware_settings->cancel();
- }
+
+ // hide advancede floater
+ LLFloaterReg::hideInstance("prefs_graphics_advanced");
// reverts any changes to current skin
gSavedSettings.setString("SkinCurrent", sSkin);
@@ -657,7 +663,7 @@ void LLFloaterPreference::cancel()
void LLFloaterPreference::onOpen(const LLSD& key)
{
-
+
// this variable and if that follows it are used to properly handle do not disturb mode response message
static bool initialized = FALSE;
// if user is logged in and we haven't initialized do not disturb mode response yet, do it
@@ -735,6 +741,19 @@ void LLFloaterPreference::onOpen(const LLSD& key)
// when the floater is opened. That will make cancel do its
// job
saveSettings();
+
+ // Make sure there is a default preference file
+ LLPresetsManager::getInstance()->createMissingDefault();
+
+ bool started = (LLStartUp::getStartupState() == STATE_STARTED);
+
+ LLButton* load_btn = findChild<LLButton>("PrefLoadButton");
+ LLButton* save_btn = findChild<LLButton>("PrefSaveButton");
+ LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton");
+
+ load_btn->setEnabled(started);
+ save_btn->setEnabled(started);
+ delete_btn->setEnabled(started);
}
void LLFloaterPreference::onVertexShaderEnable()
@@ -742,6 +761,27 @@ void LLFloaterPreference::onVertexShaderEnable()
refreshEnabledGraphics();
}
+void LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable()
+{
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->refresh();
+ }
+
+ refreshEnabledGraphics();
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledGraphics()
+{
+ refreshEnabledState();
+}
+
+void LLFloaterPreference::onAvatarImpostorsEnable()
+{
+ refreshEnabledGraphics();
+}
+
//static
void LLFloaterPreference::initDoNotDisturbResponse()
{
@@ -765,7 +805,14 @@ void LLFloaterPreference::updateShowFavoritesCheckbox(bool val)
void LLFloaterPreference::setHardwareDefaults()
{
LLFeatureManager::getInstance()->applyRecommendedSettings();
+
+ // reset indirects before refresh because we may have changed what they control
+ LLFloaterPreferenceGraphicsAdvanced::setIndirectControls();
+
refreshEnabledGraphics();
+ gSavedSettings.setString("PresetGraphicActive", "");
+ LLPresetsManager::getInstance()->triggerChangeSignal();
+
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
child_list_t::const_iterator end = tabcontainer->getChildList()->end();
@@ -774,7 +821,47 @@ void LLFloaterPreference::setHardwareDefaults()
LLView* view = *iter;
LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
if (panel)
+ {
panel->setHardwareDefaults();
+ }
+ }
+}
+
+void LLFloaterPreference::getControlNames(std::vector<std::string>& names)
+{
+ LLView* view = findChild<LLView>("display");
+ LLFloater* advanced = LLFloaterReg::findTypedInstance<LLFloater>("prefs_graphics_advanced");
+ if (view && advanced)
+ {
+ std::list<LLView*> stack;
+ stack.push_back(view);
+ stack.push_back(advanced);
+ while(!stack.empty())
+ {
+ // Process view on top of the stack
+ LLView* curview = stack.front();
+ stack.pop_front();
+
+ LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
+ if (ctrl)
+ {
+ LLControlVariable* control = ctrl->getControlVariable();
+ if (control)
+ {
+ std::string control_name = control->getName();
+ if (std::find(names.begin(), names.end(), control_name) == names.end())
+ {
+ names.push_back(control_name);
+ }
+ }
+ }
+
+ for (child_list_t::const_iterator iter = curview->getChildList()->begin();
+ iter != curview->getChildList()->end(); ++iter)
+ {
+ stack.push_back(*iter);
+ }
+ }
}
}
@@ -789,13 +876,8 @@ void LLFloaterPreference::onClose(bool app_quitting)
}
}
-void LLFloaterPreference::onOpenHardwareSettings()
-{
- LLFloater* floater = LLFloaterReg::showInstance("prefs_hardware_settings");
- addDependentFloater(floater, FALSE);
-}
// static
-void LLFloaterPreference::onBtnOK()
+void LLFloaterPreference::onBtnOK(const LLSD& userdata)
{
// commit any outstanding text entry
if (hasFocus())
@@ -811,7 +893,15 @@ void LLFloaterPreference::onBtnOK()
{
saveSettings();
apply();
- closeFloater(false);
+
+ if (userdata.asString() == "closeadvanced")
+ {
+ LLFloaterReg::hideInstance("prefs_graphics_advanced");
+ }
+ else
+ {
+ closeFloater(false);
+ }
//Conversation transcript and log path changed so reload conversations based on new location
if(mPriorInstantMessageLogPath.length())
@@ -853,11 +943,10 @@ void LLFloaterPreference::onBtnOK()
LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get();
pPathfindingConsole->onRegionBoundaryCross();
}
-
}
// static
-void LLFloaterPreference::onBtnApply( )
+void LLFloaterPreference::onBtnCancel(const LLSD& userdata)
{
if (hasFocus())
{
@@ -866,27 +955,18 @@ void LLFloaterPreference::onBtnApply( )
{
cur_focus->onCommit();
}
+ refresh();
}
- apply();
- saveSettings();
-
- LLPanelLogin::updateLocationSelectorsVisibility();
-}
+ cancel();
-// static
-void LLFloaterPreference::onBtnCancel()
-{
- if (hasFocus())
+ if (userdata.asString() == "closeadvanced")
{
- LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
- if (cur_focus && cur_focus->acceptsTextInput())
- {
- cur_focus->onCommit();
- }
- refresh();
+ LLFloaterReg::hideInstance("prefs_graphics_advanced");
+ }
+ else
+ {
+ closeFloater();
}
- cancel();
- closeFloater();
}
// static
@@ -899,19 +979,18 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_
}
}
-
void LLFloaterPreference::refreshEnabledGraphics()
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (instance)
{
instance->refresh();
- //instance->refreshEnabledState();
}
- LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance<LLFloaterHardwareSettings>("prefs_hardware_settings");
- if (hardware_settings)
+
+ LLFloater* advanced = LLFloaterReg::findTypedInstance<LLFloater>("prefs_graphics_advanced");
+ if (advanced)
{
- hardware_settings->refreshEnabledState();
+ advanced->refresh();
}
}
@@ -1094,23 +1173,52 @@ void LLFloaterPreference::buildPopupLists()
}
void LLFloaterPreference::refreshEnabledState()
-{
+{
+ LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
+ LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
+
+ // if vertex shaders off, disable all shader related products
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable") ||
+ !LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
+ {
+ ctrl_wind_light->setEnabled(FALSE);
+ ctrl_wind_light->setValue(FALSE);
+ }
+ else
+ {
+ ctrl_wind_light->setEnabled(gSavedSettings.getBOOL("VertexShaderEnable"));
+ }
+
+ //Deferred/SSAO/Shadows
+ BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
+ BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders") && gSavedSettings.getBOOL("VertexShaderEnable");
+ BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ bumpshiny &&
+ shaders &&
+ gGLManager.mHasFramebufferObject &&
+ gSavedSettings.getBOOL("RenderAvatarVP") &&
+ (ctrl_wind_light->get()) ? TRUE : FALSE;
+
+ ctrl_deferred->setEnabled(enabled);
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
+{
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
- LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
-
+ LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
+
// Reflections
BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable")
&& gGLManager.mHasCubeMap
&& LLCubeMap::sUseCubeMaps;
ctrl_reflections->setEnabled(reflections);
+ reflections_text->setEnabled(reflections);
// Bump & Shiny
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
bumpshiny_ctrl->setEnabled(bumpshiny ? TRUE : FALSE);
- radio_reflection_detail->setEnabled(reflections);
-
// Avatar Mode
// Enable Avatar Shaders
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
@@ -1129,43 +1237,48 @@ void LLFloaterPreference::refreshEnabledState()
if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE ||
gSavedSettings.getBOOL("RenderAvatarVP") == FALSE)
{
- ctrl_avatar_cloth->setEnabled(false);
+ ctrl_avatar_cloth->setEnabled(FALSE);
}
else
{
- ctrl_avatar_cloth->setEnabled(true);
+ ctrl_avatar_cloth->setEnabled(TRUE);
}
// Vertex Shaders
// Global Shader Enable
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
- // radio set for terrain detail mode
- LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
-
+ LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail"); // can be linked with control var
+ LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
+
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
BOOL shaders = ctrl_shader_enable->get();
if (shaders)
{
- mRadioTerrainDetail->setValue(1);
- mRadioTerrainDetail->setEnabled(FALSE);
+ terrain_detail->setValue(1);
+ terrain_detail->setEnabled(FALSE);
+ terrain_text->setEnabled(FALSE);
}
else
{
- mRadioTerrainDetail->setEnabled(TRUE);
+ terrain_detail->setEnabled(TRUE);
+ terrain_text->setEnabled(TRUE);
}
// WindLight
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
-
+ LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
+ LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
+
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+ sky->setEnabled(ctrl_wind_light->get() && shaders);
+ sky_text->setEnabled(ctrl_wind_light->get() && shaders);
+
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
- LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
-
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
@@ -1175,11 +1288,11 @@ void LLFloaterPreference::refreshEnabledState()
(ctrl_wind_light->get()) ? TRUE : FALSE;
ctrl_deferred->setEnabled(enabled);
- ctrl_deferred2->setEnabled(enabled);
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail");
+ LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText");
// note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE);
@@ -1192,7 +1305,33 @@ void LLFloaterPreference::refreshEnabledState()
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
ctrl_shadow->setEnabled(enabled);
-
+ shadow_text->setEnabled(enabled);
+
+ // Hardware settings
+ F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
+ S32Megabytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
+ S32Megabytes max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
+ getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem.value());
+ getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem.value());
+
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
+ !gGLManager.mHasVertexBufferObject)
+ {
+ getChildView("vbo")->setEnabled(FALSE);
+ }
+
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures") ||
+ !gGLManager.mHasVertexBufferObject)
+ {
+ getChildView("texture compression")->setEnabled(FALSE);
+ }
+
+ // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
+ LLUICtrl* gamma_ctrl = getChild<LLUICtrl>("gamma");
+ gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
+ getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders());
+ getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders());
+ getChildView("antialiasing restart")->setVisible(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"));
// now turn off any features that are unavailable
disableUnavailableSettings();
@@ -1203,19 +1342,63 @@ void LLFloaterPreference::refreshEnabledState()
getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true);
}
-void LLFloaterPreference::disableUnavailableSettings()
+// static
+void LLFloaterPreferenceGraphicsAdvanced::setIndirectControls()
+{
+ /*
+ * We have controls that have an indirect relationship between the control
+ * values and adjacent text and the underlying setting they influence.
+ * In each case, the control and its associated setting are named Indirect<something>
+ * This method interrogates the controlled setting and establishes the
+ * appropriate value for the indirect control. It must be called whenever the
+ * underlying setting may have changed other than through the indirect control,
+ * such as when the 'Reset all to recommended settings' button is used...
+ */
+ setIndirectMaxNonImpostors();
+ setIndirectMaxArc();
+}
+
+// static
+void LLFloaterPreferenceGraphicsAdvanced::setIndirectMaxNonImpostors()
+{
+ U32 max_non_impostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors");
+ // for this one, we just need to make zero, which means off, the max value of the slider
+ U32 indirect_max_non_impostors = (0 == max_non_impostors) ? LLVOAvatar::IMPOSTORS_OFF : max_non_impostors;
+ gSavedSettings.setU32("IndirectMaxNonImpostors", indirect_max_non_impostors);
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::setIndirectMaxArc()
+{
+ U32 max_arc = gSavedSettings.getU32("RenderAvatarMaxComplexity");
+ U32 indirect_max_arc;
+ if (0 == max_arc)
+ {
+ // the off position is all the way to the right, so set to control max
+ indirect_max_arc = INDIRECT_MAX_ARC_OFF;
+ }
+ else
+ {
+ // This is the inverse of the calculation in updateMaxComplexity
+ indirect_max_arc = (U32)((log(max_arc) - MIN_ARC_LOG) / ARC_LIMIT_MAP_SCALE) + MIN_INDIRECT_ARC_LIMIT;
+ }
+ gSavedSettings.setU32("IndirectMaxComplexity", indirect_max_arc);
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
{
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
+ LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
- LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
- LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
+ LLTextBox* shadows_text = getChild<LLTextBox>("RenderShadowDetailText");
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
+ LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
+ LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
// if vertex shaders off, disable all shader related products
if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
@@ -1225,9 +1408,13 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
-
+
+ sky->setEnabled(FALSE);
+ sky_text->setEnabled(FALSE);
+
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(0);
+ reflections_text->setEnabled(FALSE);
ctrl_avatar_vp->setEnabled(FALSE);
ctrl_avatar_vp->setValue(FALSE);
@@ -1237,6 +1424,7 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1246,8 +1434,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled windlight
@@ -1256,9 +1442,13 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
+ sky->setEnabled(FALSE);
+ sky_text->setEnabled(FALSE);
+
//deferred needs windlight, disable deferred
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1268,8 +1458,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled deferred
@@ -1278,6 +1466,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1287,8 +1476,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled deferred SSAO
@@ -1303,6 +1490,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
}
// disabled reflections
@@ -1310,6 +1498,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(FALSE);
+ reflections_text->setEnabled(FALSE);
}
// disabled av
@@ -1324,6 +1513,7 @@ void LLFloaterPreference::disableUnavailableSettings()
//deferred needs AvatarVP, disable deferred
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1333,8 +1523,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled cloth
@@ -1343,18 +1531,22 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_avatar_cloth->setEnabled(FALSE);
ctrl_avatar_cloth->setValue(FALSE);
}
+}
- // disabled impostors
- if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
+void LLFloaterPreference::refresh()
+{
+ LLPanel::refresh();
+ refreshEnabledState();
+ LLFloater* advanced = LLFloaterReg::findTypedInstance<LLFloater>("prefs_graphics_advanced");
+ if (advanced)
{
- ctrl_avatar_impostors->setEnabled(FALSE);
- ctrl_avatar_impostors->setValue(FALSE);
+ advanced->refresh();
}
}
-void LLFloaterPreference::refresh()
+void LLFloaterPreferenceGraphicsAdvanced::refresh()
{
- LLPanel::refresh();
+ getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) gSavedSettings.getU32("RenderFSAASamples"));
// sliders and their text boxes
// mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow");
@@ -1363,12 +1555,14 @@ void LLFloaterPreference::refresh()
updateSliderText(getChild<LLSliderCtrl>("FlexibleMeshDetail", true), getChild<LLTextBox>("FlexibleMeshDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("TreeMeshDetail", true), getChild<LLTextBox>("TreeMeshDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail", true), getChild<LLTextBox>("AvatarMeshDetailText", true));
- updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail2", true), getChild<LLTextBox>("AvatarMeshDetailText2", true));
updateSliderText(getChild<LLSliderCtrl>("AvatarPhysicsDetail", true), getChild<LLTextBox>("AvatarPhysicsDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("TerrainMeshDetail", true), getChild<LLTextBox>("TerrainMeshDetailText", true));
updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess", true), getChild<LLTextBox>("PostProcessText", true));
updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail", true), getChild<LLTextBox>("SkyMeshDetailText", true));
-
+ updateSliderText(getChild<LLSliderCtrl>("TerrainDetail", true), getChild<LLTextBox>("TerrainDetailText", true));
+ setIndirectControls();
+ setMaxNonImpostorsText(gSavedSettings.getU32("RenderAvatarMaxNonImpostors"),getChild<LLTextBox>("IndirectMaxNonImpostorsText", true));
+ setMaxComplexityText(gSavedSettings.getU32("RenderAvatarMaxComplexity"),getChild<LLTextBox>("IndirectMaxComplexityText", true));
refreshEnabledState();
}
@@ -1621,11 +1815,11 @@ void LLFloaterPreference::refreshUI()
refresh();
}
-void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
+void LLFloaterPreferenceGraphicsAdvanced::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
{
if (text_box == NULL || ctrl== NULL)
return;
-
+
// get range and points when text should change
F32 value = (F32)ctrl->getValue().asReal();
F32 min = ctrl->getMinValue();
@@ -1634,7 +1828,7 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
llassert(range > 0);
F32 midPoint = min + range / 3.0f;
F32 highPoint = min + (2.0f * range / 3.0f);
-
+
// choose the right text
if (value < midPoint)
{
@@ -1650,6 +1844,72 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
}
}
+void LLFloaterPreferenceGraphicsAdvanced::updateMaxNonImpostors()
+{
+ // Called when the IndirectMaxNonImpostors control changes
+ // Responsible for fixing the slider label (IndirectMaxNonImpostorsText) and setting RenderAvatarMaxNonImpostors
+ LLSliderCtrl* ctrl = getChild<LLSliderCtrl>("IndirectMaxNonImpostors",true);
+ U32 value = ctrl->getValue().asInteger();
+
+ if (0 == value || LLVOAvatar::IMPOSTORS_OFF <= value)
+ {
+ value=0;
+ }
+ gSavedSettings.setU32("RenderAvatarMaxNonImpostors", value);
+ LLVOAvatar::updateImpostorRendering(value); // make it effective immediately
+ setMaxNonImpostorsText(value, getChild<LLTextBox>("IndirectMaxNonImpostorsText"));
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::setMaxNonImpostorsText(U32 value, LLTextBox* text_box)
+{
+ if (0 == value)
+ {
+ text_box->setText(LLTrans::getString("no_limit"));
+ }
+ else
+ {
+ text_box->setText(llformat("%d", value));
+ }
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity()
+{
+ // Called when the IndirectMaxComplexity control changes
+ // Responsible for fixing the slider label (IndirectMaxComplexityText) and setting RenderAvatarMaxComplexity
+ LLSliderCtrl* ctrl = getChild<LLSliderCtrl>("IndirectMaxComplexity");
+ U32 indirect_value = ctrl->getValue().asInteger();
+ U32 max_arc;
+
+ if (INDIRECT_MAX_ARC_OFF == indirect_value)
+ {
+ // The 'off' position is when the slider is all the way to the right,
+ // which is a value of INDIRECT_MAX_ARC_OFF,
+ // so it is necessary to set max_arc to 0 disable muted avatars.
+ max_arc = 0;
+ }
+ else
+ {
+ // if this is changed, the inverse calculation in setIndirectMaxArc
+ // must be changed to match
+ max_arc = (U32)exp(MIN_ARC_LOG + (ARC_LIMIT_MAP_SCALE * (indirect_value - MIN_INDIRECT_ARC_LIMIT)));
+ }
+
+ gSavedSettings.setU32("RenderAvatarMaxComplexity", (U32)max_arc);
+ setMaxComplexityText(max_arc, getChild<LLTextBox>("IndirectMaxComplexityText"));
+}
+
+void LLFloaterPreferenceGraphicsAdvanced::setMaxComplexityText(U32 value, LLTextBox* text_box)
+{
+ if (0 == value)
+ {
+ text_box->setText(LLTrans::getString("no_limit"));
+ }
+ else
+ {
+ text_box->setText(llformat("%d", value));
+ }
+}
+
void LLFloaterPreference::onChangeMaturity()
{
U8 sim_access = gSavedSettings.getU32("PreferredMaturity");
@@ -1692,6 +1952,11 @@ void LLFloaterPreference::onClickSpellChecker()
LLFloaterReg::showInstance("prefs_spellchecker");
}
+void LLFloaterPreference::onClickAdvanced()
+{
+ LLFloaterReg::showInstance("prefs_graphics_advanced");
+}
+
void LLFloaterPreference::onClickActionChange()
{
mClickActionDirty = true;
@@ -1849,6 +2114,9 @@ LLPanelPreference::LLPanelPreference()
{
mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
mCommitCallbackRegistrar.add("Pref.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelPreference::updateMediaAutoPlayCheckbox, this, _1));
+ mCommitCallbackRegistrar.add("Pref.PrefDelete", boost::bind(&LLPanelPreference::deletePreset, this, _2));
+ mCommitCallbackRegistrar.add("Pref.PrefSave", boost::bind(&LLPanelPreference::savePreset, this, _2));
+ mCommitCallbackRegistrar.add("Pref.PrefLoad", boost::bind(&LLPanelPreference::loadPreset, this, _2));
}
//virtual
@@ -1947,10 +2215,16 @@ void LLPanelPreference::apply()
void LLPanelPreference::saveSettings()
{
+ LLFloater* advanced = LLFloaterReg::findTypedInstance<LLFloater>("prefs_graphics_advanced");
+
// Save the value of all controls in the hierarchy
mSavedValues.clear();
std::list<LLView*> view_stack;
view_stack.push_back(this);
+ if (advanced)
+ {
+ view_stack.push_back(advanced);
+ }
while(!view_stack.empty())
{
// Process view on top of the stack
@@ -2052,6 +2326,28 @@ void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
}
}
+void LLPanelPreference::deletePreset(const LLSD& user_data)
+{
+ std::string subdirectory = user_data.asString();
+ LLFloaterReg::showInstance("delete_pref_preset", subdirectory);
+}
+
+void LLPanelPreference::savePreset(const LLSD& user_data)
+{
+ std::string subdirectory = user_data.asString();
+ LLFloaterReg::showInstance("save_pref_preset", subdirectory);
+}
+
+void LLPanelPreference::loadPreset(const LLSD& user_data)
+{
+ std::string subdirectory = user_data.asString();
+ LLFloaterReg::showInstance("load_pref_preset", subdirectory);
+}
+
+void LLPanelPreference::setHardwareDefaults()
+{
+}
+
class LLPanelPreferencePrivacy : public LLPanelPreference
{
public:
@@ -2095,25 +2391,77 @@ static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preferenc
BOOL LLPanelPreferenceGraphics::postBuild()
{
+ LLFloaterReg::showInstance("prefs_graphics_advanced");
+ LLFloaterReg::hideInstance("prefs_graphics_advanced");
+
+// Don't do this on Mac as their braindead GL versioning
+// sets this when 8x and 16x are indeed available
+//
+#if !LL_DARWIN
+ if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
+ { //remove FSAA settings above "4x"
+ LLComboBox* combo = getChild<LLComboBox>("fsaa");
+ combo->remove("8x");
+ combo->remove("16x");
+ }
+#endif
+
+ resetDirtyChilds();
+ setPresetText();
+
+ LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelPreferenceGraphics::onPresetsListChange, this));
+
return LLPanelPreference::postBuild();
}
+
void LLPanelPreferenceGraphics::draw()
{
+ setPresetText();
LLPanelPreference::draw();
-
- LLButton* button_apply = findChild<LLButton>("Apply");
-
- if (button_apply && button_apply->getVisible())
+}
+
+void LLPanelPreferenceGraphics::onPresetsListChange()
+{
+ resetDirtyChilds();
+ setPresetText();
+}
+
+void LLPanelPreferenceGraphics::setPresetText()
+{
+ LLTextBox* preset_text = getChild<LLTextBox>("preset_text");
+
+ std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive");
+
+ if (hasDirtyChilds() && !preset_graphic_active.empty())
{
- bool enable = hasDirtyChilds();
+ gSavedSettings.setString("PresetGraphicActive", "");
+ preset_graphic_active.clear();
+ // This doesn't seem to cause an infinite recursion. This trigger is needed to cause the pulldown
+ // panel to update.
+ LLPresetsManager::getInstance()->triggerChangeSignal();
+ }
- button_apply->setEnabled(enable);
+ if (!preset_graphic_active.empty())
+ {
+ preset_text->setText(preset_graphic_active);
+ }
+ else
+ {
+ preset_text->setText(LLTrans::getString("none_paren_cap"));
}
+
+ preset_text->resetDirty();
}
+
bool LLPanelPreferenceGraphics::hasDirtyChilds()
{
+ LLFloater* advanced = LLFloaterReg::findTypedInstance<LLFloater>("prefs_graphics_advanced");
std::list<LLView*> view_stack;
view_stack.push_back(this);
+ if (advanced)
+ {
+ view_stack.push_back(advanced);
+ }
while(!view_stack.empty())
{
// Process view on top of the stack
@@ -2124,7 +2472,17 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds()
if (ctrl)
{
if (ctrl->isDirty())
- return true;
+ {
+ LLControlVariable* control = ctrl->getControlVariable();
+ if (control)
+ {
+ std::string control_name = control->getName();
+ if (!control_name.empty())
+ {
+ return true;
+ }
+ }
+ }
}
// Push children onto the end of the work stack
for (child_list_t::const_iterator iter = curview->getChildList()->begin();
@@ -2132,14 +2490,20 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds()
{
view_stack.push_back(*iter);
}
- }
+ }
+
return false;
}
void LLPanelPreferenceGraphics::resetDirtyChilds()
{
+ LLFloater* advanced = LLFloaterReg::findTypedInstance<LLFloater>("prefs_graphics_advanced");
std::list<LLView*> view_stack;
view_stack.push_back(this);
+ if (advanced)
+ {
+ view_stack.push_back(advanced);
+ }
while(!view_stack.empty())
{
// Process view on top of the stack
@@ -2159,14 +2523,9 @@ void LLPanelPreferenceGraphics::resetDirtyChilds()
}
}
}
-void LLPanelPreferenceGraphics::apply()
-{
- resetDirtyChilds();
- LLPanelPreference::apply();
-}
+
void LLPanelPreferenceGraphics::cancel()
{
- resetDirtyChilds();
LLPanelPreference::cancel();
}
void LLPanelPreferenceGraphics::saveSettings()
@@ -2177,7 +2536,18 @@ void LLPanelPreferenceGraphics::saveSettings()
void LLPanelPreferenceGraphics::setHardwareDefaults()
{
resetDirtyChilds();
- LLPanelPreference::setHardwareDefaults();
+}
+
+LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const LLSD& key)
+ : LLFloater(key)
+{
+ mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxNonImpostors", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxNonImpostors,this));
+ mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity,this));
+}
+
+LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced()
+{
}
LLFloaterPreferenceProxy::LLFloaterPreferenceProxy(const LLSD& key)
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 7bf6ae7d79..9730722558 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -58,7 +58,6 @@ typedef enum
} EGraphicsSettings;
-
// Floater to control preferences (display, audio, bandwidth, general.
class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver, public LLConversationLogObserver
{
@@ -93,11 +92,11 @@ public:
void saveAvatarProperties( void );
void selectPrivacyPanel();
void selectChatPanel();
+ void getControlNames(std::vector<std::string>& names);
protected:
- void onBtnOK();
- void onBtnCancel();
- void onBtnApply();
+ void onBtnOK(const LLSD& userdata);
+ void onBtnCancel(const LLSD& userdata);
void onClickClearCache(); // Clear viewer texture cache, vfs, and VO cache on next startup
void onClickBrowserClearCache(); // Clear web history and caches as well as viewer caches above
@@ -111,11 +110,13 @@ protected:
// if the custom settings box is clicked
void onChangeCustom();
void updateMeterText(LLUICtrl* ctrl);
- void onOpenHardwareSettings();
// callback for defaults
void setHardwareDefaults();
+ 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();
@@ -123,7 +124,7 @@ protected:
void updateClickActionSettings();
// updates click/double-click action controls depending on values from settings.xml
void updateClickActionControls();
-
+
// This function squirrels away the current values of the controls so that
// cancel() can restore them.
void saveSettings();
@@ -150,13 +151,11 @@ public:
void enableHistory();
void setPersonalInfo(const std::string& visibility, bool im_via_email);
void refreshEnabledState();
- void disableUnavailableSettings();
void onCommitWindowedMode();
void refresh(); // Refresh enable/disable
// if the quality radio buttons are changed
void onChangeQuality(const LLSD& data);
- void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
void refreshUI();
void onCommitParcelMediaAutoPlayEnable();
@@ -170,6 +169,7 @@ public:
void onClickPermsDefault();
void onClickAutoReplace();
void onClickSpellChecker();
+ void onClickAdvanced();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
void onLogChatHistorySaved();
@@ -196,6 +196,7 @@ private:
std::string mDirectoryVisibility;
LLAvatarData mAvatarProperties;
+ LOG_CLASS(LLFloaterPreference);
};
class LLPanelPreference : public LLPanel
@@ -209,7 +210,7 @@ public:
virtual void apply();
virtual void cancel();
void setControlFalse(const LLSD& user_data);
- virtual void setHardwareDefaults(){};
+ virtual void setHardwareDefaults();
// Disables "Allow Media to auto play" check box only when both
// "Streaming Music" and "Media" are unchecked. Otherwise enables it.
@@ -218,7 +219,11 @@ public:
// This function squirrels away the current values of the controls so that
// cancel() can restore them.
virtual void saveSettings();
-
+
+ void deletePreset(const LLSD& user_data);
+ void savePreset(const LLSD& user_data);
+ void loadPreset(const LLSD& user_data);
+
class Updater;
protected:
@@ -235,6 +240,7 @@ private:
string_color_map_t mSavedColors;
Updater* mBandWidthUpdater;
+ LOG_CLASS(LLPanelPreference);
};
class LLPanelPreferenceGraphics : public LLPanelPreference
@@ -242,14 +248,44 @@ class LLPanelPreferenceGraphics : public LLPanelPreference
public:
BOOL postBuild();
void draw();
- void apply();
void cancel();
void saveSettings();
+ void resetDirtyChilds();
void setHardwareDefaults();
+ void setPresetText();
+
+ static const std::string getPresetsPath();
+
protected:
bool hasDirtyChilds();
- void resetDirtyChilds();
-
+
+private:
+
+ void onPresetsListChange();
+ LOG_CLASS(LLPanelPreferenceGraphics);
+};
+
+class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
+{
+public:
+ LLFloaterPreferenceGraphicsAdvanced(const LLSD& key);
+ ~LLFloaterPreferenceGraphicsAdvanced();
+
+ void disableUnavailableSettings();
+ void refreshEnabledGraphics();
+ void refreshEnabledState();
+ void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
+ void updateMaxNonImpostors();
+ void setMaxNonImpostorsText(U32 value, LLTextBox* text_box);
+ void updateMaxComplexity();
+ void setMaxComplexityText(U32 value, LLTextBox* text_box);
+ static void setIndirectControls();
+ static void setIndirectMaxNonImpostors();
+ static void setIndirectMaxArc();
+ void refresh();
+ // callback for when client turns on shaders
+ void onVertexShaderEnable();
+ LOG_CLASS(LLFloaterPreferenceGraphicsAdvanced);
};
class LLFloaterPreferenceProxy : public LLFloater
@@ -277,7 +313,7 @@ private:
bool mSocksSettingsDirty;
typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
control_values_map_t mSavedValues;
-
+ LOG_CLASS(LLFloaterPreferenceProxy);
};
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
new file mode 100644
index 0000000000..bdef718d0e
--- /dev/null
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -0,0 +1,108 @@
+/**
+ * @file llfloatersaveprefpreset.cpp
+ * @brief Floater to save a graphics / camera preset
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatersaveprefpreset.h"
+
+#include "llbutton.h"
+#include "llcombobox.h"
+#include "llfloaterpreference.h"
+#include "llfloaterreg.h"
+#include "llnotificationsutil.h"
+#include "llpresetsmanager.h"
+
+LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key)
+: LLFloater(key)
+{
+}
+
+// virtual
+BOOL LLFloaterSavePrefPreset::postBuild()
+{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (preferences)
+ {
+ preferences->addDependentFloater(this);
+ }
+ getChild<LLComboBox>("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this));
+ getChild<LLComboBox>("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this));
+ getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this));
+ getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnCancel, this));
+
+ LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetsListChange, this));
+
+ mSaveButton = getChild<LLButton>("save");
+ mPresetCombo = getChild<LLComboBox>("preset_combo");
+
+ return TRUE;
+}
+
+void LLFloaterSavePrefPreset::onPresetNameEdited()
+{
+ // Disable saving a preset having empty name.
+ std::string name = mPresetCombo->getSimple();
+
+ mSaveButton->setEnabled(!name.empty());
+}
+
+void LLFloaterSavePrefPreset::onOpen(const LLSD& key)
+{
+ mSubdirectory = key.asString();
+
+ std::string floater_title = getString(std::string("title_") + mSubdirectory);
+
+ setTitle(floater_title);
+
+ EDefaultOptions option = DEFAULT_TOP;
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option);
+
+ onPresetNameEdited();
+}
+
+void LLFloaterSavePrefPreset::onBtnSave()
+{
+ std::string name = mPresetCombo->getSimple();
+
+ if (!LLPresetsManager::getInstance()->savePreset(mSubdirectory, name))
+ {
+ LLSD args;
+ args["NAME"] = name;
+ LLNotificationsUtil::add("PresetNotSaved", args);
+ }
+
+ closeFloater();
+}
+
+void LLFloaterSavePrefPreset::onPresetsListChange()
+{
+ EDefaultOptions option = DEFAULT_TOP;
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option);
+}
+
+void LLFloaterSavePrefPreset::onBtnCancel()
+{
+ closeFloater();
+}
diff --git a/indra/newview/llfloatersaveprefpreset.h b/indra/newview/llfloatersaveprefpreset.h
new file mode 100644
index 0000000000..09a87b8c62
--- /dev/null
+++ b/indra/newview/llfloatersaveprefpreset.h
@@ -0,0 +1,57 @@
+/**
+ * @file llfloatersaveprefpreset.h
+ * @brief Floater to save a graphics / camera preset
+
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERSAVEPREFPRESET_H
+#define LL_LLFLOATERSAVEPREFPRESET_H
+
+#include "llfloater.h"
+
+class LLComboBox;
+
+class LLFloaterSavePrefPreset : public LLFloater
+{
+
+public:
+ LLFloaterSavePrefPreset(const LLSD &key);
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ void onBtnSave();
+ void onBtnCancel();
+
+private:
+ LLComboBox* mPresetCombo;
+ LLButton* mSaveButton;
+
+ void onPresetsListChange();
+ void onPresetNameEdited();
+
+ std::string mSubdirectory;
+};
+
+#endif // LL_LLFLOATERSAVEPREFPRESET_H
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 1cdd1b664e..737ae2e32d 100755
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -65,6 +65,9 @@ extern LLControlGroup gSavedSettings;
static const LLUUID PARCEL_MEDIA_LIST_ITEM_UUID = LLUUID("CAB5920F-E484-4233-8621-384CF373A321");
static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5D-CA970D694822");
+const F32 AUTO_CLOSE_FADE_TIME_START= 2.0f;
+const F32 AUTO_CLOSE_FADE_TIME_END = 3.0f;
+
//
// LLPanelNearByMedia
//
@@ -227,9 +230,6 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)
}
-const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f;
-const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f;
-
/*virtual*/
void LLPanelNearByMedia::draw()
{
diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp
new file mode 100644
index 0000000000..ceff5a54e8
--- /dev/null
+++ b/indra/newview/llpanelpresetspulldown.cpp
@@ -0,0 +1,188 @@
+/**
+ * @file llpanelpresetspulldown.cpp
+ * @brief A panel showing a quick way to pick presets
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelpresetspulldown.h"
+
+#include "llviewercontrol.h"
+#include "llstatusbar.h"
+
+#include "llbutton.h"
+#include "lltabcontainer.h"
+#include "llfloaterreg.h"
+#include "llfloaterpreference.h"
+#include "llpresetsmanager.h"
+#include "llsliderctrl.h"
+#include "llscrolllistctrl.h"
+
+/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseFadeStartTimeSec = 2.0f;
+/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseTotalTimeSec = 3.0f;
+
+///----------------------------------------------------------------------------
+/// Class LLPanelPresetsPulldown
+///----------------------------------------------------------------------------
+
+// Default constructor
+LLPanelPresetsPulldown::LLPanelPresetsPulldown()
+{
+ mHoverTimer.stop();
+
+ mCommitCallbackRegistrar.add("Presets.GoGraphicsPrefs", boost::bind(&LLPanelPresetsPulldown::onGraphicsButtonClick, this, _2));
+ mCommitCallbackRegistrar.add("Presets.RowClick", boost::bind(&LLPanelPresetsPulldown::onRowClick, this, _2));
+
+ buildFromFile( "panel_presets_pulldown.xml");
+}
+
+BOOL LLPanelPresetsPulldown::postBuild()
+{
+ LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelPresetsPulldown::populatePanel, this));
+ // Make sure there is a default preference file
+ LLPresetsManager::getInstance()->createMissingDefault();
+
+ populatePanel();
+
+ return LLPanel::postBuild();
+}
+
+void LLPanelPresetsPulldown::populatePanel()
+{
+ std::string presets_dir = LLPresetsManager::getInstance()->getPresetsDir(PRESETS_GRAPHIC);
+ LLPresetsManager::getInstance()->loadPresetNamesFromDir(presets_dir, mPresetNames, DEFAULT_TOP);
+
+ LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("preset_list");
+
+ if (scroll && mPresetNames.begin() != mPresetNames.end())
+ {
+ scroll->clearRows();
+
+ for (std::list<std::string>::const_iterator it = mPresetNames.begin(); it != mPresetNames.end(); ++it)
+ {
+ const std::string& name = *it;
+
+ LLSD row;
+ row["columns"][0]["column"] = "preset_name";
+ row["columns"][0]["value"] = name;
+
+ if (name == gSavedSettings.getString("PresetGraphicActive"))
+ {
+ row["columns"][1]["column"] = "icon";
+ row["columns"][1]["type"] = "icon";
+ row["columns"][1]["value"] = "Check_Mark";
+ }
+
+ scroll->addElement(row);
+ }
+ }
+}
+
+/*virtual*/
+void LLPanelPresetsPulldown::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ mHoverTimer.stop();
+ LLPanel::onMouseEnter(x,y,mask);
+}
+
+/*virtual*/
+void LLPanelPresetsPulldown::onTopLost()
+{
+ setVisible(FALSE);
+}
+
+/*virtual*/
+void LLPanelPresetsPulldown::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ mHoverTimer.start();
+ LLPanel::onMouseLeave(x,y,mask);
+}
+
+/*virtual*/
+void LLPanelPresetsPulldown::onVisibilityChange ( BOOL new_visibility )
+{
+ if (new_visibility)
+ {
+ mHoverTimer.start(); // timer will be stopped when mouse hovers over panel
+ }
+ else
+ {
+ mHoverTimer.stop();
+
+ }
+}
+
+void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data)
+{
+ LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("preset_list");
+
+ if (scroll)
+ {
+ LLScrollListItem* item = scroll->getFirstSelected();
+ if (item)
+ {
+ std::string name = item->getColumn(1)->getValue().asString();
+
+ LLPresetsManager::getInstance()->loadPreset(PRESETS_GRAPHIC, name);
+
+ setVisible(FALSE);
+ }
+ }
+}
+
+void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data)
+{
+ // close the minicontrol, we're bringing up the big one
+ setVisible(FALSE);
+
+ // bring up the prefs floater
+ LLFloater* prefsfloater = LLFloaterReg::showInstance("preferences");
+ if (prefsfloater)
+ {
+ // grab the 'graphics' panel from the preferences floater and
+ // bring it the front!
+ LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
+ LLPanel* graphicspanel = prefsfloater->getChild<LLPanel>("display");
+ if (tabcontainer && graphicspanel)
+ {
+ tabcontainer->selectTabPanel(graphicspanel);
+ }
+ }
+}
+
+//virtual
+void LLPanelPresetsPulldown::draw()
+{
+ F32 alpha = mHoverTimer.getStarted()
+ ? clamp_rescale(mHoverTimer.getElapsedTimeF32(), sAutoCloseFadeStartTimeSec, sAutoCloseTotalTimeSec, 1.f, 0.f)
+ : 1.0f;
+ LLViewDrawContext context(alpha);
+
+ LLPanel::draw();
+
+ if (alpha == 0.f)
+ {
+ setVisible(FALSE);
+ }
+}
diff --git a/indra/newview/llpanelpresetspulldown.h b/indra/newview/llpanelpresetspulldown.h
new file mode 100644
index 0000000000..146ccc0b09
--- /dev/null
+++ b/indra/newview/llpanelpresetspulldown.h
@@ -0,0 +1,58 @@
+/**
+ * @file llpanelpresetspulldown.h
+ * @brief A panel showing a quick way to pick presets
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELPRESETSPULLDOWN_H
+#define LL_LLPANELPRESETSPULLDOWN_H
+
+#include "linden_common.h"
+
+#include "llpanel.h"
+
+class LLFrameTimer;
+
+class LLPanelPresetsPulldown : public LLPanel
+{
+ public:
+ LLPanelPresetsPulldown();
+ /*virtual*/ void draw();
+ /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
+ /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
+ /*virtual*/ void onTopLost();
+ /*virtual*/ void onVisibilityChange ( BOOL new_visibility );
+ /*virtual*/ BOOL postBuild();
+ void populatePanel();
+
+ private:
+ void onGraphicsButtonClick(const LLSD& user_data);
+ void onRowClick(const LLSD& user_data);
+
+ std::list<std::string> mPresetNames;
+ LLFrameTimer mHoverTimer;
+ static const F32 sAutoCloseFadeStartTimeSec;
+ static const F32 sAutoCloseTotalTimeSec;
+};
+
+#endif // LL_LLPANELPRESETSPULLDOWN_H
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp
index cb00f742cc..6595da235c 100755
--- a/indra/newview/llpanelvolumepulldown.cpp
+++ b/indra/newview/llpanelvolumepulldown.cpp
@@ -40,8 +40,8 @@
#include "llfloaterpreference.h"
#include "llsliderctrl.h"
-/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 4.0f;
-/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 5.0f;
+/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 2.0f;
+/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 3.0f;
///----------------------------------------------------------------------------
/// Class LLPanelVolumePulldown
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
new file mode 100644
index 0000000000..9fa5282862
--- /dev/null
+++ b/indra/newview/llpresetsmanager.cpp
@@ -0,0 +1,279 @@
+/**
+ * @file llpresetsmanager.cpp
+ * @brief Implementation for the LLPresetsManager class.
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include <boost/assign/list_of.hpp>
+
+#include "llpresetsmanager.h"
+
+#include "lldiriterator.h"
+#include "llfloater.h"
+#include "llsdserialize.h"
+#include "lltrans.h"
+#include "lluictrlfactory.h"
+#include "llviewercontrol.h"
+#include "llfloaterpreference.h"
+#include "llfloaterreg.h"
+
+LLPresetsManager::LLPresetsManager()
+{
+}
+
+LLPresetsManager::~LLPresetsManager()
+{
+}
+
+void LLPresetsManager::triggerChangeSignal()
+{
+ mPresetListChangeSignal();
+}
+
+void LLPresetsManager::createMissingDefault()
+{
+ std::string default_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, PRESETS_DIR, PRESETS_GRAPHIC, "default.xml");
+ if (!gDirUtilp->fileExists(default_file))
+ {
+ LL_WARNS() << "No " << default_file << " found -- creating one" << LL_ENDL;
+
+ // Write current graphic settings to default.xml
+ savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT);
+
+ if (gSavedSettings.getString("PresetGraphicActive").empty())
+ {
+ gSavedSettings.setString("PresetGraphicActive", PRESETS_DEFAULT);
+ }
+ }
+}
+
+std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory)
+{
+ std::string presets_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, PRESETS_DIR);
+ std::string full_path;
+
+ if (!gDirUtilp->fileExists(presets_path))
+ {
+ LLFile::mkdir(presets_path);
+ }
+
+ full_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, PRESETS_DIR, subdirectory);
+ if (!gDirUtilp->fileExists(full_path))
+ {
+ LLFile::mkdir(full_path);
+ }
+
+ return full_path;
+}
+
+void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option)
+{
+ LL_INFOS("AppInit") << "Loading list of preset names from " << dir << LL_ENDL;
+
+ mPresetNames.clear();
+
+ LLDirIterator dir_iter(dir, "*.xml");
+ bool found = true;
+ while (found)
+ {
+ std::string file;
+ found = dir_iter.next(file);
+
+ if (found)
+ {
+ std::string path = gDirUtilp->add(dir, file);
+ std::string name = gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true);
+
+ if (PRESETS_DEFAULT != name)
+ {
+ mPresetNames.push_back(name);
+ }
+ else
+ {
+ switch (default_option)
+ {
+ case DEFAULT_SHOW:
+ mPresetNames.push_back(LLTrans::getString(PRESETS_DEFAULT));
+ break;
+
+ case DEFAULT_TOP:
+ mPresetNames.push_front(LLTrans::getString(PRESETS_DEFAULT));
+ break;
+
+ case DEFAULT_HIDE:
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ presets = mPresetNames;
+}
+
+bool LLPresetsManager::savePreset(const std::string& subdirectory, const std::string& name)
+{
+ llassert(!name.empty());
+
+ std::vector<std::string> name_list;
+
+ if(PRESETS_GRAPHIC == subdirectory)
+ {
+ gSavedSettings.setString("PresetGraphicActive", name);
+
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->getControlNames(name_list);
+ name_list.push_back("PresetGraphicActive");
+ }
+ }
+
+ if(PRESETS_CAMERA == subdirectory)
+ {
+ name_list = boost::assign::list_of
+ ("Placeholder");
+ }
+
+ // make an empty llsd
+ LLSD paramsData(LLSD::emptyMap());
+
+ for (std::vector<std::string>::iterator it = name_list.begin(); it != name_list.end(); ++it)
+ {
+ std::string ctrl_name = *it;
+ LLControlVariable* ctrl = gSavedSettings.getControl(ctrl_name).get();
+ std::string comment = ctrl->getComment();
+ std::string type = gSavedSettings.typeEnumToString(ctrl->type());
+ LLSD value = ctrl->getValue();
+
+ paramsData[ctrl_name]["Comment"] = comment;
+ paramsData[ctrl_name]["Persist"] = 1;
+ paramsData[ctrl_name]["Type"] = type;
+ paramsData[ctrl_name]["Value"] = value;
+ }
+
+ std::string pathName(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml");
+
+ // write to file
+ llofstream presetsXML(pathName);
+ if (!presetsXML.is_open())
+ {
+ LL_WARNS("Presets") << "Cannot open for output preset file " << pathName << LL_ENDL;
+ return false;
+ }
+
+ LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
+ formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY);
+ presetsXML.close();
+
+ gSavedSettings.setString("PresetGraphicActive", name);
+
+ // signal interested parties
+ triggerChangeSignal();
+
+ return true;
+}
+
+void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option)
+{
+ combo->clearRows();
+
+ std::string presets_dir = getPresetsDir(subdirectory);
+
+ if (!presets_dir.empty())
+ {
+ std::list<std::string> preset_names;
+ loadPresetNamesFromDir(presets_dir, preset_names, default_option);
+
+ std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive");
+
+ if (preset_names.begin() != preset_names.end())
+ {
+ for (std::list<std::string>::const_iterator it = preset_names.begin(); it != preset_names.end(); ++it)
+ {
+ const std::string& name = *it;
+ combo->add(name, LLSD().with(0, name));
+ }
+ }
+ else
+ {
+ combo->setLabel(LLTrans::getString("preset_combo_label"));
+ }
+ }
+}
+
+void LLPresetsManager::loadPreset(const std::string& subdirectory, const std::string& name)
+{
+ std::string full_path(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml");
+
+ if(gSavedSettings.loadFromFile(full_path, false, true) > 0)
+ {
+ if(PRESETS_GRAPHIC == subdirectory)
+ {
+ gSavedSettings.setString("PresetGraphicActive", name);
+ }
+
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->refreshEnabledGraphics();
+ }
+ triggerChangeSignal();
+ }
+}
+
+bool LLPresetsManager::deletePreset(const std::string& subdirectory, const std::string& name)
+{
+ bool sts = true;
+
+ if (PRESETS_DEFAULT == name)
+ {
+ // This code should never execute
+ LL_WARNS("Presets") << "You are not allowed to delete the default preset." << LL_ENDL;
+ sts = false;
+ }
+
+ if (gDirUtilp->deleteFilesInDir(getPresetsDir(subdirectory), LLURI::escape(name) + ".xml") < 1)
+ {
+ LL_WARNS("Presets") << "Error removing preset " << name << " from disk" << LL_ENDL;
+ sts = false;
+ }
+
+ // If you delete the preset that is currently marked as loaded then also indicate that no preset is loaded.
+ if (gSavedSettings.getString("PresetGraphicActive") == name)
+ {
+ gSavedSettings.setString("PresetGraphicActive", "");
+ }
+
+ // signal interested parties
+ triggerChangeSignal();
+
+ return sts;
+}
+
+boost::signals2::connection LLPresetsManager::setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb)
+{
+ return mPresetListChangeSignal.connect(cb);
+}
diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h
new file mode 100644
index 0000000000..a47c07dfba
--- /dev/null
+++ b/indra/newview/llpresetsmanager.h
@@ -0,0 +1,76 @@
+/**
+ * @file llpresetsmanager.h
+ * @brief Implementation for the LLPresetsManager class.
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_PRESETSMANAGER_H
+#define LL_PRESETSMANAGER_H
+
+#include "llcombobox.h"
+
+#include <list>
+#include <map>
+
+static const std::string PRESETS_DEFAULT = "Default";
+static const std::string PRESETS_DIR = "presets";
+static const std::string PRESETS_GRAPHIC = "graphic";
+static const std::string PRESETS_CAMERA = "camera";
+
+enum EDefaultOptions
+{
+ DEFAULT_SHOW,
+ DEFAULT_TOP,
+ DEFAULT_HIDE // Do not display "Default" in a list
+};
+
+class LLPresetsManager : public LLSingleton<LLPresetsManager>
+{
+public:
+
+ typedef std::list<std::string> preset_name_list_t;
+ typedef boost::signals2::signal<void()> preset_list_signal_t;
+
+ void createMissingDefault();
+ void triggerChangeSignal();
+ static std::string getPresetsDir(const std::string& subdirectory);
+ void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option);
+ void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option);
+ bool savePreset(const std::string& subdirectory, const std::string & name);
+ void loadPreset(const std::string& subdirectory, const std::string & name);
+ bool deletePreset(const std::string& subdirectory, const std::string& name);
+
+ // Emitted when a preset gets loaded, deleted, or saved.
+ boost::signals2::connection setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb);
+
+ // Emitted when a preset gets loaded or saved.
+
+ preset_name_list_t mPresetNames;
+
+ LLPresetsManager();
+ ~LLPresetsManager();
+
+ preset_list_signal_t mPresetListChangeSignal;
+};
+
+#endif // LL_PRESETSMANAGER_H
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 2d4b23d892..5c1041e556 100755
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -38,6 +38,7 @@
#include "llfloaterbuycurrency.h"
#include "llbuycurrencyhtml.h"
#include "llpanelnearbymedia.h"
+#include "llpanelpresetspulldown.h"
#include "llpanelvolumepulldown.h"
#include "llfloaterregioninfo.h"
#include "llfloaterscriptdebug.h"
@@ -170,6 +171,9 @@ BOOL LLStatusBar::postBuild()
mBtnStats = getChildView("stat_btn");
+ mIconPresets = getChild<LLIconCtrl>( "presets_icon" );
+ mIconPresets->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresets, this));
+
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this));
@@ -223,6 +227,11 @@ BOOL LLStatusBar::postBuild()
mSGPacketLoss = LLUICtrlFactory::create<LLStatGraph>(pgp);
addChild(mSGPacketLoss);
+ mPanelPresetsPulldown = new LLPanelPresetsPulldown();
+ addChild(mPanelPresetsPulldown);
+ mPanelPresetsPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
+ mPanelPresetsPulldown->setVisible(FALSE);
+
mPanelVolumePulldown = new LLPanelVolumePulldown();
addChild(mPanelVolumePulldown);
mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
@@ -460,8 +469,32 @@ void LLStatusBar::onClickBuyCurrency()
LLFirstUse::receiveLindens(false);
}
+void LLStatusBar::onMouseEnterPresets()
+{
+ LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder");
+ LLIconCtrl* icon = getChild<LLIconCtrl>( "presets_icon" );
+ LLRect icon_rect = icon->getRect();
+ LLRect pulldown_rect = mPanelPresetsPulldown->getRect();
+ pulldown_rect.setLeftTopAndSize(icon_rect.mLeft -
+ (pulldown_rect.getWidth() - icon_rect.getWidth()),
+ icon_rect.mBottom,
+ pulldown_rect.getWidth(),
+ pulldown_rect.getHeight());
+
+ pulldown_rect.translate(popup_holder->getRect().getWidth() - pulldown_rect.mRight, 0);
+ mPanelPresetsPulldown->setShape(pulldown_rect);
+
+ // show the master presets pull-down
+ LLUI::clearPopups();
+ LLUI::addPopup(mPanelPresetsPulldown);
+ mPanelNearByMedia->setVisible(FALSE);
+ mPanelVolumePulldown->setVisible(FALSE);
+ mPanelPresetsPulldown->setVisible(TRUE);
+}
+
void LLStatusBar::onMouseEnterVolume()
{
+ LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder");
LLButton* volbtn = getChild<LLButton>( "volume_btn" );
LLRect vol_btn_rect = volbtn->getRect();
LLRect volume_pulldown_rect = mPanelVolumePulldown->getRect();
@@ -471,12 +504,14 @@ void LLStatusBar::onMouseEnterVolume()
volume_pulldown_rect.getWidth(),
volume_pulldown_rect.getHeight());
+ volume_pulldown_rect.translate(popup_holder->getRect().getWidth() - volume_pulldown_rect.mRight, 0);
mPanelVolumePulldown->setShape(volume_pulldown_rect);
// show the master volume pull-down
LLUI::clearPopups();
LLUI::addPopup(mPanelVolumePulldown);
+ mPanelPresetsPulldown->setVisible(FALSE);
mPanelNearByMedia->setVisible(FALSE);
mPanelVolumePulldown->setVisible(TRUE);
}
@@ -500,6 +535,7 @@ void LLStatusBar::onMouseEnterNearbyMedia()
LLUI::clearPopups();
LLUI::addPopup(mPanelNearByMedia);
+ mPanelPresetsPulldown->setVisible(FALSE);
mPanelVolumePulldown->setVisible(FALSE);
mPanelNearByMedia->setVisible(TRUE);
}
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 9d28e6c2bc..277f039f20 100755
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -41,8 +41,10 @@ class LLUICtrl;
class LLUUID;
class LLFrameTimer;
class LLStatGraph;
+class LLPanelPresetsPulldown;
class LLPanelVolumePulldown;
class LLPanelNearByMedia;
+class LLIconCtrl;
class LLStatusBar
: public LLPanel
@@ -89,6 +91,7 @@ private:
void onClickBuyCurrency();
void onVolumeChanged(const LLSD& newvalue);
+ void onMouseEnterPresets();
void onMouseEnterVolume();
void onMouseEnterNearbyMedia();
void onClickScreen(S32 x, S32 y);
@@ -103,6 +106,7 @@ private:
LLStatGraph *mSGPacketLoss;
LLView *mBtnStats;
+ LLIconCtrl *mIconPresets;
LLButton *mBtnVolume;
LLTextBox *mBoxBalance;
LLButton *mMediaToggle;
@@ -115,6 +119,7 @@ private:
S32 mSquareMetersCommitted;
LLFrameTimer* mBalanceTimer;
LLFrameTimer* mHealthTimer;
+ LLPanelPresetsPulldown* mPanelPresetsPulldown;
LLPanelVolumePulldown* mPanelVolumePulldown;
LLPanelNearByMedia* mPanelNearByMedia;
};
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 5020518454..16f40fb747 100755
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -167,11 +167,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
return true;
}
-bool handleRenderAvatarComplexityLimitChanged(const LLSD& newvalue)
-{
- return true;
-}
-
bool handleRenderTransparentWaterChanged(const LLSD& newvalue)
{
LLWorld::getInstance()->updateWaterObjects();
@@ -224,12 +219,6 @@ static bool handleAvatarPhysicsLODChanged(const LLSD& newvalue)
return true;
}
-static bool handleAvatarMaxVisibleChanged(const LLSD& newvalue)
-{
- LLVOAvatar::sMaxVisible = (U32) newvalue.asInteger();
- return true;
-}
-
static bool handleTerrainLODChanged(const LLSD& newvalue)
{
LLVOSurfacePatch::sLODFactor = (F32)newvalue.asReal();
@@ -423,12 +412,6 @@ static bool handleRenderBumpChanged(const LLSD& newval)
return true;
}
-static bool handleRenderUseImpostorsChanged(const LLSD& newvalue)
-{
- LLVOAvatar::sUseImpostors = newvalue.asBoolean();
- return true;
-}
-
static bool handleRenderDebugGLChanged(const LLSD& newvalue)
{
gDebugGL = newvalue.asBoolean() || gDebugSession;
@@ -635,8 +618,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
- gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _2));
- gSavedSettings.getControl("RenderAvatarComplexityLimit")->getSignal()->connect(boost::bind(&handleRenderAvatarComplexityLimitChanged, _2));
gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2));
gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2));
gSavedSettings.getControl("RenderAvatarPhysicsLODFactor")->getSignal()->connect(boost::bind(&handleAvatarPhysicsLODChanged, _2));
@@ -654,7 +635,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleRenderBumpChanged, _2));
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
- gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _2));
gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2));
gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2));
gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2));
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index fc18b20758..87ebb6ba90 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -55,6 +55,7 @@
#include "llfloaterconversationlog.h"
#include "llfloaterconversationpreview.h"
#include "llfloaterdeleteenvpreset.h"
+#include "llfloaterdeleteprefpreset.h"
#include "llfloaterdestinations.h"
#include "llfloaterdisplayname.h"
#include "llfloatereditdaycycle.h"
@@ -68,7 +69,6 @@
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
#include "llfloatergroups.h"
-#include "llfloaterhardwaresettings.h"
#include "llfloaterhelpbrowser.h"
#include "llfloaterhoverheight.h"
#include "llfloaterhud.h"
@@ -80,6 +80,7 @@
#include "llfloaterlagmeter.h"
#include "llfloaterland.h"
#include "llfloaterlandholdings.h"
+#include "llfloaterloadprefpreset.h"
#include "llfloatermap.h"
#include "llfloatermediasettings.h"
#include "llfloatermemleak.h"
@@ -101,6 +102,7 @@
#include "llfloaterregioninfo.h"
#include "llfloaterregionrestarting.h"
#include "llfloaterreporter.h"
+#include "llfloatersaveprefpreset.h"
#include "llfloatersceneloadstats.h"
#include "llfloaterscriptdebug.h"
#include "llfloaterscriptedprefs.h"
@@ -205,6 +207,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
LLFloaterReg::add("conversation", "floater_conversation_log.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterConversationLog>);
+ LLFloaterReg::add("delete_pref_preset", "floater_delete_pref_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeletePrefPreset>);
LLFloaterReg::add("destinations", "floater_destinations.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDestinations>);
LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>);
@@ -242,6 +245,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>);
+ LLFloaterReg::add("load_pref_preset", "floater_load_pref_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLoadPrefPreset>);
LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
@@ -272,8 +276,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("perms_default", "floater_perms_default.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPermsDefault>);
LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
+ LLFloaterReg::add("prefs_graphics_advanced", "floater_preferences_graphics_advanced.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceGraphicsAdvanced>);
LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceProxy>);
- LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHardwareSettings>);
LLFloaterReg::add("prefs_spellchecker_import", "floater_spellcheck_import.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSpellCheckerImport>);
LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTranslationSettings>);
LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSpellCheckerSettings>);
@@ -290,6 +294,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewTexture>, "preview");
LLFloaterReg::add("properties", "floater_inventory_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterProperties>);
LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPublishClassifiedFloater>);
+ LLFloaterReg::add("save_pref_preset", "floater_save_pref_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSavePrefPreset>);
LLFloaterReg::add("script_colors", "floater_script_ed_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptEdPrefs>);
LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build<LLFloaterTelehub>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a23d02a00a..213dee9328 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -978,10 +978,6 @@ U32 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY;
}
- else if ("shame" == info_display)
- {
- return LLPipeline::RENDER_DEBUG_SHAME;
- }
else if ("texture area" == info_display)
{
return LLPipeline::RENDER_DEBUG_TEXTURE_AREA;
@@ -1010,9 +1006,9 @@ U32 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_COMPOSITION;
}
- else if ("attachment bytes" == info_display)
+ else if ("avatardrawinfo" == info_display)
{
- return LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES;
+ return (LLPipeline::RENDER_DEBUG_AVATAR_DRAW_INFO);
}
else if ("glow" == info_display)
{
@@ -1048,6 +1044,7 @@ U32 info_display_from_string(std::string info_display)
}
else
{
+ LL_WARNS() << "unrecognized feature name '" << info_display << "'" << LL_ENDL;
return 0;
}
};
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 74b8e693c4..790301a3bb 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4933,12 +4933,7 @@ void LLViewerObject::setDebugText(const std::string &utf8text)
if (!mText)
{
- mText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
- mText->setFont(LLFontGL::getFontSansSerif());
- mText->setVertAlignment(LLHUDText::ALIGN_VERT_TOP);
- mText->setMaxLines(-1);
- mText->setSourceObject(this);
- mText->setOnHUDAttachment(isHUDAttachment());
+ initDebugTextHud();
}
mText->setColor(LLColor4::white);
mText->setString(utf8text);
@@ -4947,6 +4942,16 @@ void LLViewerObject::setDebugText(const std::string &utf8text)
updateText();
}
+void LLViewerObject::initDebugTextHud()
+{
+ mText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT);
+ mText->setFont(LLFontGL::getFontSansSerif());
+ mText->setVertAlignment(LLHUDText::ALIGN_VERT_TOP);
+ mText->setMaxLines(-1);
+ mText->setSourceObject(this);
+ mText->setOnHUDAttachment(isHUDAttachment());
+}
+
void LLViewerObject::setIcon(LLViewerTexture* icon_image)
{
if (!mIcon)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 05c87c153b..fe020a3270 100755
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -402,6 +402,7 @@ public:
void setCanSelect(BOOL canSelect);
+ void initDebugTextHud();
void setDebugText(const std::string &utf8text);
void setIcon(LLViewerTexture* icon_image);
void clearIcon();
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 4bfea81182..a42263ba1d 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -475,8 +475,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
mImpl->mVOCachePartition = getVOCachePartition();
- mRenderInfoRequestTimer.resetWithExpiry(0.f); // Set timer to be expired
- setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer, _1));
+ setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::scanNewRegion, _1));
}
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index c14fa5aee8..419034d626 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -438,7 +438,8 @@ public:
static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
static S32 sLastCameraUpdated;
- LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; };
+ LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; };
+ LLFrameTimer & getRenderInfoReportTimer() { return mRenderInfoReportTimer; };
struct CompareRegionByLastUpdate
{
@@ -547,6 +548,7 @@ private:
// the materials capability throttle
LLFrameTimer mMaterialsCapThrottleTimer;
LLFrameTimer mRenderInfoRequestTimer;
+ LLFrameTimer mRenderInfoReportTimer;
};
inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b63222590d..57c1643b8d 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -677,7 +677,7 @@ public:
{
LLVOAvatar* avatar = av_iter->second;
- avatar->calculateUpdateRenderCost(); // Make sure the numbers are up-to-date
+ avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date
trunc_name = utf8str_truncate(avatar->getFullname(), 16);
addText(xpos, ypos, llformat("%s : rez %d, weight %d, bytes %d area %.2f",
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1b905713b3..7bd4ab4bb4 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -618,7 +618,7 @@ private:
//-----------------------------------------------------------------------------
LLAvatarAppearanceDictionary *LLVOAvatar::sAvatarDictionary = NULL;
S32 LLVOAvatar::sFreezeCounter = 0;
-U32 LLVOAvatar::sMaxVisible = 12;
+U32 LLVOAvatar::sMaxNonImpostors = 12; // overridden based on graphics setting
F32 LLVOAvatar::sRenderDistance = 256.f;
S32 LLVOAvatar::sNumVisibleAvatars = 0;
S32 LLVOAvatar::sNumLODChangesThisFrame = 0;
@@ -645,7 +645,7 @@ BOOL LLVOAvatar::sShowFootPlane = FALSE;
BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE;
F32 LLVOAvatar::sLODFactor = 1.f;
F32 LLVOAvatar::sPhysicsLODFactor = 1.f;
-BOOL LLVOAvatar::sUseImpostors = FALSE;
+bool LLVOAvatar::sUseImpostors = false;
BOOL LLVOAvatar::sJointDebug = FALSE;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
@@ -774,12 +774,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
}
- mCachedVisualMute = !isSelf();
+ mCachedVisualMute = !isSelf(); // default to muting everyone else? hmmm....
mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() + 5.0;
mVisuallyMuteSetting = VISUAL_MUTE_NOT_SET;
- F32 color_value = (F32) (getID().mData[0]);
- mMutedAVColor = calcMutedAVColor(color_value, 0, 256);
+ mMutedAVColor = calcMutedAVColor(getID());
}
std::string LLVOAvatar::avString() const
@@ -2148,7 +2147,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
idleUpdateNameTag( root_pos_last );
- idleUpdateRenderCost();
+ idleUpdateRenderComplexity();
}
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
@@ -2488,19 +2487,22 @@ void LLVOAvatar::idleUpdateLoadingEffect()
// update visibility when avatar is partially loaded
if (updateIsFullyLoaded()) // changed?
{
- if (isFullyLoaded() && mFirstFullyVisible && isSelf())
- {
- LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
- mFirstFullyVisible = FALSE;
- LLAppearanceMgr::instance().onFirstFullyVisible();
- }
- if (isFullyLoaded() && mFirstFullyVisible && !isSelf())
- {
- LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
- mFirstFullyVisible = FALSE;
- }
if (isFullyLoaded())
{
+ if (mFirstFullyVisible)
+ {
+ mFirstFullyVisible = FALSE;
+ if (isSelf())
+ {
+ LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LLAppearanceMgr::instance().onFirstFullyVisible();
+ }
+ else
+ {
+ LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ }
+ }
+
deleteParticleSource();
updateLOD();
}
@@ -2533,10 +2535,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()
LLPartData::LL_PART_EMISSIVE_MASK | // LLPartData::LL_PART_FOLLOW_SRC_MASK |
LLPartData::LL_PART_TARGET_POS_MASK );
- if (!isTooComplex()) // do not generate particles for overly-complex avatars
- {
- setParticleSource(particle_parameters, getID());
- }
+ setParticleSource(particle_parameters, getID());
}
}
}
@@ -3079,27 +3078,20 @@ void LLVOAvatar::slamPosition()
mRoot->updateWorldMatrixChildren();
}
-bool LLVOAvatar::isVisuallyMuted()
+bool LLVOAvatar::isVisuallyMuted() const
{
bool muted = false;
+ // Priority order (highest priority first)
+ // * own avatar is never visually muted
+ // * if on the "always draw normally" list, draw them normally
+ // * if on the "always visually mute" list, mute them
+ // * check against the render cost and attachment limits
if (!isSelf())
{
- static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions", 0);
- if (render_auto_mute_functions) // Hacky debug switch for developing feature
- {
- // Priority order (highest priority first)
- // * own avatar is never visually muted
- // * if on the "always draw normally" list, draw them normally
- // * if on the "always visually mute" list, mute them
- // * draw them normally if they meet the following criteria:
- // - within the closest N avatars OR on friends list OR in an IM chat
- // - AND aren't over the thresholds
- // * otherwise visually mute all other avatars
-
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0.0);
- static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
if (mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE)
{ // Always want to see this AV as an impostor
@@ -3120,33 +3112,11 @@ bool LLVOAvatar::isVisuallyMuted()
else
{ // Determine if visually muted or not
- U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5));
-
- muted = LLMuteList::getInstance()->isMuted(getID()) ||
- (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
- (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
- (mVisualComplexity > max_cost && max_render_cost > 0);
-
- // Could be part of the grand || collection above, but yanked out to make the logic visible
- if (!muted)
- {
- if (sMaxVisible > 0)
- { // They are above the visibilty rank - mute them
- muted = (mVisibilityRank > sMaxVisible);
- }
-
- // Always draw friends or those in IMs. Needs UI?
- if ((render_auto_mute_functions & 0x02) &&
- (muted || sMaxVisible == 0)) // Don't mute friends or IMs
- {
- muted = !(LLAvatarTracker::instance().isBuddy(getID()));
- if (muted)
- { // Not a friend, so they are muted ... are they in an IM?
- LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,getID());
- muted = !gIMMgr->hasSession(session_id);
- }
- }
- }
+ muted = ( (max_render_cost > 0 && mVisualComplexity > max_render_cost)
+ || (max_attachment_bytes > 0 && mAttachmentGeometryBytes > max_attachment_bytes)
+ || (max_attachment_area > 0.f && mAttachmentSurfaceArea > max_attachment_area)
+ || LLMuteList::getInstance()->isMuted(getID())
+ );
// Save visual mute state and set interval for updating
const F64 SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES = 1.5;
@@ -3154,7 +3124,6 @@ bool LLVOAvatar::isVisuallyMuted()
mCachedVisualMute = muted;
}
}
- }
}
return muted;
@@ -3310,18 +3279,18 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
{ // visually muted avatars update at 16 hz
mUpdatePeriod = 16;
}
- else if (mVisibilityRank <= LLVOAvatar::sMaxVisible ||
- mDrawable->mDistanceWRTCamera < 1.f + mag)
- { //first 25% of max visible avatars are not impostored
- //also, don't impostor avatars whose bounding box may be penetrating the
- //impostor camera near clip plane
+ else if ( mVisibilityRank <= LLVOAvatar::sMaxNonImpostors
+ || mDrawable->mDistanceWRTCamera < 1.f + mag)
+ { // first 25% of max visible avatars are not impostored
+ // also, don't impostor avatars whose bounding box may be penetrating the
+ // impostor camera near clip plane
mUpdatePeriod = 1;
}
- else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 4)
+ else if (mVisibilityRank > LLVOAvatar::sMaxNonImpostors * 4)
{ //background avatars are REALLY slow updating impostors
mUpdatePeriod = 16;
}
- else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 3)
+ else if (mVisibilityRank > LLVOAvatar::sMaxNonImpostors * 3)
{ //back 25% of max visible avatars are slow updating impostors
mUpdatePeriod = 8;
}
@@ -6236,26 +6205,14 @@ BOOL LLVOAvatar::isVisible() const
}
// Determine if we have enough avatar data to render
-BOOL LLVOAvatar::getIsCloud() const
+bool LLVOAvatar::getIsCloud() const
{
- // Do we have a shape?
- if ((const_cast<LLVOAvatar*>(this))->visualParamWeightsAreDefault())
- {
- return TRUE;
- }
-
- if (!isTextureDefined(TEX_LOWER_BAKED) ||
- !isTextureDefined(TEX_UPPER_BAKED) ||
- !isTextureDefined(TEX_HEAD_BAKED))
- {
- return TRUE;
- }
-
- if (isTooComplex())
- {
- return TRUE;
- }
- return FALSE;
+ return ( ((const_cast<LLVOAvatar*>(this))->visualParamWeightsAreDefault())// Do we have a shape?
+ || ( !isTextureDefined(TEX_LOWER_BAKED)
+ || !isTextureDefined(TEX_UPPER_BAKED)
+ || !isTextureDefined(TEX_HEAD_BAKED)
+ )
+ );
}
void LLVOAvatar::updateRezzedStatusTimers()
@@ -6433,7 +6390,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse
// returns true if the value has changed.
BOOL LLVOAvatar::updateIsFullyLoaded()
{
- const BOOL loading = getIsCloud();
+ const bool loading = getIsCloud();
updateRezzedStatusTimers();
updateRuthTimer(loading);
return processFullyLoadedChange(loading);
@@ -6503,16 +6460,6 @@ BOOL LLVOAvatar::isFullyLoaded() const
return (mRenderUnloadedAvatar || mFullyLoaded);
}
-bool LLVOAvatar::isTooComplex() const
-{
- if (gSavedSettings.getS32("RenderAvatarComplexityLimit") > 0 && mVisualComplexity >= gSavedSettings.getS32("RenderAvatarComplexityLimit"))
- {
- return true;
- }
-
- return false;
-}
-
//-----------------------------------------------------------------------------
// findMotion()
@@ -8171,39 +8118,134 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d
angle.mV[2] = da;
}
+// static
+const U32 LLVOAvatar::IMPOSTORS_OFF = 66; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors
+ * slider in panel_preferences_graphics1.xml */
-void LLVOAvatar::idleUpdateRenderCost()
+// static
+void LLVOAvatar::updateImpostorRendering(U32 newMaxNonImpostorsValue)
{
- static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
- static const U32 ARC_LIMIT = 20000;
-
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES))
- { //set debug text to attachment geometry bytes here so render cost will override
- setDebugText(llformat("%.1f KB, %.2f m^2", mAttachmentGeometryBytes/1024.f, mAttachmentSurfaceArea));
+ U32 oldmax = sMaxNonImpostors;
+ bool oldflg = sUseImpostors;
+
+ if (IMPOSTORS_OFF <= newMaxNonImpostorsValue)
+ {
+ sMaxNonImpostors = 0;
}
-
- if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME) && max_render_cost == 0)
+ else
{
- return;
+ sMaxNonImpostors = newMaxNonImpostorsValue;
}
+ // the sUseImpostors flag depends on whether or not sMaxNonImpostors is set to the no-limit value (0)
+ sUseImpostors = (0 != sMaxNonImpostors);
- calculateUpdateRenderCost(); // Update mVisualComplexity if needed
-
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME))
+ LL_DEBUGS("AvatarRender")
+ << "was " << (oldflg ? "use" : "don't use" ) << " impostors (max " << oldmax << "); "
+ << "now " << (sUseImpostors ? "use" : "don't use" ) << " impostors (max " << sMaxNonImpostors << "); "
+ << LL_ENDL;
+}
+
+
+void LLVOAvatar::idleUpdateRenderComplexity()
+{
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_AVATAR_DRAW_INFO))
{
- std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
- setDebugText(llformat("%s %d", viz_string.c_str(), mVisualComplexity));
- F32 green = 1.f-llclamp(((F32) mVisualComplexity-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);
- F32 red = llmin((F32) mVisualComplexity/(F32)ARC_LIMIT, 1.f);
- mText->setColor(LLColor4(red,green,0,1));
+ std::string info_line;
+ F32 red_level;
+ F32 green_level;
+ LLColor4 info_color;
+ LLFontGL::StyleFlags info_style;
+
+ if ( !mText )
+ {
+ initDebugTextHud();
+ mText->setFadeDistance(20.0, 5.0); // limit clutter in large crowds
+ }
+ else
+ {
+ mText->clearString(); // clear debug text
+ }
+
+ /*
+ * NOTE: the logic for whether or not each of the values below
+ * controls muting MUST match that in the isVisuallyMuted method.
+ */
+
+ // Render Complexity
+ calculateUpdateRenderComplexity(); // Update mVisualComplexity if needed
+
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
+ info_line = llformat("%d Complexity", mVisualComplexity);
+
+ if (max_render_cost != 0) // zero means don't care, so don't bother coloring based on this
+ {
+ green_level = 1.f-llclamp(((F32) mVisualComplexity-(F32)max_render_cost)/(F32)max_render_cost, 0.f, 1.f);
+ red_level = llmin((F32) mVisualComplexity/(F32)max_render_cost, 1.f);
+ info_color.set(red_level, green_level, 0.0, 1.0);
+ info_style = ( mVisualComplexity > max_render_cost
+ ? LLFontGL::BOLD : LLFontGL::NORMAL );
+ }
+ else
+ {
+ info_color.set(LLColor4::grey);
+ info_style = LLFontGL::NORMAL;
+ }
+ mText->addLine(info_line, info_color, info_style);
+
+ // Visual rank
+ info_line = llformat("%d rank", mVisibilityRank);
+ // Use grey for imposters, white for normal rendering or no impostors
+ info_color.set((sMaxNonImpostors > 0 && mVisibilityRank > sMaxNonImpostors) ? LLColor4::grey : LLColor4::white);
+ info_style = LLFontGL::NORMAL;
+ mText->addLine(info_line, info_color, info_style);
+
+ // Attachment Surface Area
+ static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0);
+ info_line = llformat("%.2f m^2", mAttachmentSurfaceArea);
+
+ if (max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this
+ {
+ green_level = 1.f-llclamp((mAttachmentSurfaceArea-max_attachment_area)/max_attachment_area, 0.f, 1.f);
+ red_level = llmin(mAttachmentSurfaceArea/max_attachment_area, 1.f);
+ info_color.set(red_level, green_level, 0.0, 1.0);
+ info_style = ( mAttachmentSurfaceArea > max_attachment_area
+ ? LLFontGL::BOLD : LLFontGL::NORMAL );
+
+ }
+ else
+ {
+ info_color.set(LLColor4::grey);
+ info_style = LLFontGL::NORMAL;
+ }
+ mText->addLine(info_line, info_color, info_style);
+
+ // Attachment byte limit
+ static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
+ info_line = llformat("%.1f KB", mAttachmentGeometryBytes/1024.f);
+ if (max_attachment_bytes != 0) // zero means don't care, so don't bother coloring based on this
+ {
+ green_level = 1.f-llclamp(((F32) mAttachmentGeometryBytes-(F32)max_attachment_bytes)/(F32)max_attachment_bytes, 0.f, 1.f);
+ red_level = llmin((F32) mAttachmentGeometryBytes/(F32)max_attachment_bytes, 1.f);
+ info_color.set(red_level, green_level, 0.0, 1.0);
+ info_style = ( mAttachmentGeometryBytes > max_attachment_bytes
+ ? LLFontGL::BOLD : LLFontGL::NORMAL );
+ }
+ else
+ {
+ info_color.set(LLColor4::grey);
+ info_style = LLFontGL::NORMAL;
+ }
+ mText->addLine(info_line, info_color, info_style);
+
+ updateText(); // corrects position
}
}
// Calculations for mVisualComplexity value
-void LLVOAvatar::calculateUpdateRenderCost()
+void LLVOAvatar::calculateUpdateRenderComplexity()
{
- static const U32 ARC_BODY_PART_COST = 200;
+ static const U32 COMPLEXITY_BODY_PART_COST = 200;
// Diagnostic list of all textures on our avatar
static std::set<LLUUID> all_textures;
@@ -8216,23 +8258,24 @@ void LLVOAvatar::calculateUpdateRenderCost()
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
- const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = LLAvatarAppearanceDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
+ const LLAvatarAppearanceDictionary::BakedEntry *baked_dict
+ = LLAvatarAppearanceDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
ETextureIndex tex_index = baked_dict->mTextureIndex;
if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT)))
{
if (isTextureVisible(tex_index))
{
- cost +=ARC_BODY_PART_COST;
+ cost +=COMPLEXITY_BODY_PART_COST;
}
}
}
- for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end();
- ++iter)
+ for (attachment_map_t::const_iterator attachment_point = mAttachmentPoints.begin();
+ attachment_point != mAttachmentPoints.end();
+ ++attachment_point)
{
- LLViewerJointAttachment* attachment = iter->second;
+ LLViewerJointAttachment* attachment = attachment_point->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
@@ -8262,10 +8305,12 @@ void LLVOAvatar::calculateUpdateRenderCost()
}
}
- for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ for (LLVOVolume::texture_cost_t::iterator volume_texture = textures.begin();
+ volume_texture != textures.end();
+ ++volume_texture)
{
// add the cost of each individual texture in the linkset
- cost += iter->second;
+ cost += volume_texture->second;
}
}
}
@@ -8318,11 +8363,11 @@ void LLVOAvatar::calculateUpdateRenderCost()
// static
-LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high)
+LLColor4 LLVOAvatar::calcMutedAVColor(const LLUUID av_id)
{
- F32 clamped_value = llmin(value, (F32) range_high);
- clamped_value = llmax(value, (F32) range_low);
- F32 spectrum = (clamped_value / range_high); // spectrum is between 0 and 1.f
+ // select a color based on the first byte of the agents uuid so any muted agent is always the same color
+ F32 color_value = (F32) (av_id.mData[0]);
+ F32 spectrum = (color_value / 256.0); // spectrum is between 0 and 1.f
// Array of colors. These are arranged so only one RGB color changes between each step,
// and it loops back to red so there is an even distribution. It is not a heat map
@@ -8336,12 +8381,12 @@ LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high)
LLColor4 new_color = lerp(*spectrum_color[spectrum_index_1], *spectrum_color[spectrum_index_2], fractBetween);
new_color.normalize();
- new_color *= 0.7f; // Tone it down a bit
+ new_color *= 0.5f; // Tone it down
- //LL_INFOS() << "From value " << std::setprecision(3) << value << " returning color " << new_color
- // << " using indexes " << spectrum_index_1 << ", " << spectrum_index_2
- // << " and fractBetween " << fractBetween
- // << LL_ENDL;
+ LL_DEBUGS("AvatarRender") << "avatar "<< av_id << " color " << std::setprecision(3) << color_value << " returning color " << new_color
+ << " using indexes " << spectrum_index_1 << ", " << spectrum_index_2
+ << " and fractBetween " << fractBetween
+ << LL_ENDL;
return new_color;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2e72633d39..aa1dc43a11 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -251,8 +251,8 @@ public:
// force all name tags to rebuild, useful when display names turned on/off
static void invalidateNameTags();
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
- void idleUpdateRenderCost();
- void calculateUpdateRenderCost();
+ void idleUpdateRenderComplexity();
+ void calculateUpdateRenderComplexity();
void updateVisualComplexity() { mVisualComplexityStale = TRUE; }
S32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
@@ -264,7 +264,7 @@ public:
S32 getUpdatePeriod() { return mUpdatePeriod; };
const LLColor4 & getMutedAVColor() { return mMutedAVColor; };
-
+ static void updateImpostorRendering(U32 newMaxNonImpostorsValue);
void idleUpdateBelowWater();
@@ -274,10 +274,12 @@ public:
public:
static S32 sRenderName;
static BOOL sRenderGroupTitles;
- static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible")
+ static const U32 IMPOSTORS_OFF; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors
+ * slider in panel_preferences_graphics1.xml */
+ static U32 sMaxNonImpostors; //(affected by control "RenderAvatarMaxNonImpostors")
static F32 sRenderDistance; //distance at which avatars will render.
static BOOL sShowAnimationDebug; // show animation debug info
- static BOOL sUseImpostors; //use impostors for far away avatars
+ static bool sUseImpostors; //use impostors for far away avatars
static BOOL sShowFootPlane; // show foot collision plane reported by server
static BOOL sShowCollisionVolumes; // show skeletal collision volumes
static BOOL sVisibleInFirstPerson;
@@ -301,9 +303,8 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
- bool isTooComplex() const;
bool visualParamWeightsAreDefault();
- virtual BOOL getIsCloud() const;
+ virtual bool getIsCloud() const;
BOOL isFullyTextured() const;
BOOL hasGray() const;
S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded.
@@ -319,7 +320,7 @@ public:
static void logPendingPhasesAllAvatars();
void logMetricsTimerRecord(const std::string& phase_name, F32 elapsed, bool completed);
- static LLColor4 calcMutedAVColor(F32 value, S32 range_low, S32 range_high);
+ static LLColor4 calcMutedAVColor(const LLUUID av_id);
protected:
LLViewerStats::PhaseMap& getPhases() { return mPhases; }
@@ -382,7 +383,7 @@ public:
public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
- bool isVisuallyMuted();
+ bool isVisuallyMuted() const;
void setCachedVisualMute(bool muted) { mCachedVisualMute = muted; };
void forceUpdateVisualMuteSettings();
@@ -419,8 +420,9 @@ private:
S32 mUpdatePeriod;
S32 mNumInitFaces; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer.
- bool mCachedVisualMute; // cached return value for isVisuallyMuted()
- F64 mCachedVisualMuteUpdateTime; // Time to update mCachedVisualMute
+ // the isVisuallyMuted method uses these mutable values to avoid recalculating too frequently
+ mutable bool mCachedVisualMute; // cached return value for isVisuallyMuted()
+ mutable F64 mCachedVisualMuteUpdateTime; // Time to update mCachedVisualMute
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 1e9945b514..d0bdd5bc03 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1916,7 +1916,7 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount()
LL_INFOS() << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << LL_ENDL;
}
-BOOL LLVOAvatarSelf::getIsCloud() const
+bool LLVOAvatarSelf::getIsCloud() const
{
// Let people know why they're clouded without spamming them into oblivion.
bool do_warn = false;
@@ -1944,7 +1944,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
<< (skin_count ? "" : "SKIN ")
<< LL_ENDL;
}
- return TRUE;
+ return true;
}
if (!isTextureDefined(TEX_HAIR, 0))
@@ -1953,7 +1953,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
LL_INFOS() << "Self is clouded because of no hair texture" << LL_ENDL;
}
- return TRUE;
+ return true;
}
if (!mPreviousFullyLoaded)
@@ -1965,7 +1965,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
LL_INFOS() << "Self is clouded because lower textures not baked" << LL_ENDL;
}
- return TRUE;
+ return true;
}
if (!isLocalTextureDataAvailable(getLayerSet(BAKED_UPPER)) &&
@@ -1975,7 +1975,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
{
LL_INFOS() << "Self is clouded because upper textures not baked" << LL_ENDL;
}
- return TRUE;
+ return true;
}
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
@@ -1996,13 +1996,13 @@ BOOL LLVOAvatarSelf::getIsCloud() const
LL_INFOS() << "Self is clouded because texture at index " << i
<< " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << LL_ENDL;
}
- return TRUE;
+ return true;
}
}
LL_DEBUGS() << "Avatar de-clouded" << LL_ENDL;
}
- return FALSE;
+ return false;
}
/*static*/
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index dc5e64d547..73c5384b60 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -132,7 +132,7 @@ public:
// Loading state
//--------------------------------------------------------------------
public:
- /*virtual*/ BOOL getIsCloud() const;
+ /*virtual*/ bool getIsCloud() const;
//--------------------------------------------------------------------
// Region state
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 03712c1065..6002b5a4eb 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -569,7 +569,7 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaDeferred");
connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred");
connectRefreshCachedSettingsSafe("RenderUseFarClip");
- connectRefreshCachedSettingsSafe("RenderAvatarMaxVisible");
+ connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors");
connectRefreshCachedSettingsSafe("RenderDelayVBUpdate");
connectRefreshCachedSettingsSafe("UseOcclusion");
connectRefreshCachedSettingsSafe("VertexShaderEnable");
@@ -1081,7 +1081,8 @@ void LLPipeline::refreshCachedSettings()
LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
- LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
+ LLVOAvatar::sMaxNonImpostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors");
+ LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors);
LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
LLPipeline::sUseOcclusion =
@@ -11357,7 +11358,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE);
markVisible(avatar->mDrawable, *viewer_camera);
- LLVOAvatar::sUseImpostors = FALSE;
+ LLVOAvatar::sUseImpostors = false; // @TODO why?
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
@@ -11594,7 +11595,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
- LLVOAvatar::sUseImpostors = TRUE;
+ LLVOAvatar::sUseImpostors = true; // @TODO why?
sUseOcclusion = occlusion;
sReflectionRender = FALSE;
sImpostorRender = FALSE;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index ce2f4b17b1..869fe6ffae 100755
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -518,7 +518,7 @@ public:
RENDER_DEBUG_BATCH_SIZE = 0x00004000,
RENDER_DEBUG_ALPHA_BINS = 0x00008000,
RENDER_DEBUG_RAYCAST = 0x00010000,
- RENDER_DEBUG_SHAME = 0x00020000,
+ RENDER_DEBUG_AVATAR_DRAW_INFO = 0x00020000,
RENDER_DEBUG_SHADOW_FRUSTA = 0x00040000,
RENDER_DEBUG_SCULPTED = 0x00080000,
RENDER_DEBUG_AVATAR_VOLUME = 0x00100000,
diff --git a/indra/newview/skins/default/textures/icons/Presets_Icon.png b/indra/newview/skins/default/textures/icons/Presets_Icon.png
new file mode 100644
index 0000000000..380d3812d8
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Presets_Icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 9c2d55e7b4..90c4500671 100755
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -204,6 +204,8 @@ with the same filename but different name
<texture name="Facebook_Icon" file_name="icons/Facebook.png" preload="false" />
+ <texture name="Presets_Icon" file_name="icons/Presets_Icon.png" preload="true" />
+
<texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="false" />
<texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" />
<texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
new file mode 100644
index 0000000000..0688fdb42c
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<floater
+ legacy_header_height="18"
+ height="130"
+ help_topic="floater_delete_preset"
+ layout="topleft"
+ name="Delete Pref Preset"
+ save_rect="true"
+ title="DELETE PREF PRESET"
+ width="300">
+
+ <string name="title_graphic">Delete Graphic Preset</string>
+ <string name="title_camera">Delete Camera Preset</string>
+
+ <text
+ follows="top|left|right"
+ height="10"
+ layout="topleft"
+ left="20"
+ name="Preset"
+ top="30"
+ width="200">
+ Select a preset
+ </text>
+ <combo_box
+ follows="top|left"
+ layout="topleft"
+ left="20"
+ name="preset_combo"
+ top_delta="20"
+ width="200"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Delete"
+ layout="topleft"
+ top_delta="40"
+ left="20"
+ name="delete"
+ width="70"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="20"
+ name="cancel"
+ width="70"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
deleted file mode 100755
index 9deb0d2030..0000000000
--- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="224"
- layout="topleft"
- name="Hardware Settings Floater"
- help_topic="hardware_settings_floater"
- title="HARDWARE SETTINGS"
- width="615">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="10"
- name="Filtering:"
- top="20"
- width="188">
- Filtering:
- </text>
- <check_box
- control_name="RenderAnisotropic"
- height="16"
- label="Anisotropic Filtering (slower when enabled)"
- layout="topleft"
- left_pad="10"
- name="ani"
- top_delta="0"
- width="256" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="10"
- name="antialiasing label"
- top_pad="7"
- width="188">
- Antialiasing:
- </text>
- <combo_box
- control_name="RenderFSAASamples"
- height="22"
- initial_value="false"
- label="Antialiasing"
- layout="topleft"
- left_pad="10"
- name="fsaa"
- top_delta="0"
- width="130">
- <combo_box.item
- label="Disabled"
- name="FSAADisabled"
- value="0" />
- <combo_box.item
- label="2x"
- name="2x"
- value="2" />
- <combo_box.item
- label="4x"
- name="4x"
- value="4" />
- <combo_box.item
- label="8x"
- name="8x"
- value="8" />
- <combo_box.item
- label="16x"
- name="16x"
- value="16" />
- </combo_box>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_pad="10"
- name="antialiasing restart"
- top_delta="0"
- width="230">
- (requires viewer restart)
- </text>
- <spinner
- control_name="RenderGamma"
- decimal_digits="2"
- follows="left|top"
- height="16"
- increment="0.01"
- initial_value="1"
- label="Gamma:"
- label_width="198"
- layout="topleft"
- left="10"
- max_val="2"
- name="gamma"
- top_pad="11"
- width="262" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_pad="10"
- name="(brightness, lower is brighter)"
- top_delta="2"
- width="385">
- (0 = default brightness, lower = brighter)
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="Enable VBO:"
- top_pad="10"
- width="188">
- Enable VBO:
- </text>
- <check_box
- control_name="RenderVBOEnable"
- height="16"
- initial_value="true"
- label="Enable OpenGL Vertex Buffer Objects"
- layout="topleft"
- left_pad="10"
- name="vbo"
- tool_tip="Enabling this on modern hardware gives a performance gain. However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled."
- width="315" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="tc label"
- top_pad="10"
- width="188">
- Enable S3TC:
- </text>
- <check_box
- control_name="RenderCompressTextures"
- height="16"
- initial_value="true"
- label="Enable Texture Compression (requires restart)"
- layout="topleft"
- left_pad="10"
- name="texture compression"
- tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
- width="315" />
- <slider
- control_name="TextureMemory"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="16"
- initial_value="32"
- label="Texture Memory (MB):"
- label_width="195"
- layout="topleft"
- left="10"
- max_val="4096"
- name="GraphicsCardTextureMemory"
- tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry."
- top_pad="10"
- width="360" />
- <spinner
- control_name="RenderFogRatio"
- decimal_digits="1"
- follows="left|top"
- height="22"
- initial_value="4"
- label="Fog Distance Ratio:"
- label_width="198"
- layout="topleft"
- left_delta="0"
- max_val="10"
- min_val="0.5"
- name="fog"
- top_pad="7"
- width="262" />
- <button
- follows="right|bottom"
- height="22"
- label="OK"
- label_selected="OK"
- layout="topleft"
- left="-102"
- name="OK"
- top="192"
- width="90" />
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
new file mode 100644
index 0000000000..5f2eb770e2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<floater
+ legacy_header_height="18"
+ height="130"
+ help_topic="floater_load_preset"
+ layout="topleft"
+ name="Load Pref Preset"
+ save_rect="true"
+ title="LOAD PREF PRESET"
+ width="300">
+
+ <string name="title_graphic">Load Graphic Preset</string>
+ <string name="title_camera">Load Camera Preset</string>
+
+ <text
+ follows="top|left|right"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="Preset"
+ top="30"
+ width="200">
+ Select a preset
+ </text>
+ <combo_box
+ follows="top|left"
+ layout="topleft"
+ left="20"
+ name="preset_combo"
+ top_delta="20"
+ width="200"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="OK"
+ layout="topleft"
+ top_delta="40"
+ left="20"
+ name="ok"
+ width="70"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="20"
+ name="cancel"
+ width="70"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index bd6faf4ed8..638a4e2da8 100755
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -11,7 +11,7 @@
single_instance="true"
title="PREFERENCES"
width="658">
- <button
+ <button
follows="right|bottom"
height="23"
label="OK"
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
new file mode 100644
index 0000000000..766adb8a34
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -0,0 +1,918 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ height="680"
+ layout="topleft"
+ name="prefs_graphics_advanced"
+ help_topic="Preferences_Graphics_Advanced"
+ single_instance="true"
+ save_rect="true"
+ title="ADVANCED GRAPHICS PREFERENCES"
+ width="400">
+
+<!-- This block shows Advanced Settings -->
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="GeneralText"
+ top="5"
+ left="10"
+ width="128">
+ General
+ </text>
+
+ <slider
+ control_name="RenderFarClip"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="8"
+ initial_value="160"
+ label="Draw distance:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ min_val="64"
+ max_val="512"
+ name="DrawDistance"
+ top_delta="16"
+ width="330" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="DrawDistanceMeterText2"
+ top_delta="0"
+ left_delta="330"
+ width="20">
+ m
+ </text>
+
+ <slider
+ control_name="RenderMaxPartCount"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="256"
+ initial_value="4096"
+ label="Max. particle count:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ max_val="8192"
+ name="MaxParticleCount"
+ top_delta="16"
+ width="336" />
+
+ <slider
+ control_name="RenderGlowResolutionPow"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="1"
+ initial_value="8"
+ label="Post process quality:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ min_val="8"
+ max_val="9"
+ name="RenderPostProcess"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="PostProcessText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="PostProcessText"
+ top_delta="0"
+ left_delta="304"
+ width="65">
+ Low
+ </text>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="AvatarText"
+ top_delta="20"
+ left="10"
+ width="128">
+ Avatar
+ </text>
+
+ <slider
+ control_name="IndirectMaxComplexity"
+ tool_tip="Controls at what point a visually complex avatar is drawn as a jellybaby"
+ follows="left|top"
+ height="16"
+ initial_value="101"
+ increment="1"
+ label="Maximum complexity:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ min_val="1"
+ max_val="101"
+ name="IndirectMaxComplexity"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateIndirectMaxComplexity"
+ parameter="IndirectMaxComlexityText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="0"
+ left_delta="304"
+ text_readonly_color="LabelDisabledColor"
+ name="IndirectMaxComplexityText"
+ width="65">
+ 0
+ </text>
+
+ <slider
+ control_name="IndirectMaxNonImpostors"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="1"
+ initial_value="12"
+ label="Max. # of non-impostors:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ min_val="1"
+ max_val="66"
+ name="IndirectMaxNonImpostors"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateIndirectMaxNonImpostors"
+ parameter="IndirectNonImpostorsText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="0"
+ left_delta="304"
+ text_readonly_color="LabelDisabledColor"
+ name="IndirectMaxNonImpostorsText"
+ width="65">
+ 0
+ </text>
+
+ <slider
+ control_name="RenderAvatarLODFactor"
+ follows="left|top"
+ height="16"
+ increment="0.125"
+ initial_value="160"
+ label="Detail:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ name="AvatarMeshDetail"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="AvatarMeshDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="AvatarMeshDetailText"
+ top_delta="0"
+ left_delta="304"
+ width="65">
+ Low
+ </text>
+
+ <slider
+ control_name="RenderAvatarPhysicsLODFactor"
+ follows="left|top"
+ height="16"
+ initial_value="100"
+ increment=".05"
+ label="Physics:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ name="AvatarPhysicsDetail"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="AvatarPhysicsDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="0"
+ left_delta="304"
+ name="AvatarPhysicsDetailText"
+ width="65">
+ Low
+ </text>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="ShadersText"
+ top_delta="20"
+ left="10"
+ width="128">
+ Shaders
+ </text>
+
+ <check_box
+ control_name="RenderTransparentWater"
+ height="16"
+ initial_value="true"
+ label="Transparent Water"
+ layout="topleft"
+ left="30"
+ name="TransparentWater"
+ top_delta="16"
+ width="300" />
+
+ <check_box
+ control_name="RenderObjectBump"
+ height="16"
+ initial_value="true"
+ label="Bump mapping and shiny"
+ layout="topleft"
+ left="30"
+ name="BumpShiny"
+ top_delta="16"
+ width="300">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <check_box
+ control_name="RenderLocalLights"
+ height="16"
+ initial_value="true"
+ label="Local Lights"
+ layout="topleft"
+ left="30"
+ name="LocalLights"
+ top_delta="16"
+ width="300" />
+
+ <check_box
+ control_name="VertexShaderEnable"
+ height="16"
+ initial_value="true"
+ label="Basic shaders"
+ layout="topleft"
+ left="30"
+ name="BasicShaders"
+ tool_tip="Disabling this option may prevent some graphics card drivers from crashing"
+ top_delta="16"
+ width="300">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <slider
+ control_name="RenderTerrainDetail"
+ follows="left|top"
+ height="16"
+ label="Terrain Detail:"
+ label_width="165"
+ layout="topleft"
+ left="50"
+ show_text="false"
+ initial_value="0"
+ increment="1"
+ min_val="0"
+ max_val="1"
+ name="TerrainDetail"
+ top_delta="16"
+ width="280" >
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="TerrainDetail" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="0"
+ left_delta="284"
+ name="TerrainDetailText"
+ text_readonly_color="LabelDisabledColor"
+ width="65">
+ Low
+ </text>
+
+ <check_box
+ control_name="RenderAvatarVP"
+ height="16"
+ initial_value="true"
+ label="Avatar Hardware skinning"
+ layout="topleft"
+ left="50"
+ name="AvatarVertexProgram"
+ top_delta="16"
+ width="280">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <check_box
+ control_name="RenderAvatarCloth"
+ height="16"
+ initial_value="true"
+ label="Avatar cloth"
+ layout="topleft"
+ left="50"
+ name="AvatarCloth"
+ top_delta="16"
+ width="280" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="ReflectionsText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="16"
+ left="50"
+ width="128">
+ Water Reflections:
+ </text>
+ <combo_box
+ control_name="RenderReflectionDetail"
+ height="18"
+ layout="topleft"
+ left_delta="170"
+ top_delta="0"
+ name="Reflections"
+ width="150">
+ <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>
+
+ <check_box
+ control_name="WindLightUseAtmosShaders"
+ height="16"
+ initial_value="true"
+ label="Atmospheric shaders"
+ layout="topleft"
+ left="50"
+ name="WindLightUseAtmosShaders"
+ top_delta="16"
+ width="280">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <slider
+ control_name="WLSkyDetail"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="8"
+ initial_value="160"
+ label="Sky:"
+ label_width="145"
+ layout="topleft"
+ left="70"
+ min_val="16"
+ max_val="128"
+ name="SkyMeshDetail"
+ show_text="false"
+ top_delta="16"
+ width="260">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="SkyMeshDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_delta="264"
+ name="SkyMeshDetailText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="0"
+ width="65">
+ Low
+ </text>
+
+ <check_box
+ control_name="RenderDeferred"
+ height="16"
+ initial_value="true"
+ label="Advanced Lighting Model"
+ layout="topleft"
+ left="70"
+ name="UseLightShaders"
+ top_delta="16"
+ width="260">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <check_box
+ control_name="RenderDeferredSSAO"
+ height="16"
+ initial_value="true"
+ label="Ambient Occlusion"
+ layout="topleft"
+ left="90"
+ name="UseSSAO"
+ top_delta="16"
+ width="240">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <check_box
+ control_name="RenderDepthOfField"
+ height="16"
+ initial_value="true"
+ label="Depth of Field"
+ layout="topleft"
+ left="90"
+ name="UseDoF"
+ top_delta="16"
+ width="240">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="90"
+ name="RenderShadowDetailText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="16"
+ width="128">
+ Shadows:
+ </text>
+ <combo_box
+ control_name="RenderShadowDetail"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ 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
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="AvatarText"
+ top_delta="20"
+ left="10"
+ width="128">
+ Mesh
+ </text>
+
+ <slider
+ control_name="RenderTerrainLODFactor"
+ follows="left|top"
+ height="16"
+ increment="0.125"
+ initial_value="160"
+ label="Terrain Mesh Detail:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ min_val="1"
+ max_val="2"
+ name="TerrainMeshDetail"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="TerrainMeshDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="TerrainMeshDetailText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="0"
+ left_delta="304"
+ width="65">
+ Low
+ </text>
+
+ <slider
+ control_name="RenderTreeLODFactor"
+ follows="left|top"
+ height="16"
+ increment="0.125"
+ initial_value="160"
+ label="Trees:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ name="TreeMeshDetail"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="TreeMeshDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="TreeMeshDetailText"
+ top_delta="0"
+ left_delta="304"
+ width="65">
+ Low
+ </text>
+
+ <slider
+ control_name="RenderVolumeLODFactor"
+ follows="left|top"
+ height="16"
+ increment="0.125"
+ initial_value="160"
+ label="Objects:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ max_val="2"
+ name="ObjectMeshDetail"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="ObjectMeshDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="ObjectMeshDetailText"
+ top_delta="0"
+ left_delta="304"
+ width="65">
+ Low
+ </text>
+
+ <slider
+ control_name="RenderFlexTimeFactor"
+ follows="left|top"
+ height="16"
+ initial_value="160"
+ label="Flexiprims:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ name="FlexibleMeshDetail"
+ show_text="false"
+ top_delta="16"
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="FlexibleMeshDetailText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="FlexibleMeshDetailText"
+ top_delta="0"
+ left_delta="304"
+ width="65">
+ Low
+ </text>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="ShadersText"
+ top_delta="20"
+ left="10"
+ width="128">
+ Hardware
+ </text>
+
+ <slider
+ control_name="TextureMemory"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="16"
+ initial_value="32"
+ label="Texture Memory (MB):"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ max_val="4096"
+ name="GraphicsCardTextureMemory"
+ tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry."
+ top_delta="16"
+ width="335" />
+
+ <slider
+ control_name="RenderFogRatio"
+ follows="left|top"
+ height="16"
+ initial_value="4"
+ decimal_digits="1"
+ label="Fog Distance Ratio:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ name="fog"
+ min_val="0.5"
+ max_val="10"
+ increment="0.1"
+ top_delta="16"
+ width="332" />
+
+ <slider
+ control_name="RenderGamma"
+ follows="left|top"
+ height="16"
+ initial_value="1"
+ decimal_digits="2"
+ label="Gamma:"
+ label_width="185"
+ layout="topleft"
+ left="30"
+ name="gamma"
+ min_val="0"
+ max_val="2"
+ increment="0.01"
+ top_delta="16"
+ width="332" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="30"
+ name="(brightness, lower is brighter)"
+ top_delta="16"
+ width="260">
+ (0 = default brightness, lower = brighter)
+ </text>
+
+ <check_box
+ control_name="RenderAnisotropic"
+ height="16"
+ label="Anisotropic Filtering (slower when enabled)"
+ layout="topleft"
+ left="30"
+ name="ani"
+ top_delta="16"
+ width="256" />
+
+ <check_box
+ control_name="RenderVBOEnable"
+ height="16"
+ initial_value="true"
+ label="Enable OpenGL Vertex Buffer Objects"
+ layout="topleft"
+ left="30"
+ top_delta="16"
+ name="vbo"
+ tool_tip="Enabling this on modern hardware gives a performance gain. However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled."
+ width="315" />
+
+ <check_box
+ control_name="RenderCompressTextures"
+ height="16"
+ initial_value="true"
+ label="Enable Texture Compression (requires restart)"
+ layout="topleft"
+ left="30"
+ top_delta="16"
+ name="texture compression"
+ tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
+ width="315" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="30"
+ name="antialiasing label"
+ top_delta="20"
+ width="100">
+ Antialiasing:
+ </text>
+ <combo_box
+ control_name="RenderFSAASamples"
+ height="20"
+ initial_value="false"
+ label="Antialiasing"
+ layout="topleft"
+ left_pad="40"
+ name="fsaa"
+ top_delta="0"
+ width="90">
+ <combo_box.item
+ label="Disabled"
+ name="FSAADisabled"
+ value="0" />
+ <combo_box.item
+ label="2x"
+ name="2x"
+ value="2" />
+ <combo_box.item
+ label="4x"
+ name="4x"
+ value="4" />
+ <combo_box.item
+ label="8x"
+ name="8x"
+ value="8" />
+ <combo_box.item
+ label="16x"
+ name="16x"
+ value="16" />
+ </combo_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_pad="10"
+ name="antialiasing restart"
+ top_delta="0"
+ width="130">
+ (requires restart)
+ </text>
+<!-- End of Advanced Settings block -->
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Reset to recommended settings"
+ layout="topleft"
+ left="10"
+ name="Defaults"
+ top_delta="25"
+ width="210">
+ <button.commit_callback
+ function="Pref.HardwareDefaults" />
+ </button>
+
+ <button
+ follows="right|bottom"
+ height="23"
+ label="OK"
+ label_selected="OK"
+ layout="topleft"
+ left_pad="5"
+ name="OK"
+ top_delta="0"
+ width="80">
+ <button.commit_callback
+ function="Pref.OK"
+ parameter="closeadvanced" />
+ </button>
+
+ <button
+ follows="right|bottom"
+ height="23"
+ label="Cancel"
+ label_selected="Cancel"
+ layout="topleft"
+ left_pad="5"
+ name="Cancel"
+ top_delta="0"
+ width="80" >
+ <button.commit_callback
+ function="Pref.Cancel"
+ parameter="closeadvanced" />
+ </button>
+
+<!-- These two check boxes are dummies and will never be displayed. They are here so the control variables
+are saved in a preset file. -->
+ <check_box
+ control_name="RenderAvatarMaxComplexity"
+ visible="false"
+ height="0"
+ label="RenderAvatarMaxComplexity"
+ layout="topleft"
+ left="0"
+ name="RenderAvatarMaxNonImpostors"
+ top_delta="0"
+ width="0">
+ </check_box>
+
+ <check_box
+ control_name="RenderAvatarMaxNonImpostors"
+ visible="false"
+ height="0"
+ label="RenderAvatarMaxNonImpostors"
+ layout="topleft"
+ left="0"
+ name="RenderAvatarMaxNonImpostors"
+ top_delta="0"
+ width="0">
+ </check_box>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
new file mode 100644
index 0000000000..7dee28eff3
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<floater
+ legacy_header_height="18"
+ height="145"
+ help_topic="floater_save_preset"
+ layout="topleft"
+ name="Save Pref Preset"
+ save_rect="true"
+ title="SAVE PREF PRESET"
+ width="300">
+
+ <string name="title_graphic">Save Graphic Preset</string>
+ <string name="title_camera">Save Camera Preset</string>
+
+ <text
+ follows="top|left|right"
+ height="32"
+ layout="topleft"
+ word_wrap="true"
+ left="20"
+ name="Preset"
+ top="30"
+ width="200">
+ Type a name for the preset or choose an existing preset.
+ </text>
+ <combo_box
+ follows="top|left"
+ layout="topleft"
+ left="20"
+ name="preset_combo"
+ top_delta="35"
+ allow_text_entry="true"
+ width="200"/>
+ <button
+ follows="top|left"
+ height="23"
+ label="Save"
+ layout="topleft"
+ top_delta="40"
+ left="20"
+ name="save"
+ width="70"/>
+ <button
+ follows="bottom|right"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="20"
+ name="cancel"
+ width="70"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 560f81a6fd..448d3f2ebe 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1533,14 +1533,14 @@
parameter="scene_load_stats" />
</menu_item_call>
<menu_item_check
- label="Show Draw Weight for Avatars"
- name="Avatar Rendering Cost">
+ label="Show avatar comlexity information"
+ name="Avatar Draw Info">
<menu_item_check.on_check
function="Advanced.CheckInfoDisplay"
- parameter="shame" />
+ parameter="avatardrawinfo" />
<menu_item_check.on_click
function="Advanced.ToggleInfoDisplay"
- parameter="shame" />
+ parameter="avatardrawinfo" />
</menu_item_check>
</menu>
<menu
@@ -2671,26 +2671,6 @@
function="Advanced.ToggleInfoDisplay"
parameter="wind vectors" />
</menu_item_check>
- <menu_item_check
- label="Render Complexity"
- name="rendercomplexity">
- <menu_item_check.on_check
- function="Advanced.CheckInfoDisplay"
- parameter="rendercomplexity" />
- <menu_item_check.on_click
- function="Advanced.ToggleInfoDisplay"
- parameter="rendercomplexity" />
- </menu_item_check>
- <menu_item_check
- label="Attachment Bytes"
- name="attachment bytes">
- <menu_item_check.on_check
- function="Advanced.CheckInfoDisplay"
- parameter="attachment bytes" />
- <menu_item_check.on_click
- function="Advanced.ToggleInfoDisplay"
- parameter="attachment bytes" />
- </menu_item_check>
<menu_item_check
label="Sculpt"
name="Sculpt">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index b4d8046d18..82bd29499d 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7677,6 +7677,20 @@ Attachment has been saved.
</notification>
<notification
+ icon="notifytip.tga"
+ name="PresetNotSaved"
+ type="notifytip">
+Error saving preset [NAME].
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="PresetNotDeleted"
+ type="notifytip">
+Error deleting preset [NAME].
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="UnableToFindHelpTopic"
type="alertmodal">
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 6c485c0595..6cf9045f2a 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -9,905 +9,325 @@
name="Display panel"
top="1"
width="517">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="30"
- name="QualitySpeed"
- top="10"
- width="400">
- Quality and speed:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="right"
- height="12"
- layout="topleft"
- left="35"
- name="FasterText"
- top_pad="4"
- width="80">
- Faster
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="360"
- name="BetterText"
- top_delta="0"
- width="100">
- Better
- </text>
- <icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left="128"
- name="LowGraphicsDivet"
- top_delta="-2"
- width="2" />
+
+ <text
+ follows="top|left|right"
+ height="16"
+ layout="topleft"
+ left="5"
+ top="5"
+ width="100">
+ Preset in use:
+ </text>
+
+ <text
+ follows="top|left|right"
+ height="16"
+ layout="topleft"
+ left_delta="110"
+ name="preset_text"
+ top="5"
+ width="120">
+ (None)
+ </text>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left="10"
+ name="QualitySpeed"
+ top_delta="35"
+ width="400">
+ Quality &amp; speed:
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left="118"
+ name="ShadersPrefText"
+ top_delta="0"
+ width="80">
+ Low
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left_delta="87"
+ name="ShadersPrefText2"
+ top_delta="0"
+ width="80">
+ Mid
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left_delta="87"
+ name="ShadersPrefText3"
+ top_delta="0"
+ width="80">
+ High
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left_delta="85"
+ name="ShadersPrefText4"
+ top_delta="0"
+ width="80">
+ Ultra
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="right"
+ height="12"
+ layout="topleft"
+ left="65"
+ name="FasterText"
+ top_pad="4"
+ width="80">
+ Faster
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left_delta="360"
+ name="BetterText"
+ top_delta="0"
+ width="100">
+ Better
+ </text>
+ <icon
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left="158"
+ name="LowGraphicsDivet"
+ top_delta="-2"
+ width="2" />
+ <icon
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left_pad="41"
+ name="LowMidGraphicsDivet"
+ width="2" />
+ <icon
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left_pad="41"
+ name="MidGraphicsDivet"
+ top_delta="0"
+ width="2" />
<icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left_pad="41"
- name="LowMidGraphicsDivet"
- width="2" />
- <icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left_pad="41"
- name="MidGraphicsDivet"
- top_delta="0"
- width="2" />
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left_pad="41"
+ name="MidHighGraphicsDivet"
+ top_delta="0"
+ width="2" />
<icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left_pad="41"
- name="MidHighGraphicsDivet"
- top_delta="0"
- width="2" />
- <icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left_pad="41"
- name="HighGraphicsDivet"
- top_delta="0"
- width="2" />
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left_pad="41"
+ name="HighGraphicsDivet"
+ top_delta="0"
+ width="2" />
<icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left_pad="41"
- name="HighUltraGraphicsDivet"
- top_delta="0"
- width="2" />
- <icon
- color="DkGray"
- height="14"
- image_name="Rounded_Square"
- layout="topleft"
- left_pad="41"
- name="UltraGraphicsDivet"
- top_delta="0"
- width="2" />
- <slider
- control_name="RenderQualityPerformance"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="0"
- layout="topleft"
- left="120"
- max_val="6"
- name="QualityPerformanceSelection"
- show_text="false"
- top_delta="-2"
- width="275">
- <slider.commit_callback
- function="Pref.QualityPerformance"/>
- </slider>
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="center"
- height="12"
- layout="topleft"
- left="88"
- name="ShadersPrefText"
- top_delta="20"
- width="80">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="center"
- height="12"
- layout="topleft"
- left_delta="87"
- name="ShadersPrefText2"
- top_delta="0"
- width="80">
- Mid
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="center"
- height="12"
- layout="topleft"
- left_delta="87"
- name="ShadersPrefText3"
- top_delta="0"
- width="80">
- High
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="center"
- height="12"
- layout="topleft"
- left_delta="85"
- name="ShadersPrefText4"
- top_delta="0"
- width="80">
- Ultra
- </text>
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left_pad="41"
+ name="HighUltraGraphicsDivet"
+ top_delta="0"
+ width="2" />
+ <icon
+ color="DkGray"
+ height="14"
+ image_name="Rounded_Square"
+ layout="topleft"
+ left_pad="41"
+ name="UltraGraphicsDivet"
+ top_delta="0"
+ width="2" />
<slider
- control_name="RenderAvatarLODFactor"
- invisiblity_control="ShowAdvancedGraphicsSettings"
- follows="left|top"
- height="16"
- increment="0.125"
- initial_value="160"
- label="Avatar detail:"
- label_width="90"
- layout="topleft"
- left="30"
- name="AvatarMeshDetail2"
- show_text="false"
- top="72"
- width="300">
+ control_name="RenderQualityPerformance"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="1"
+ initial_value="0"
+ layout="topleft"
+ left="150"
+ max_val="6"
+ name="QualityPerformanceSelection"
+ show_text="false"
+ top_delta="-2"
+ width="275">
<slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="AvatarMeshDetailText2" />
+ function="Pref.QualityPerformance"/>
</slider>
- <text
- type="string"
- invisiblity_control="ShowAdvancedGraphicsSettings"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- name="AvatarMeshDetailText2"
- top_delta="0"
- left_delta="304"
- width="128">
- Low
- </text>
+
+<!-- This block shows Basic Settings -->
+
<slider
- control_name="RenderFarClip"
- invisiblity_control="ShowAdvancedGraphicsSettings"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="8"
- initial_value="160"
- label="Draw distance:"
- label_width="90"
- layout="topleft"
- left="30"
- max_val="512"
- min_val="64"
- name="DrawDistance"
- top="110"
- width="330" />
+ control_name="RenderFarClip"
+ decimal_digits="0"
+ follows="left|top"
+ height="16"
+ increment="8"
+ initial_value="160"
+ label="Draw distance:"
+ label_width="90"
+ layout="topleft"
+ left="30"
+ min_val="64"
+ max_val="512"
+ name="DrawDistance"
+ top_delta="40"
+ width="330" />
<text
- type="string"
- invisiblity_control="ShowAdvancedGraphicsSettings"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="330"
- name="DrawDistanceMeterText2"
- top_delta="0"
- width="128">
- m
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left_delta="330"
+ name="DrawDistanceMeterText2"
+ top_delta="0"
+ width="128">
+ m
</text>
+
<check_box
- control_name="RenderDeferred"
- invisiblity_control="ShowAdvancedGraphicsSettings"
- height="16"
- initial_value="true"
- label="Advanced Lighting Model"
- layout="topleft"
- left="30"
- name="UseLightShaders2"
- top="148"
- width="256">
+ control_name="WindLightUseAtmosShaders"
+ height="16"
+ initial_value="true"
+ label="Atmospheric shaders"
+ layout="topleft"
+ left="30"
+ name="WindLightUseAtmosShaders"
+ top_delta="20"
+ width="280">
<check_box.commit_callback
function="Pref.VertexShaderEnable" />
</check_box>
- <panel
- visiblity_control="ShowAdvancedGraphicsSettings"
- border="false"
- follows="top|left"
- height="300"
- label="CustomGraphics"
- layout="topleft"
- left="5"
- name="CustomGraphics Panel"
- top="76"
- width="485">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="5"
- name="ShadersText"
- top="3"
- width="128">
- Shaders:
- </text>
- <check_box
- control_name="RenderTransparentWater"
- height="16"
- initial_value="true"
- label="Transparent Water"
- layout="topleft"
- left_delta="0"
- name="TransparentWater"
- top_pad="7"
- width="256" />
- <check_box
- control_name="RenderObjectBump"
- height="16"
- initial_value="true"
- label="Bump mapping and shiny"
- layout="topleft"
- left_delta="0"
- name="BumpShiny"
- top_pad="1"
- width="256">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <check_box
- control_name="RenderLocalLights"
- height="16"
- initial_value="true"
- label="Local Lights"
- layout="topleft"
- left_delta="0"
- name="LocalLights"
- top_pad="1"
- width="256" />
- <check_box
- control_name="VertexShaderEnable"
- height="16"
- initial_value="true"
- label="Basic shaders"
- layout="topleft"
- left_delta="0"
- name="BasicShaders"
- tool_tip="Disabling this option may prevent some graphics card drivers from crashing"
- top_pad="1"
- width="315">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <check_box
- control_name="WindLightUseAtmosShaders"
- height="16"
- initial_value="true"
- label="Atmospheric shaders"
- layout="topleft"
- left_delta="0"
- name="WindLightUseAtmosShaders"
- top_pad="1"
- width="256">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <check_box
- control_name="RenderDeferred"
- height="16"
- initial_value="true"
- label="Advanced Lighting Model"
- layout="topleft"
- left_delta="0"
- name="UseLightShaders"
- top_pad="1"
- width="256">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <check_box
- control_name="RenderDeferredSSAO"
- height="16"
- initial_value="true"
- label="Ambient Occlusion"
- layout="topleft"
- left_delta="0"
- name="UseSSAO"
- top_pad="1"
- width="256">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <check_box
- control_name="RenderDepthOfField"
- height="16"
- initial_value="true"
- label="Depth of Field"
- layout="topleft"
- left_delta="0"
- name="UseDoF"
- top_pad="1"
- width="256">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <text
- type="string"
- length="1"
- top_pad="8"
- follows="top|left"
- height="23"
- width="110"
- word_wrap="true"
- layout="topleft"
- left="10"
- name="shadows_label">
- Shadows:
- </text>
- <combo_box
- control_name="RenderShadowDetail"
- height="23"
- layout="topleft"
- left="10"
- top_pad="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>
+ <check_box
+ control_name="RenderDeferred"
+ height="16"
+ initial_value="true"
+ label="Advanced Lighting Model"
+ layout="topleft"
+ left="50"
+ name="UseLightShaders"
+ top_delta="20"
+ width="256">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
+
+<!-- End of Basic Settings block -->
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Save settings as a preset..."
+ layout="topleft"
+ left="10"
+ name="PrefSaveButton"
+ top="310"
+ width="200">
+ <button.commit_callback
+ function="Pref.PrefSave"
+ parameter="graphic" />
+ </button>
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Load preset..."
+ layout="topleft"
+ left_pad="10"
+ name="PrefLoadButton"
+ top_delta="0"
+ width="115">
+ <button.commit_callback
+ function="Pref.PrefLoad"
+ parameter="graphic"/>
+ </button>
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Delete preset..."
+ layout="topleft"
+ left_pad="10"
+ name="PrefDeleteButton"
+ top_delta="0"
+ width="115">
+ <button.commit_callback
+ function="Pref.PrefDelete"
+ parameter="graphic"/>
+ </button>
- <text
- type="string"
- length="1"
- top_pad="8"
- follows="top|left"
- height="12"
- width="110"
- word_wrap="true"
- layout="topleft"
- left="05"
- name="reflection_label">
- Water Reflections:
- </text>
- <combo_box
- control_name="RenderReflectionDetail"
- height="18"
- layout="topleft"
- left_delta="10"
- top_pad ="3"
- name="Reflections"
- width="150">
- <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>
-
- <slider
- control_name="RenderAvatarPhysicsLODFactor"
- follows="left|top"
- height="16"
- initial_value="100"
- increment=".05"
- label=" Avatar Physics:"
- label_width="85"
- layout="topleft"
- left_delta="-16"
- name="AvatarPhysicsDetail"
- show_text="false"
- top_pad="12"
- width="160">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="AvatarPhysicsDetailText" />
- </slider>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="165"
- name="AvatarPhysicsDetailText"
- top_pad="-16"
- width="128">
- Low
- </text>
+ <button
+ follows="top|left"
+ height="23"
+ label="Reset to recommended settings"
+ layout="topleft"
+ left="10"
+ name="Defaults"
+ top_delta="65"
+ width="210">
+ <button.commit_callback
+ function="Pref.HardwareDefaults" />
+ </button>
- <slider
- control_name="RenderFarClip"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="8"
- initial_value="160"
- label="Draw distance:"
- label_width="185"
- layout="topleft"
- left="200"
- max_val="512"
- min_val="64"
- name="DrawDistance"
- top="3"
- width="296" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="291"
- name="DrawDistanceMeterText2"
- top_delta="0"
- width="128">
- m
- </text>
- <slider
- control_name="RenderMaxPartCount"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="256"
- initial_value="4096"
- label="Max. particle count:"
- label_width="185"
- layout="topleft"
- left="200"
- max_val="8192"
- name="MaxParticleCount"
- top_pad="7"
- width="303" />
- <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_delta="0"
- max_val="65"
- min_val="1"
- name="MaxNumberAvatarDrawn"
- top_pad="4"
- width="290" />
- <slider
- control_name="RenderGlowResolutionPow"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="8"
- label="Post process quality:"
- label_width="185"
- layout="topleft"
- left="200"
- max_val="9"
- min_val="8"
- name="RenderPostProcess"
- show_text="false"
- top_pad="4"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="PostProcessText" />
- </slider>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="MeshDetailText"
- top_pad="5"
- width="128">
- Mesh detail:
- </text>
- <slider
- control_name="RenderVolumeLODFactor"
- follows="left|top"
- height="16"
- increment="0.125"
- initial_value="160"
- label=" Objects:"
- label_width="185"
- layout="topleft"
- left_delta="0"
- max_val="2"
- name="ObjectMeshDetail"
- show_text="false"
- top_pad="6"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="ObjectMeshDetailText" />
- </slider>
- <slider
- control_name="RenderFlexTimeFactor"
- follows="left|top"
- height="16"
- initial_value="160"
- label=" Flexiprims:"
- label_width="185"
- layout="topleft"
- left_delta="0"
- name="FlexibleMeshDetail"
- show_text="false"
- top_pad="4"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="FlexibleMeshDetailText" />
- </slider>
- <slider
- control_name="RenderTreeLODFactor"
- follows="left|top"
- height="16"
- increment="0.125"
- initial_value="160"
- label=" Trees:"
- label_width="185"
- layout="topleft"
- left_delta="0"
- name="TreeMeshDetail"
- show_text="false"
- top_pad="4"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="TreeMeshDetailText" />
- </slider>
- <slider
- control_name="RenderAvatarLODFactor"
- follows="left|top"
- height="16"
- increment="0.125"
- initial_value="160"
- label=" Avatars:"
- label_width="185"
- layout="topleft"
- left_delta="0"
- name="AvatarMeshDetail"
- show_text="false"
- top_pad="4"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="AvatarMeshDetailText" />
- </slider>
- <slider
- control_name="RenderTerrainLODFactor"
- follows="left|top"
- height="16"
- increment="0.125"
- initial_value="160"
- label=" Terrain:"
- label_width="185"
- layout="topleft"
- left_delta="0"
- max_val="2"
- min_val="1"
- name="TerrainMeshDetail"
- show_text="false"
- top_pad="4"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="TerrainMeshDetailText" />
- </slider>
- <slider
- control_name="WLSkyDetail"
- enabled_control="WindLightUseAtmosShaders"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="8"
- initial_value="160"
- label=" Sky:"
- label_width="185"
- layout="topleft"
- left_delta="0"
- max_val="128"
- min_val="16"
- name="SkyMeshDetail"
- show_text="false"
- top_pad="4"
- width="264">
- <slider.commit_callback
- function="Pref.UpdateSliderText"
- parameter="SkyMeshDetailText" />
- </slider>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="469"
- name="PostProcessText"
- top="60"
- width="128">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="ObjectMeshDetailText"
- top_pad="26"
- width="128">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="FlexibleMeshDetailText"
- top_pad="8"
- width="128">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="TreeMeshDetailText"
- top_pad="8"
- width="128">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="AvatarMeshDetailText"
- top_pad="8"
- width="128">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="TerrainMeshDetailText"
- top_pad="8"
- width="128">
- Low
- </text>
- <text
- enabled_control="WindLightUseAtmosShaders"
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="0"
- name="SkyMeshDetailText"
- top_pad="8"
- width="128">
- Low
- </text>
+ <button
+ follows="top|left"
+ height="23"
+ label="Advanced Settings..."
+ layout="topleft"
+ left_pad="10"
+ name="AdvancedSettings"
+ top_delta="0"
+ width="200">
+ <button.commit_callback
+ function="Pref.Advanced"
+ parameter="advanced" />
+ </button>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="-260"
- name="AvatarRenderingText"
- top_pad="18"
- width="128">
- Avatar Rendering:
- </text>
- <check_box
- control_name="RenderUseImpostors"
- height="16"
- initial_value="true"
- label="Avatar impostors"
- layout="topleft"
- left_delta="0"
- name="AvatarImpostors"
- top_pad="7"
- width="256" />
- <check_box
- control_name="RenderAvatarVP"
- height="16"
- initial_value="true"
- label="Hardware skinning"
- layout="topleft"
- left_delta="0"
- name="AvatarVertexProgram"
- top_pad="1"
- width="256">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
- <check_box
- control_name="RenderAvatarCloth"
- height="16"
- initial_value="true"
- label="Avatar cloth"
- layout="topleft"
- left_delta="0"
- name="AvatarCloth"
- top_pad="1"
- width="256" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="407"
- left_pad="-30"
- name="TerrainDetailText"
- top="250"
- width="155">
- Terrain detail:
- </text>
- <radio_group
- control_name="RenderTerrainDetail"
- draw_border="false"
- height="38"
- layout="topleft"
- left_delta="5"
- name="TerrainDetailRadio"
- top_pad="5"
- width="70">
- <radio_item
- height="16"
- label="Low"
- layout="topleft"
- name="0"
- top="3"
- width="50" />
- <radio_item
- height="16"
- label="High"
- layout="topleft"
- name="2"
- top_delta="16"
- width="50" />
- </radio_group> -->
- </panel>
-
- <button
- follows="left|bottom"
- height="23"
- label="Apply"
- label_selected="Apply"
- layout="topleft"
- left="10"
- name="Apply"
- top="390"
- width="115">
- <button.commit_callback
- function="Pref.Apply" />
- </button>
- <button
- follows="left|bottom"
- height="23"
- label="Reset"
- layout="topleft"
- left_pad="3"
- name="Defaults"
- top="390"
- width="115">
- <button.commit_callback
- function="Pref.HardwareDefaults" />
- </button>
- <button
- control_name="ShowAdvancedGraphicsSettings"
- follows="right|bottom"
- height="23"
- is_toggle="true"
- label="Advanced"
- layout="topleft"
- left_pad="35"
- name="Advanced"
- top_delta="0"
- width="115" />
- <button
- follows="right|bottom"
- height="23"
- label="Hardware"
- label_selected="Hardware"
- layout="topleft"
- left_pad="3"
- name="GraphicsHardwareButton"
- top_delta="0"
- width="115">
- <button.commit_callback
- function="Pref.HardwareSettings" />
- </button>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml b/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
new file mode 100644
index 0000000000..b87dda2315
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ background_opaque="true"
+ background_visible="true"
+ bg_opaque_image="Volume_Background"
+ bg_alpha_image="Volume_Background"
+ border_visible="false"
+ border="false"
+ chrome="true"
+ follows="bottom"
+ height="155"
+ layout="topleft"
+ name="presets_pulldown"
+ width="225">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ top="4"
+ left_delta="5"
+ font.style="BOLD"
+ name="Graphic Presets"
+ width="120">
+ Graphic Presets
+ </text>
+ <scroll_list
+ follows="left|top"
+ layout="topleft"
+ column_padding="0"
+ height="100"
+ width="215"
+ draw_heading="false"
+ draw_stripes="false"
+ bg_stripe_color="0.25 0.25 0.25 0.25"
+ top_delta="15"
+ left_delta="0"
+ name="preset_list">
+ <scroll_list.columns
+ name="icon"
+ width="16" />
+ <scroll_list.columns
+ relative_width="1"
+ name="preset_name" />
+ <scroll_list.commit_callback
+ function="Presets.RowClick" />
+ </scroll_list>
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="0"
+ layout="topleft"
+ left="5"
+ name="horiz_separator"
+ top_delta="105"
+ width="215" />
+ <button
+ name="open_prefs_btn"
+ label="Open Graphics Preferences"
+ tool_tip = "Bring up graphics prefs"
+ top_delta="5"
+ left="15"
+ height="20"
+ width="200">
+ <button.commit_callback
+ function="Presets.GoGraphicsPrefs" />
+ </button>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index dbf7bc031f..14716f88ff 100755
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -35,7 +35,7 @@
</panel.string>
<panel
height="18"
- left="-395"
+ left="-416"
width="185"
top="1"
follows="right|top"
@@ -105,6 +105,14 @@
width="145">
24:00 AM PST
</text>
+ <icon
+ follows="right|top"
+ height="16"
+ image_name="Presets_Icon"
+ left_pad="5"
+ top="2"
+ name="presets_icon"
+ width="18" />
<button
follows="right|top"
height="16"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 945a77c071..51747eb0be 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4045,5 +4045,10 @@ Try enclosing path to the editor with double quotes.
<string name="loading_chat_logs">
Loading...
</string>
-
+
+ <!-- Presets graphic/camera -->
+ <string name="preset_combo_label">-Empty list-</string>
+ <string name="Default">Default</string>
+ <string name="none_paren_cap">(None)</string>
+ <string name="no_limit">No Limit</string>
</strings>