summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt12
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-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.xml148
-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/llagentwearables.cpp23
-rwxr-xr-xindra/newview/llappearancemgr.cpp314
-rwxr-xr-xindra/newview/llappearancemgr.h15
-rwxr-xr-xindra/newview/llappviewer.cpp5
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp532
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.h33
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp7
-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/llinventorybridge.cpp90
-rwxr-xr-xindra/newview/llinventorybridge.h8
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp40
-rwxr-xr-xindra/newview/llinventoryicon.cpp2
-rwxr-xr-xindra/newview/llinventorypanel.cpp4
-rwxr-xr-xindra/newview/llinventorypanel.h2
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp14
-rwxr-xr-xindra/newview/llpaneleditwearable.cpp44
-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/llsidepanelappearance.cpp3
-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/llviewerinventory.cpp2
-rwxr-xr-xindra/newview/llviewermenu.cpp22
-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.cpp4
-rwxr-xr-xindra/newview/llvoavatar.cpp479
-rwxr-xr-xindra/newview/llvoavatar.h45
-rwxr-xr-xindra/newview/llvoavatarself.cpp34
-rwxr-xr-xindra/newview/llvoavatarself.h2
-rwxr-xr-xindra/newview/llwearableitemslist.cpp65
-rwxr-xr-xindra/newview/llwearableitemslist.h1
-rwxr-xr-xindra/newview/pipeline.cpp37
-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_attachment_other.xml12
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_other.xml12
-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
-rwxr-xr-xindra/newview/viewer_manifest.py4
81 files changed, 4357 insertions, 2491 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/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 1523336b0d..ca06baa571 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.29
+3.7.31
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 845cb5ae96..9e52ea33ae 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8229,17 +8229,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>
@@ -8325,13 +8314,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>
@@ -9764,13 +9753,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>
@@ -9882,29 +9871,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>
@@ -9914,40 +9902,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>
@@ -9969,7 +9971,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>0</integer>
+ <real>1.0E6</real>
</map>
<key>RenderVBOEnable</key>
@@ -10556,17 +10558,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>
@@ -15611,6 +15602,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/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index f06ffb4fb3..5589ab4aa7 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -633,10 +633,13 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed)
// the versions themselves are compatible. This code can be removed before release.
if( wearable->getDefinitionVersion() == 24 )
{
- wearable->setDefinitionVersion(22);
- U32 index = getWearableIndex(wearable);
- LL_INFOS() << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << LL_ENDL;
- saveWearable(wearable->getType(),index);
+ U32 index;
+ if (getWearableIndex(wearable,index))
+ {
+ LL_INFOS() << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << LL_ENDL;
+ wearable->setDefinitionVersion(22);
+ saveWearable(wearable->getType(),index);
+ }
}
checkWearableAgainstInventory(viewer_wearable);
@@ -949,7 +952,7 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
LLViewerWearable* old_wearable = getViewerWearable(type,i);
if (old_wearable)
{
- popWearable(old_wearable);
+ eraseWearable(old_wearable);
old_wearable->removeFromAvatar();
}
}
@@ -961,7 +964,7 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
if (old_wearable)
{
- popWearable(old_wearable);
+ eraseWearable(old_wearable);
old_wearable->removeFromAvatar();
}
}
@@ -1163,7 +1166,13 @@ bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD&
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
- U32 index = gAgentWearables.getWearableIndex(wearable);
+ U32 index;
+ if (!gAgentWearables.getWearableIndex(wearable,index))
+ {
+ LL_WARNS() << "Wearable not found" << LL_ENDL;
+ delete wearable;
+ return false;
+ }
if (!new_item)
{
delete wearable;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index a64d5b50b3..b3317e937e 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1338,90 +1338,113 @@ void wear_on_avatar_cb(const LLUUID& inv_item, bool do_replace = false)
}
}
-bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear,
+void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
+ bool do_update,
+ bool replace,
+ LLPointer<LLInventoryCallback> cb)
+{
+ bool first = true;
+
+ LLInventoryObject::const_object_list_t items_to_link;
+
+ for (uuid_vec_t::const_iterator it = item_ids_to_wear.begin();
+ it != item_ids_to_wear.end();
+ ++it)
+ {
+ replace = first && replace;
+ first = false;
+
+ const LLUUID& item_id_to_wear = *it;
+
+ if (item_id_to_wear.isNull()) continue;
+
+ LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear);
+ if (!item_to_wear) continue;
+
+ if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getLibraryRootFolderID()))
+ {
+ LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(wear_on_avatar_cb,_1,replace));
+ copy_inventory_item(gAgent.getID(), item_to_wear->getPermissions().getOwner(), item_to_wear->getUUID(), LLUUID::null, std::string(), cb);
+ continue;
+ }
+ else if (!gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getRootFolderID()))
+ {
+ continue; // not in library and not in agent's inventory
+ }
+ else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH)))
+ {
+ LLNotificationsUtil::add("CannotWearTrash");
+ continue;
+ }
+ else if (isLinkedInCOF(item_to_wear->getUUID())) // EXT-84911
+ {
+ continue;
+ }
+
+ switch (item_to_wear->getType())
+ {
+ case LLAssetType::AT_CLOTHING:
+ {
+ if (gAgentWearables.areWearablesLoaded())
+ {
+ if (!cb && do_update)
+ {
+ cb = new LLUpdateAppearanceAndEditWearableOnDestroy(item_id_to_wear);
+ }
+ LLWearableType::EType type = item_to_wear->getWearableType();
+ S32 wearable_count = gAgentWearables.getWearableCount(type);
+ if ((replace && wearable_count != 0) || !gAgentWearables.canAddWearable(type))
+ {
+ LLUUID item_id = gAgentWearables.getWearableItemID(item_to_wear->getWearableType(),
+ wearable_count-1);
+ removeCOFItemLinks(item_id, cb);
+ }
+
+ items_to_link.push_back(item_to_wear);
+ }
+ }
+ break;
+
+ case LLAssetType::AT_BODYPART:
+ {
+ // TODO: investigate wearables may not be loaded at this point EXT-8231
+
+ // Remove the existing wearables of the same type.
+ // Remove existing body parts anyway because we must not be able to wear e.g. two skins.
+ removeCOFLinksOfType(item_to_wear->getWearableType());
+ if (!cb && do_update)
+ {
+ cb = new LLUpdateAppearanceAndEditWearableOnDestroy(item_id_to_wear);
+ }
+ items_to_link.push_back(item_to_wear);
+ }
+ break;
+
+ case LLAssetType::AT_OBJECT:
+ {
+ rez_attachment(item_to_wear, NULL, replace);
+ }
+ break;
+
+ default: continue;
+ }
+ }
+
+ // Batch up COF link creation - more efficient if using AIS.
+ if (items_to_link.size())
+ {
+ link_inventory_array(getCOF(), items_to_link, cb);
+ }
+}
+
+void LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear,
bool do_update,
bool replace,
LLPointer<LLInventoryCallback> cb)
{
-
- if (item_id_to_wear.isNull()) return false;
-
- // *TODO: issue with multi-wearable should be fixed:
- // in this case this method will be called N times - loading started for each item
- // and than N times will be called - loading completed for each item.
- // That means subscribers will be notified that loading is done after first item in a batch is worn.
- // (loading indicator disappears for example before all selected items are worn)
- // Have not fix this issue for 2.1 because of stability reason. EXT-7777.
-
- // Disabled for now because it is *not* acceptable to call updateAppearanceFromCOF() multiple times
-// gAgentWearables.notifyLoadingStarted();
-
- LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear);
- if (!item_to_wear) return false;
-
- if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getLibraryRootFolderID()))
- {
- LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(wear_on_avatar_cb,_1,replace));
- copy_inventory_item(gAgent.getID(), item_to_wear->getPermissions().getOwner(), item_to_wear->getUUID(), LLUUID::null, std::string(), cb);
- return false;
- }
- else if (!gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getRootFolderID()))
- {
- return false; // not in library and not in agent's inventory
- }
- else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH)))
- {
- LLNotificationsUtil::add("CannotWearTrash");
- return false;
- }
- else if (isLinkedInCOF(item_to_wear->getUUID())) // EXT-84911
- {
- return false;
- }
-
- switch (item_to_wear->getType())
- {
- case LLAssetType::AT_CLOTHING:
- if (gAgentWearables.areWearablesLoaded())
- {
- if (!cb && do_update)
- {
- cb = new LLUpdateAppearanceAndEditWearableOnDestroy(item_id_to_wear);
- }
- S32 wearable_count = gAgentWearables.getWearableCount(item_to_wear->getWearableType());
- if ((replace && wearable_count != 0) ||
- (wearable_count >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) )
- {
- LLUUID item_id = gAgentWearables.getWearableItemID(item_to_wear->getWearableType(),
- wearable_count-1);
- removeCOFItemLinks(item_id, cb);
- }
-
- addCOFItemLink(item_to_wear, cb);
- }
- break;
-
- case LLAssetType::AT_BODYPART:
- // TODO: investigate wearables may not be loaded at this point EXT-8231
-
- // Remove the existing wearables of the same type.
- // Remove existing body parts anyway because we must not be able to wear e.g. two skins.
- removeCOFLinksOfType(item_to_wear->getWearableType());
- if (!cb && do_update)
- {
- cb = new LLUpdateAppearanceAndEditWearableOnDestroy(item_id_to_wear);
- }
- addCOFItemLink(item_to_wear, cb);
- break;
-
- case LLAssetType::AT_OBJECT:
- rez_attachment(item_to_wear, NULL, replace);
- break;
-
- default: return false;;
- }
-
- return true;
+ uuid_vec_t ids;
+ ids.push_back(item_id_to_wear);
+ wearItemsOnAvatar(ids, do_update, replace, cb);
}
// Update appearance from outfit folder.
@@ -1782,6 +1805,49 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
return items.size() > 0;
}
+// Moved from LLWearableList::ContextMenu for wider utility.
+bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids)
+{
+ // TODO: investigate wearables may not be loaded at this point EXT-8231
+
+ U32 n_objects = 0;
+ U32 n_clothes = 0;
+
+ // Count given clothes (by wearable type) and objects.
+ for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it)
+ {
+ LLViewerInventoryItem* item = gInventory.getItem(*it);
+ if (!item)
+ {
+ return false;
+ }
+
+ if (item->getType() == LLAssetType::AT_OBJECT)
+ {
+ ++n_objects;
+ }
+ else if (item->getType() == LLAssetType::AT_CLOTHING)
+ {
+ ++n_clothes;
+ }
+ else
+ {
+ LL_WARNS() << "Unexpected wearable type" << LL_ENDL;
+ return false;
+ }
+ }
+
+ // Check whether we can add all the objects.
+ if (!isAgentAvatarValid() || !gAgentAvatarp->canAttachMoreObjects(n_objects))
+ {
+ return false;
+ }
+
+ // Check whether we can add all the clothes.
+ U32 sum_clothes = n_clothes + gAgentWearables.getClothingLayerCount();
+ return sum_clothes <= LLAgentWearables::MAX_CLOTHING_LAYERS;
+}
+
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> cb)
{
LLInventoryModel::cat_array_t cats;
@@ -1804,25 +1870,39 @@ void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLIn
// Keep the last N wearables of each type. For viewer 2.0, N is 1 for
// both body parts and clothing items.
void LLAppearanceMgr::filterWearableItems(
- LLInventoryModel::item_array_t& items, S32 max_per_type)
-{
- // Divvy items into arrays by wearable type.
- std::vector<LLInventoryModel::item_array_t> items_by_type(LLWearableType::WT_COUNT);
- divvyWearablesByType(items, items_by_type);
-
- // rebuild items list, retaining the last max_per_type of each array
- items.clear();
- for (S32 i=0; i<LLWearableType::WT_COUNT; i++)
- {
- S32 size = items_by_type[i].size();
- if (size <= 0)
- continue;
- S32 start_index = llmax(0,size-max_per_type);
- for (S32 j = start_index; j<size; j++)
- {
- items.push_back(items_by_type[i][j]);
- }
- }
+ LLInventoryModel::item_array_t& items, S32 max_per_type, S32 max_total)
+{
+ // Restrict by max total items first.
+ if ((max_total > 0) && (items.size() > max_total))
+ {
+ LLInventoryModel::item_array_t items_to_keep;
+ for (S32 i=0; i<max_total; i++)
+ {
+ items_to_keep.push_back(items[i]);
+ }
+ items = items_to_keep;
+ }
+
+ if (max_per_type > 0)
+ {
+ // Divvy items into arrays by wearable type.
+ std::vector<LLInventoryModel::item_array_t> items_by_type(LLWearableType::WT_COUNT);
+ divvyWearablesByType(items, items_by_type);
+
+ // rebuild items list, retaining the last max_per_type of each array
+ items.clear();
+ for (S32 i=0; i<LLWearableType::WT_COUNT; i++)
+ {
+ S32 size = items_by_type[i].size();
+ if (size <= 0)
+ continue;
+ S32 start_index = llmax(0,size-max_per_type);
+ for (S32 j = start_index; j<size; j++)
+ {
+ items.push_back(items_by_type[i][j]);
+ }
+ }
+ }
}
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
@@ -1864,7 +1944,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
reverse(body_items.begin(), body_items.end());
// Reduce body items to max of one per type.
removeDuplicateItems(body_items);
- filterWearableItems(body_items, 1);
+ filterWearableItems(body_items, 1, 0);
// - Wearables: include COF contents only if appending.
LLInventoryModel::item_array_t wear_items;
@@ -1873,7 +1953,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING);
// Reduce wearables to max of one per type.
removeDuplicateItems(wear_items);
- filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE);
+ filterWearableItems(wear_items, 0, LLAgentWearables::MAX_CLOTHING_LAYERS);
// - Attachments: include COF contents only if appending.
LLInventoryModel::item_array_t obj_items;
@@ -2062,7 +2142,8 @@ void item_array_diff(LLInventoryModel::item_array_t& full_list,
S32 LLAppearanceMgr::findExcessOrDuplicateItems(const LLUUID& cat_id,
LLAssetType::EType type,
- S32 max_items,
+ S32 max_items_per_type,
+ S32 max_items_total,
LLInventoryObject::object_list_t& items_to_kill)
{
S32 to_kill_count = 0;
@@ -2071,9 +2152,9 @@ S32 LLAppearanceMgr::findExcessOrDuplicateItems(const LLUUID& cat_id,
getDescendentsOfAssetType(cat_id, items, type);
LLInventoryModel::item_array_t curr_items = items;
removeDuplicateItems(items);
- if (max_items > 0)
+ if (max_items_per_type > 0 || max_items_total > 0)
{
- filterWearableItems(items, max_items);
+ filterWearableItems(items, max_items_per_type, max_items_total);
}
LLInventoryModel::item_array_t kill_items;
item_array_diff(curr_items,items,kill_items);
@@ -2092,11 +2173,11 @@ void LLAppearanceMgr::findAllExcessOrDuplicateItems(const LLUUID& cat_id,
LLInventoryObject::object_list_t& items_to_kill)
{
findExcessOrDuplicateItems(cat_id,LLAssetType::AT_BODYPART,
- 1, items_to_kill);
+ 1, 0, items_to_kill);
findExcessOrDuplicateItems(cat_id,LLAssetType::AT_CLOTHING,
- LLAgentWearables::MAX_CLOTHING_PER_TYPE, items_to_kill);
+ 0, LLAgentWearables::MAX_CLOTHING_LAYERS, items_to_kill);
findExcessOrDuplicateItems(cat_id,LLAssetType::AT_OBJECT,
- -1, items_to_kill);
+ 0, 0, items_to_kill);
}
void LLAppearanceMgr::enforceCOFItemRestrictions(LLPointer<LLInventoryCallback> cb)
@@ -2588,7 +2669,6 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
bool linked_already = false;
- U32 count = 0;
for (S32 i=0; i<item_array.size(); i++)
{
// Are these links to the same object?
@@ -2608,14 +2688,13 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item,
// type? If so, new item will replace old.
else if ((vitem->isWearableType()) && (vitem->getWearableType() == wearable_type))
{
- ++count;
- if (is_body_part && inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type))
+ if (is_body_part && inv_item->getIsLinkType())
{
remove_inventory_item(inv_item->getUUID(), cb);
}
- else if (count >= LLAgentWearables::MAX_CLOTHING_PER_TYPE)
+ else if (!gAgentWearables.canAddWearable(wearable_type))
{
- // MULTI-WEARABLES: make sure we don't go over MAX_CLOTHING_PER_TYPE
+ // MULTI-WEARABLES: make sure we don't go over clothing limits
remove_inventory_item(inv_item->getUUID(), cb);
}
}
@@ -4071,16 +4150,7 @@ void callAfterCategoryFetch(const LLUUID& cat_id, nullary_func_t cb)
void wear_multiple(const uuid_vec_t& ids, bool replace)
{
LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
-
- bool first = true;
- uuid_vec_t::const_iterator it;
- for (it = ids.begin(); it != ids.end(); ++it)
- {
- // if replace is requested, the first item worn will replace the current top
- // item, and others will be added.
- LLAppearanceMgr::instance().wearItemOnAvatar(*it,false,first && replace,cb);
- first = false;
- }
+ LLAppearanceMgr::instance().wearItemsOnAvatar(ids, false, replace, cb);
}
// SLapp for easy-wearing of a stock (library) avatar
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 7742a19c07..ee9d3b7209 100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -67,7 +67,8 @@ public:
void addCategoryToCurrentOutfit(const LLUUID& cat_id);
S32 findExcessOrDuplicateItems(const LLUUID& cat_id,
LLAssetType::EType type,
- S32 max_items,
+ S32 max_items_per_type,
+ S32 max_items_total,
LLInventoryObject::object_list_t& items_to_kill);
void findAllExcessOrDuplicateItems(const LLUUID& cat_id,
LLInventoryObject::object_list_t& items_to_kill);
@@ -99,6 +100,9 @@ public:
// Determine whether we can replace current outfit with the given one.
bool getCanReplaceCOF(const LLUUID& outfit_cat_id);
+ // Can we add all referenced items to the avatar?
+ bool canAddWearables(const uuid_vec_t& item_ids);
+
// Copy all items in a category.
void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb);
@@ -117,8 +121,13 @@ public:
// find the UUID of the currently worn outfit (Base Outfit)
const LLUUID getBaseOutfitUUID();
+ void wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
+ bool do_update,
+ bool replace,
+ LLPointer<LLInventoryCallback> cb = NULL);
+
// Wear/attach an item (from a user's inventory) on the agent
- bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update, bool replace = false,
+ void wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update, bool replace = false,
LLPointer<LLInventoryCallback> cb = NULL);
// Update the displayed outfit name in UI.
@@ -235,7 +244,7 @@ protected:
private:
- void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type);
+ void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type, S32 max_total);
void getDescendentsOfAssetType(const LLUUID& category,
LLInventoryModel::item_array_t& items,
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6dc71bc94e..1a49fea253 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;
@@ -5106,7 +5105,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..b8ec1e150b 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,287 @@
#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_TOO_COMPLEX = "tooComplex"; // bool
+static const std::string KEY_OVER_COMPLEXITY_LIMIT = "overlimit"; // integer
+static const std::string KEY_REPORTING_COMPLEXITY_LIMIT = "reportinglimit"; // integer
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)
+ LLAvatarRenderInfoGetHandler() : LLCore::HttpHandler()
{
}
- virtual void error(U32 statusNum, const std::string& reason)
- {
- 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)
+ {
+ LL_DEBUGS("AvatarRenderInfo") << "response"<<LL_ENDL;
+ 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_REPORTING_COMPLEXITY_LIMIT)
+ && avatar_render_info.has(KEY_OVER_COMPLEXITY_LIMIT))
{
- 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))
+ U32 reporting = avatar_render_info[KEY_REPORTING_COMPLEXITY_LIMIT].asInteger();
+ U32 overlimit = avatar_render_info[KEY_OVER_COMPLEXITY_LIMIT].asInteger();
+
+ LL_DEBUGS("AvatarRenderInfo") << "complexity limit: "<<reporting<<" reporting, "<<overlimit<<" over limit"<<LL_ENDL;
+ //@TODO - at this point, pass reporting and overlimit to something
+ // that remembers them and when they change displays a message
+ }
+
+ if (avatar_render_info.has(KEY_AGENTS))
+ {
+ 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
+// Send request for avatar weights in one region
+// called when the mRenderInfoScanTimer expires (forced when entering a new region)
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_TOO_COMPLEX] = LLSD::Boolean(avatar->isTooComplex());
+ 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 +336,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 +377,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/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index ea39f812fd..73f10e24d6 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 ee4396758e..7083c1ddf5 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -49,7 +49,6 @@
//#include "llfirstuse.h"
#include "llfloaterreg.h"
#include "llfloaterabout.h"
-#include "llfloaterhardwaresettings.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterimsession.h"
#include "llkeyboard.h"
@@ -110,6 +109,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";
@@ -118,6 +122,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:
@@ -327,9 +343,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));
@@ -343,8 +358,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));
@@ -358,6 +373,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");
@@ -554,12 +570,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
@@ -636,13 +646,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);
@@ -669,7 +675,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
@@ -747,6 +753,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()
@@ -754,6 +773,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()
{
@@ -777,7 +817,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();
@@ -786,7 +833,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);
+ }
+ }
}
}
@@ -801,13 +888,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())
@@ -823,7 +905,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())
@@ -865,11 +955,10 @@ void LLFloaterPreference::onBtnOK()
LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get();
pPathfindingConsole->onRegionBoundaryCross();
}
-
}
// static
-void LLFloaterPreference::onBtnApply( )
+void LLFloaterPreference::onBtnCancel(const LLSD& userdata)
{
if (hasFocus())
{
@@ -878,27 +967,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
@@ -911,19 +991,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();
}
}
@@ -1106,23 +1185,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");
@@ -1141,43 +1249,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) &&
@@ -1187,11 +1300,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);
@@ -1204,7 +1317,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();
@@ -1215,19 +1354,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"))
@@ -1237,9 +1420,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);
@@ -1249,6 +1436,7 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1258,8 +1446,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled windlight
@@ -1268,9 +1454,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);
@@ -1280,8 +1470,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled deferred
@@ -1290,6 +1478,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1299,8 +1488,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled deferred SSAO
@@ -1315,6 +1502,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(FALSE);
}
// disabled reflections
@@ -1322,6 +1510,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(FALSE);
+ reflections_text->setEnabled(FALSE);
}
// disabled av
@@ -1336,6 +1525,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);
@@ -1345,8 +1535,6 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
- ctrl_deferred2->setEnabled(FALSE);
- ctrl_deferred2->setValue(FALSE);
}
// disabled cloth
@@ -1355,18 +1543,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");
@@ -1375,12 +1567,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();
}
@@ -1633,11 +1827,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();
@@ -1646,7 +1840,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)
{
@@ -1662,6 +1856,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");
@@ -1704,6 +1964,11 @@ void LLFloaterPreference::onClickSpellChecker()
LLFloaterReg::showInstance("prefs_spellchecker");
}
+void LLFloaterPreference::onClickAdvanced()
+{
+ LLFloaterReg::showInstance("prefs_graphics_advanced");
+}
+
void LLFloaterPreference::onClickActionChange()
{
mClickActionDirty = true;
@@ -1861,6 +2126,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
@@ -1959,10 +2227,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
@@ -2064,6 +2338,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:
@@ -2107,25 +2403,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
@@ -2136,7 +2484,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();
@@ -2144,14 +2502,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
@@ -2171,14 +2535,9 @@ void LLPanelPreferenceGraphics::resetDirtyChilds()
}
}
}
-void LLPanelPreferenceGraphics::apply()
-{
- resetDirtyChilds();
- LLPanelPreference::apply();
-}
+
void LLPanelPreferenceGraphics::cancel()
{
- resetDirtyChilds();
LLPanelPreference::cancel();
}
void LLPanelPreferenceGraphics::saveSettings()
@@ -2189,7 +2548,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/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1dc5558555..a047ed6fee 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -74,6 +74,7 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
+#include "llwearableitemslist.h"
#include "lllandmarkactions.h"
#include "llpanellandmarks.h"
@@ -557,6 +558,46 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return TRUE;
}
+void disable_context_entries_if_present(LLMenuGL& menu,
+ const menuentry_vec_t &disabled_entries)
+{
+ const LLView::child_list_t *list = menu.getChildList();
+ for (LLView::child_list_t::const_iterator itor = list->begin();
+ itor != list->end();
+ ++itor)
+ {
+ LLView *menu_item = (*itor);
+ std::string name = menu_item->getName();
+
+ // descend into split menus:
+ LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(menu_item);
+ if ((name == "More") && branchp)
+ {
+ disable_context_entries_if_present(*branchp->getBranch(), disabled_entries);
+ }
+
+ bool found = false;
+ menuentry_vec_t::const_iterator itor2;
+ for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2)
+ {
+ if (*itor2 == name)
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if (found)
+ {
+ menu_item->setVisible(TRUE);
+ // A bit of a hack so we can remember that some UI element explicitly set this to be visible
+ // so that some other UI element from multi-select doesn't later set this invisible.
+ menu_item->pushVisible(TRUE);
+
+ menu_item->setEnabled(FALSE);
+ }
+ }
+}
void hide_context_entries(LLMenuGL& menu,
const menuentry_vec_t &entries_to_show,
const menuentry_vec_t &disabled_entries)
@@ -765,6 +806,31 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
hide_context_entries(menu, items, disabled_items);
}
+bool get_selection_item_uuids(LLFolderView::selected_items_t& selected_items, uuid_vec_t& ids)
+{
+ uuid_vec_t results;
+ S32 non_item = 0;
+ for(LLFolderView::selected_items_t::iterator it = selected_items.begin(); it != selected_items.end(); ++it)
+ {
+ LLItemBridge *view_model = dynamic_cast<LLItemBridge *>((*it)->getViewModelItem());
+
+ if(view_model && view_model->getUUID().notNull())
+ {
+ results.push_back(view_model->getUUID());
+ }
+ else
+ {
+ non_item++;
+ }
+ }
+ if (non_item == 0)
+ {
+ ids = results;
+ return true;
+ }
+ return false;
+}
+
void LLInvFVBridge::addTrashContextMenuOptions(menuentry_vec_t &items,
menuentry_vec_t &disabled_items)
{
@@ -1120,7 +1186,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
{
LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL;
}
- new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (LLWearableType::EType)flags);
+ new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, LLWearableType::inventoryFlagsToWearableType(flags));
break;
case LLAssetType::AT_CATEGORY:
if (actual_asset_type == LLAssetType::AT_LINK_FOLDER)
@@ -3585,7 +3651,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(!model) return;
buildContextMenuOptions(flags, items, disabled_items);
- hide_context_entries(menu, items, disabled_items);
+ hide_context_entries(menu, items, disabled_items);
// Reposition the menu, in case we're adding items to an existing menu.
menu.needsArrange();
@@ -5770,7 +5836,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if (LLWearableType::getAllowMultiwear(mWearableType))
{
items.push_back(std::string("Wearable Add"));
- if (gAgentWearables.getWearableCount(mWearableType) >= LLAgentWearables::MAX_CLOTHING_PER_TYPE)
+ if (!gAgentWearables.canAddWearable(mWearableType))
{
disabled_items.push_back(std::string("Wearable Add"));
}
@@ -6439,4 +6505,22 @@ LLInvFVBridge* LLRecentInventoryBridgeBuilder::createBridge(
return new_listener;
}
+LLFolderViewGroupedItemBridge::LLFolderViewGroupedItemBridge()
+{
+}
+
+void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_deque& selected_items, LLMenuGL& menu)
+{
+ uuid_vec_t ids;
+ menuentry_vec_t disabled_items;
+ if (get_selection_item_uuids(selected_items, ids))
+ {
+ if (!LLAppearanceMgr::instance().canAddWearables(ids))
+ {
+ disabled_items.push_back(std::string("Wearable Add"));
+ }
+ }
+ disable_context_entries_if_present(menu, disabled_items);
+}
+
// EOF
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index f8ef15991d..300cef7deb 100755
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -37,6 +37,7 @@
#include "llviewerwearable.h"
#include "lltooldraganddrop.h"
#include "lllandmarklist.h"
+#include "llfolderviewitem.h"
class LLInventoryFilter;
class LLInventoryPanel;
@@ -689,4 +690,11 @@ void hide_context_entries(LLMenuGL& menu,
const menuentry_vec_t &entries_to_show,
const menuentry_vec_t &disabled_entries);
+class LLFolderViewGroupedItemBridge: public LLFolderViewGroupedItemModel
+{
+public:
+ LLFolderViewGroupedItemBridge();
+ virtual void groupFilterContextMenu(folder_view_item_deque& selected_items, LLMenuGL& menu);
+};
+
#endif // LL_LLINVENTORYBRIDGE_H
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 1abc09bf3b..2546db546b 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -45,6 +45,7 @@
// newview includes
#include "llappearancemgr.h"
#include "llappviewer.h"
+#include "llavataractions.h"
#include "llclipboard.h"
#include "lldonotdisturbnotificationstorage.h"
#include "llfloaterinventory.h"
@@ -1114,16 +1115,35 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
LLFloater::setFloaterHost(multi_propertiesp);
}
- std::set<LLFolderViewItem*>::iterator set_iter;
-
- for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
- {
- LLFolderViewItem* folder_item = *set_iter;
- if(!folder_item) continue;
- LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
- if(!bridge) continue;
- bridge->performAction(model, action);
- }
+
+ std::set<LLUUID> selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs();
+ uuid_vec_t ids;
+ std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids));
+ // Check for actions that get handled in bulk
+ if (action == "wear")
+ {
+ wear_multiple(ids, true);
+ }
+ else if (action == "wear_add")
+ {
+ wear_multiple(ids, false);
+ }
+ else if (action == "take_off" || action == "detach")
+ {
+ LLAppearanceMgr::instance().removeItemsFromAvatar(ids);
+ }
+ else
+ {
+ std::set<LLFolderViewItem*>::iterator set_iter;
+ for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
+ {
+ LLFolderViewItem* folder_item = *set_iter;
+ if(!folder_item) continue;
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
+ if(!bridge) continue;
+ bridge->performAction(model, action);
+ }
+ }
LLFloater::setFloaterHost(NULL);
if (multi_previewp)
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index b7c4ec6f8b..013a5a7629 100755
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -183,6 +183,6 @@ const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx)
LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
{
- const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag);
+ const LLWearableType::EType wearable_type = LLWearableType::inventoryFlagsToWearableType(misc_flag);
return LLWearableType::getIconName(wearable_type);
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 3546317471..4a230accb6 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -146,7 +146,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mShowEmptyMessage(p.show_empty_message),
mViewsInitialized(false),
mInvFVBridgeBuilder(NULL),
- mInventoryViewModel(p.name)
+ mInventoryViewModel(p.name),
+ mGroupedItemBridge(new LLFolderViewGroupedItemBridge)
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
@@ -186,6 +187,7 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
NULL,
root_id);
p.view_model = &mInventoryViewModel;
+ p.grouped_item_model = mGroupedItemBridge;
p.use_label_suffix = mParams.use_label_suffix;
p.allow_multiselect = mAllowMultiSelect;
p.show_empty_message = mShowEmptyMessage;
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index a490dfce5d..bc4c10e441 100755
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -43,6 +43,7 @@ class LLInvFVBridge;
class LLInventoryFolderViewModelBuilder;
class LLInvPanelComplObserver;
class LLFolderViewModelInventory;
+class LLFolderViewGroupedItemBridge;
namespace LLInitParam
{
@@ -240,6 +241,7 @@ protected:
LLScrollContainer* mScroller;
LLFolderViewModelInventory mInventoryViewModel;
+ LLPointer<LLFolderViewGroupedItemBridge> mGroupedItemBridge;
Params mParams; // stored copy of parameter block
std::map<LLUUID, LLFolderViewItem*> mItemMap;
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 8fb7550169..1380345164 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -545,12 +545,14 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp
LLAvatarAppearanceDefines::ETextureIndex reg_texind = getTexIndex(type, baked_texind);
if (reg_texind != LLAvatarAppearanceDefines::TEX_NUM_INDICES)
{
- U32 index = gAgentWearables.getWearableIndex(wearable);
- gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index);
- gAgentAvatarp->wearableUpdated(type);
-
- /* telling the manager to rebake once update cycle is fully done */
- LLLocalBitmapMgr::setNeedsRebake();
+ U32 index;
+ if (gAgentWearables.getWearableIndex(wearable,index))
+ {
+ gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index);
+ gAgentAvatarp->wearableUpdated(type);
+ /* telling the manager to rebake once update cycle is fully done */
+ LLLocalBitmapMgr::setNeedsRebake();
+ }
}
}
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 19a86cdcea..9bd6007772 100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -925,17 +925,17 @@ void LLPanelEditWearable::onCommitSexChange()
if (!isAgentAvatarValid()) return;
LLWearableType::EType type = mWearablePtr->getType();
- U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
-
- if( !gAgentWearables.isWearableModifiable(type, index))
+ U32 index;
+ if( !gAgentWearables.getWearableIndex(mWearablePtr, index) ||
+ !gAgentWearables.isWearableModifiable(type, index))
{
- return;
+ return;
}
LLViewerVisualParam* param = static_cast<LLViewerVisualParam*>(gAgentAvatarp->getVisualParam( "male" ));
if( !param )
{
- return;
+ return;
}
bool is_new_sex_male = (gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE) == SEX_MALE;
@@ -978,10 +978,17 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
}
if (getWearable())
{
- U32 index = gAgentWearables.getWearableIndex(getWearable());
- gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index);
- LLVisualParamHint::requestHintUpdates();
- gAgentAvatarp->wearableUpdated(type);
+ U32 index;
+ if (gAgentWearables.getWearableIndex(getWearable(), index))
+ {
+ gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index);
+ LLVisualParamHint::requestHintUpdates();
+ gAgentAvatarp->wearableUpdated(type);
+ }
+ else
+ {
+ LL_WARNS() << "wearable not found in gAgentWearables" << LL_ENDL;
+ }
}
}
else
@@ -1058,7 +1065,12 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
return;
}
- U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
+ U32 index;
+ if (!gAgentWearables.getWearableIndex(mWearablePtr, index))
+ {
+ LL_WARNS() << "wearable not found" << LL_ENDL;
+ return;
+ }
std::string new_name = mNameEditor->getText();
@@ -1574,6 +1586,12 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
LL_INFOS() << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << LL_ENDL;
+ U32 index;
+ if (!gAgentWearables.getWearableIndex(getWearable(),index))
+ {
+ LL_WARNS() << "wearable not found" << LL_ENDL;
+ return;
+ }
bool new_invis_state = checkbox_ctrl->get();
if (new_invis_state)
{
@@ -1581,9 +1599,8 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
mPreviousAlphaTexture[te] = lto->getID();
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE );
- U32 index = gAgentWearables.getWearableIndex(getWearable());
- gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
- gAgentAvatarp->wearableUpdated(getWearable()->getType());
+ gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
+ gAgentAvatarp->wearableUpdated(getWearable()->getType());
}
else
{
@@ -1598,7 +1615,6 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(prev_id);
if (!image) return;
- U32 index = gAgentWearables.getWearableIndex(getWearable());
gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
gAgentAvatarp->wearableUpdated(getWearable()->getType());
}
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..dd25c0d1b8
--- /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.c_str());
+ 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/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 64f24cd291..ea7cf82674 100755
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -212,7 +212,8 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
}
if (is_wearable_edit_visible)
{
- if (gAgentWearables.getWearableIndex(wearable_ptr) == LLAgentWearables::MAX_CLOTHING_PER_TYPE)
+ U32 index;
+ if (!gAgentWearables.getWearableIndex(wearable_ptr,index))
{
// we're no longer wearing the wearable we were last editing, switch back to outfit editor
showOutfitEditPanel();
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/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index d6c8ba10f6..d112118082 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -2106,7 +2106,7 @@ LLWearableType::EType LLViewerInventoryItem::getWearableType() const
{
return LLWearableType::WT_INVALID;
}
- return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
+ return LLWearableType::inventoryFlagsToWearableType(getFlags());
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3b0adcf7f4..482ae76613 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;
}
};
@@ -2994,11 +2991,11 @@ class LLAvatarCheckImpostorMode : public view_listener_t
switch (mode)
{
case 0:
- return (avatar->getVisualMuteSettings() == LLVOAvatar::VISUAL_MUTE_NOT_SET);
+ return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_RENDER_NORMALLY);
case 1:
- return (avatar->getVisualMuteSettings() == LLVOAvatar::ALWAYS_VISUAL_MUTE);
+ return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_DO_NOT_RENDER);
case 2:
- return (avatar->getVisualMuteSettings() == LLVOAvatar::NEVER_VISUAL_MUTE);
+ return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER);
default:
return false;
}
@@ -3020,19 +3017,18 @@ class LLAvatarSetImpostorMode : public view_listener_t
switch (mode)
{
case 0:
- avatar->setVisualMuteSettings(LLVOAvatar::VISUAL_MUTE_NOT_SET);
+ avatar->setVisualMuteSettings(LLVOAvatar::AV_RENDER_NORMALLY);
break;
case 1:
- avatar->setVisualMuteSettings(LLVOAvatar::ALWAYS_VISUAL_MUTE);
+ avatar->setVisualMuteSettings(LLVOAvatar::AV_DO_NOT_RENDER);
break;
case 2:
- avatar->setVisualMuteSettings(LLVOAvatar::NEVER_VISUAL_MUTE);
+ avatar->setVisualMuteSettings(LLVOAvatar::AV_ALWAYS_RENDER);
break;
default:
return false;
}
- avatar->forceUpdateVisualMuteSettings();
LLVOAvatar::cullAvatarsByPixelArea();
return true;
} // handleEvent()
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a2c0a91ea6..382f077601 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4942,12 +4942,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);
@@ -4956,6 +4951,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 92e07c52a5..6d251dd9a4 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 e317989f04..0f3b201c1a 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -677,10 +677,10 @@ 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",
+ addText(xpos, ypos, llformat("%s : rez %d, complexity %d, bytes %d area %.2f",
trunc_name.c_str(),
avatar->getRezzedStatus(),
avatar->getVisualComplexity(),
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6e0d77b10a..b49ea1b4bb 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -114,8 +114,6 @@ extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG;
const F32 MAX_HOVER_Z = 2.0;
const F32 MIN_HOVER_Z = -2.0;
-// #define OUTPUT_BREAST_DATA
-
using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
@@ -182,6 +180,8 @@ const F32 NAMETAG_UPDATE_THRESHOLD = 0.3f;
const F32 NAMETAG_VERTICAL_SCREEN_OFFSET = 25.f;
const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f;
+const S32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0;
+
enum ERenderName
{
RENDER_NAME_NEVER,
@@ -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; // overwridden by RenderAvatarMaxNonImpostors
BOOL LLVOAvatar::sJointDebug = FALSE;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
@@ -668,7 +668,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mSpecialRenderMode(0),
mAttachmentGeometryBytes(-1),
mAttachmentSurfaceArea(-1.f),
- mReportedVisualComplexity(-1),
+ mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mTurning(FALSE),
mLastSkeletonSerialNum( 0 ),
mIsSitting(FALSE),
@@ -698,22 +698,24 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mNeedsSkin(FALSE),
mLastSkinTime(0.f),
mUpdatePeriod(1),
+ mVisualComplexityStale(true),
+ mVisuallyMuteSetting(AV_RENDER_NORMALLY),
+ mMutedAVColor(calcMutedAVColor(getID())),
mFirstFullyVisible(TRUE),
mFullyLoaded(FALSE),
mPreviousFullyLoaded(FALSE),
mFullyLoadedInitialized(FALSE),
- mVisualComplexity(0),
- mVisualComplexityStale(TRUE),
+ mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mLoadedCallbacksPaused(FALSE),
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
mLastRezzedStatus(-1),
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
mLastUpdateRequestCOFVersion(-1),
- mLastUpdateReceivedCOFVersion(-1),
- mCachedMuteListUpdateTime(0),
- mCachedInMuteList(false)
+ mLastUpdateReceivedCOFVersion(-1)
{
+ LL_DEBUGS("AvatarRender") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL;
+
//VTResume(); // VTune
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
@@ -721,8 +723,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
- LL_DEBUGS("Avatar") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL;
-
mPelvisp = NULL;
mDirtyMesh = 2; // Dirty geometry, need to regenerate.
@@ -771,17 +771,10 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mDebugExistenceTimer.reset();
mLastAppearanceMessageTimer.reset();
- if(LLSceneMonitor::getInstance()->isEnabled())
+ if(LLSceneMonitor::getInstance()->isEnabled())
{
- LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
+ LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
}
-
- mCachedVisualMute = !isSelf();
- mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() + 5.0;
- mVisuallyMuteSetting = VISUAL_MUTE_NOT_SET;
-
- F32 color_value = (F32) (getID().mData[0]);
- mMutedAVColor = calcMutedAVColor(color_value, 0, 256);
}
std::string LLVOAvatar::avString() const
@@ -2150,7 +2143,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
idleUpdateNameTag( root_pos_last );
- idleUpdateRenderCost();
+ idleUpdateRenderComplexity();
}
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
@@ -2490,19 +2483,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();
}
@@ -3081,108 +3077,31 @@ 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
+ if (mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
- // 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);
-
- if (mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE)
- { // Always want to see this AV as an impostor
- muted = true;
- }
- else if (mVisuallyMuteSetting == NEVER_VISUAL_MUTE)
- { // Never show as impostor
- muted = false;
- }
- else
- {
- F64 now = LLFrameTimer::getTotalSeconds();
-
- if (now < mCachedVisualMuteUpdateTime)
- { // Use cached mute value
- muted = mCachedVisualMute;
- }
- else
- { // Determine if visually muted or not
-
- U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5));
-
- muted = (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);
- }
- }
- }
-
- // Save visual mute state and set interval for updating
- const F64 SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES = 1.5;
- mCachedVisualMuteUpdateTime = now + SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES;
- mCachedVisualMute = muted;
- }
- }
+ muted = false;
+ }
+ else if (mVisuallyMuteSetting == AV_DO_NOT_RENDER)
+ { // Always want to see this AV as an impostor
+ muted = true;
+ }
+ else
+ {
+ muted = isTooComplex();
}
}
- return muted || isInMuteList();
-}
-
-void LLVOAvatar::forceUpdateVisualMuteSettings()
-{
- // Set the cache time so it's updated ASAP
- mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() - 1.0;
-}
-
-bool LLVOAvatar::isInMuteList()
-{
- bool muted = false;
- F64 now = LLFrameTimer::getTotalSeconds();
- if (now < mCachedMuteListUpdateTime)
- {
- muted = mCachedInMuteList;
- }
- else
- {
- muted = LLMuteList::getInstance()->isMuted(getID());
-
- const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
- mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
- mCachedInMuteList = muted;
- }
return muted;
}
@@ -3329,18 +3248,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 ( ! shouldImpostor()
+ || 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 ( shouldImpostor(4) )
{ //background avatars are REALLY slow updating impostors
mUpdatePeriod = 16;
}
- else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 3)
+ else if ( shouldImpostor(3) )
{ //back 25% of max visible avatars are slow updating impostors
mUpdatePeriod = 8;
}
@@ -3924,6 +3843,10 @@ void LLVOAvatar::updateVisibility()
}
}
+ if ( visible != mVisible )
+ {
+ LL_DEBUGS("AvatarRender") << "visible was " << mVisible << " now " << visible << LL_ENDL;
+ }
mVisible = visible;
}
@@ -4196,8 +4119,8 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
}
// Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair)
// TODO: 1.25 will be able to switch this logic back to calling isTextureVisible();
- if ( ( getImage(TEX_HAIR_BAKED, 0) &&
- getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE ) || LLDrawPoolAlpha::sShowDebugAlpha)
+ if ( (getImage(TEX_HAIR_BAKED, 0) && getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE)
+ || LLDrawPoolAlpha::sShowDebugAlpha)
{
LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR);
if (hair_mesh)
@@ -5815,7 +5738,7 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
return 0;
}
- mVisualComplexityStale = TRUE;
+ updateVisualComplexity();
if (viewer_object->isSelected())
{
@@ -5964,7 +5887,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
if (attachment->isObjectAttached(viewer_object))
{
- mVisualComplexityStale = TRUE;
+ updateVisualComplexity();
cleanupAttachedMesh( viewer_object );
attachment->removeObject(viewer_object);
@@ -6255,26 +6178,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()
@@ -6452,7 +6363,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);
@@ -6524,14 +6435,26 @@ BOOL LLVOAvatar::isFullyLoaded() const
bool LLVOAvatar::isTooComplex() const
{
- if (gSavedSettings.getS32("RenderAvatarComplexityLimit") > 0 && mVisualComplexity >= gSavedSettings.getS32("RenderAvatarComplexityLimit"))
+ bool too_complex;
+ if (isSelf())
{
- return true;
+ too_complex = false;
+ }
+ else
+ {
+ // Determine if visually muted or not
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U);
+ static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0U);
+ static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0.0f);
+ too_complex = ((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)
+ );
}
- return false;
-}
+ return too_complex;
+}
//-----------------------------------------------------------------------------
// findMotion()
@@ -8128,28 +8051,44 @@ U32 LLVOAvatar::getPartitionType() const
}
//static
-void LLVOAvatar::updateImpostors()
+void LLVOAvatar::updateImpostors()
{
- LLCharacter::sAllowInstancesChange = FALSE ;
+ LLCharacter::sAllowInstancesChange = FALSE;
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- iter != LLCharacter::sInstances.end(); ++iter)
+ iter != LLCharacter::sInstances.end(); ++iter)
{
LLVOAvatar* avatar = (LLVOAvatar*) *iter;
- if (!avatar->isDead() && avatar->needsImpostorUpdate() && avatar->isVisible() && avatar->isImpostor())
+ if (!avatar->isDead() && avatar->isVisible()
+ && (avatar->isImpostor() && avatar->needsImpostorUpdate())
+ && (avatar->getVisualMuteSettings() != AV_DO_NOT_RENDER))
{
gPipeline.generateImpostor(avatar);
}
+ else
+ {
+ LL_DEBUGS_ONCE("AvatarRender") << "Avatar " << avatar->getID()
+ << (avatar->isDead() ? " _is_ " : " is not ") << "dead"
+ << (avatar->needsImpostorUpdate() ? " needs " : " _does_not_need_ ") << "impostor update"
+ << (avatar->isVisible() ? " is " : " _is_not_ ") << "visible"
+ << (avatar->isImpostor() ? " is " : " is not ") << "impostor"
+ << (avatar->isTooComplex() ? " is " : " is not ") << "too complex"
+ << LL_ENDL;
+ }
}
- LLCharacter::sAllowInstancesChange = TRUE ;
+ LLCharacter::sAllowInstancesChange = TRUE;
}
BOOL LLVOAvatar::isImpostor()
{
- return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE;
+ return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
}
+BOOL LLVOAvatar::shouldImpostor(const U32 rank_factor) const
+{
+ return (!isSelf() && sUseImpostors && mVisibilityRank > (sMaxNonImpostors * rank_factor));
+}
BOOL LLVOAvatar::needsImpostorUpdate() const
{
@@ -8190,68 +8129,183 @@ 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);
+ if ( oldflg != sUseImpostors )
+ {
+ LL_DEBUGS("AvatarRender")
+ << "was " << (oldflg ? "use" : "don't use" ) << " impostors (max " << oldmax << "); "
+ << "now " << (sUseImpostors ? "use" : "don't use" ) << " impostors (max " << sMaxNonImpostors << "); "
+ << LL_ENDL;
+ }
+}
- calculateUpdateRenderCost(); // Update mVisualComplexity if needed
-
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME))
+
+void LLVOAvatar::idleUpdateRenderComplexity()
+{
+ // Render Complexity
+ calculateUpdateRenderComplexity(); // Update mVisualComplexity if needed
+
+ 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 and isTooComplex methods.
+ */
+
+ 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(isImpostor() ? 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
}
}
+void LLVOAvatar::updateVisualComplexity()
+{
+ LL_DEBUGS("AvatarRender") << "avatar " << getID() << " appearance changed" << LL_ENDL;
+ // Set the cache time to in the past so it's updated ASAP
+ mVisualComplexityStale = true;
+ LLCachedControl<U32> show_my_complexity_changes(gSavedSettings, "ShowMyComplexityChanges", 5);
+
+ if ( isSelf() && show_my_complexity_changes )
+ {
+ // @TODO
+ LL_INFOS("AvatarRender") << "popup that displays my complexity (" << mVisualComplexity << ")"
+ << " for " << show_my_complexity_changes << " seconds"
+ << LL_ENDL;
+ }
+
+
+}
+
// 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;
if (mVisualComplexityStale)
{
- mVisualComplexityStale = FALSE;
- U32 cost = 0;
+ U32 cost = VISUAL_COMPLEXITY_UNKNOWN;
LLVOVolume::texture_cost_t textures;
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)
@@ -8281,10 +8335,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;
}
}
}
@@ -8331,17 +8387,31 @@ void LLVOAvatar::calculateUpdateRenderCost()
}
}
+ if ( cost != mVisualComplexity )
+ {
+ LL_DEBUGS("AvatarRender") << "Avatar "<< getID()
+ << " complexity updated was " << mVisualComplexity << " now " << cost
+ << " reported " << mReportedVisualComplexity
+ << LL_ENDL;
+ }
+ {
+ LL_DEBUGS("AvatarRender") << "Avatar "<< getID()
+ << " complexity updated no change " << mVisualComplexity
+ << " reported " << mReportedVisualComplexity
+ << LL_ENDL;
+ }
mVisualComplexity = cost;
+ mVisualComplexityStale = false;
}
}
// 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
@@ -8355,12 +8425,9 @@ 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 << " muted color " << std::setprecision(3) << new_color << LL_ENDL;
return new_color;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 1c3f4f2aa7..a49aa73035 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -251,9 +251,10 @@ 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 updateVisualComplexity() { mVisualComplexityStale = TRUE; }
+ void idleUpdateRenderComplexity();
+ void calculateUpdateRenderComplexity();
+ static const S32 VISUAL_COMPLEXITY_UNKNOWN;
+ void updateVisualComplexity();
S32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry
@@ -264,7 +265,7 @@ public:
S32 getUpdatePeriod() { return mUpdatePeriod; };
const LLColor4 & getMutedAVColor() { return mMutedAVColor; };
-
+ static void updateImpostorRendering(U32 newMaxNonImpostorsValue);
void idleUpdateBelowWater();
@@ -274,10 +275,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 +304,9 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
- bool isTooComplex() 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 +322,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; }
@@ -334,8 +337,6 @@ private:
BOOL mPreviousFullyLoaded;
BOOL mFullyLoadedInitialized;
S32 mFullyLoadedFrameCounter;
- S32 mVisualComplexity;
- BOOL mVisualComplexityStale;
LLColor4 mMutedAVColor;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
@@ -382,16 +383,14 @@ public:
public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
- bool isVisuallyMuted();
- bool isInMuteList();
- void setCachedVisualMute(bool muted) { mCachedVisualMute = muted; };
+ bool isVisuallyMuted() const;
void forceUpdateVisualMuteSettings();
enum VisualMuteSettings
{
- VISUAL_MUTE_NOT_SET = 0,
- ALWAYS_VISUAL_MUTE = 1,
- NEVER_VISUAL_MUTE = 2
+ AV_RENDER_NORMALLY = 0,
+ AV_DO_NOT_RENDER = 1,
+ AV_ALWAYS_RENDER = 2
};
void setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; };
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
@@ -409,8 +408,6 @@ public:
S32 mAttachmentGeometryBytes; //number of bytes in attached geometry
F32 mAttachmentSurfaceArea; //estimated surface area of attachments
- S32 mReportedVisualComplexity; // Numbers as reported by the SL server
-
private:
bool shouldAlphaMask();
@@ -420,11 +417,11 @@ 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 isTooComplex method uses these mutable values to avoid recalculating too frequently
+ mutable S32 mVisualComplexity;
+ mutable bool mVisualComplexityStale;
+ S32 mReportedVisualComplexity; // from other viewers through the simulator
- bool mCachedInMuteList;
- F64 mCachedMuteListUpdateTime;
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
@@ -467,6 +464,7 @@ private:
//--------------------------------------------------------------------
public:
BOOL isImpostor();
+ BOOL shouldImpostor(const U32 rank_factor = 1) const;
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
const LLVector2& getImpostorDim() const;
@@ -701,7 +699,6 @@ private:
public:
BOOL isVisible() const;
void setVisibilityRank(U32 rank);
- U32 getVisibilityRank() const { return mVisibilityRank; } // unused
static S32 sNumVisibleAvatars; // Number of instances of this class
/** Appearance
** **
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 1e9945b514..33b26c8354 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -434,7 +434,7 @@ BOOL LLVOAvatarSelf::buildMenus()
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
- if (attachment->getGroup() == i)
+ if (attachment && attachment->getGroup() == i)
{
LLMenuItemCallGL::Params item_params;
@@ -473,7 +473,7 @@ BOOL LLVOAvatarSelf::buildMenus()
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
- if (attachment->getGroup() == i)
+ if (attachment && attachment->getGroup() == i)
{
LLMenuItemCallGL::Params item_params;
std::string sub_piemenu_name = attachment->getName();
@@ -506,7 +506,7 @@ BOOL LLVOAvatarSelf::buildMenus()
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
- if (attachment->getGroup() == 8)
+ if (attachment && attachment->getGroup() == 8)
{
LLMenuItemCallGL::Params item_params;
std::string sub_piemenu_name = attachment->getName();
@@ -608,7 +608,7 @@ BOOL LLVOAvatarSelf::buildMenus()
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
- if(attachment->getGroup() == group)
+ if(attachment && attachment->getGroup() == group)
{
// use multimap to provide a partial order off of the pie slice key
S32 pie_index = attachment->getPieSlice();
@@ -1570,8 +1570,16 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex t
return LLVOAvatar::isTextureVisible(type);
}
- U32 index = gAgentWearables.getWearableIndex(wearable);
- return isTextureVisible(type,index);
+ U32 index;
+ if (gAgentWearables.getWearableIndex(wearable,index))
+ {
+ return isTextureVisible(type,index);
+ }
+ else
+ {
+ LL_WARNS() << "Wearable not found" << LL_ENDL;
+ return FALSE;
+ }
}
bool LLVOAvatarSelf::areTexturesCurrent() const
@@ -1916,7 +1924,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 +1952,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const
<< (skin_count ? "" : "SKIN ")
<< LL_ENDL;
}
- return TRUE;
+ return true;
}
if (!isTextureDefined(TEX_HAIR, 0))
@@ -1953,7 +1961,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 +1973,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 +1983,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 +2004,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/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index fac0fd63ee..888ead0613 100755
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -894,13 +894,13 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
setMenuItemVisible(menu, "wear_wear", n_already_worn == 0 && n_worn == 0 && can_be_worn);
setMenuItemEnabled(menu, "wear_wear", n_already_worn == 0 && n_worn == 0);
setMenuItemVisible(menu, "wear_add", wear_add_visible);
- setMenuItemEnabled(menu, "wear_add", canAddWearables(ids));
+ setMenuItemEnabled(menu, "wear_add", LLAppearanceMgr::instance().canAddWearables(ids));
setMenuItemVisible(menu, "wear_replace", n_worn == 0 && n_already_worn != 0 && can_be_worn);
//visible only when one item selected and this item is worn
setMenuItemVisible(menu, "edit", !standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1);
setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1 && n_items == 1);
setMenuItemVisible(menu, "create_new", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1);
- setMenuItemEnabled(menu, "create_new", canAddWearables(ids));
+ setMenuItemEnabled(menu, "create_new", LLAppearanceMgr::instance().canAddWearables(ids));
setMenuItemVisible(menu, "show_original", !standalone);
setMenuItemEnabled(menu, "show_original", n_items == 1 && n_links == n_items);
setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && n_worn == n_items);
@@ -1004,65 +1004,4 @@ void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id)
LLAgentWearables::createWearable(item->getWearableType(), true);
}
-// Returns true if all the given objects and clothes can be added.
-// static
-bool LLWearableItemsList::ContextMenu::canAddWearables(const uuid_vec_t& item_ids)
-{
- // TODO: investigate wearables may not be loaded at this point EXT-8231
-
- U32 n_objects = 0;
- boost::unordered_map<LLWearableType::EType, U32> clothes_by_type;
-
- // Count given clothes (by wearable type) and objects.
- for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it)
- {
- LLViewerInventoryItem* item = gInventory.getItem(*it);
- if (!item)
- {
- return false;
- }
-
- if (item->getType() == LLAssetType::AT_OBJECT)
- {
- ++n_objects;
- }
- else if (item->getType() == LLAssetType::AT_CLOTHING)
- {
- ++clothes_by_type[item->getWearableType()];
- }
- else
- {
- LL_WARNS() << "Unexpected wearable type" << LL_ENDL;
- return false;
- }
- }
-
- // Check whether we can add all the objects.
- if (!isAgentAvatarValid() || !gAgentAvatarp->canAttachMoreObjects(n_objects))
- {
- return false;
- }
-
- // Check whether we can add all the clothes.
- boost::unordered_map<LLWearableType::EType, U32>::const_iterator m_it;
- for (m_it = clothes_by_type.begin(); m_it != clothes_by_type.end(); ++m_it)
- {
- LLWearableType::EType w_type = m_it->first;
- U32 n_clothes = m_it->second;
-
- U32 wearable_count = gAgentWearables.getWearableCount(w_type);
- if ((wearable_count > 0) && !LLWearableType::getAllowMultiwear(w_type))
- {
- return false;
- }
- if ((wearable_count + n_clothes) > LLAgentWearables::MAX_CLOTHING_PER_TYPE)
- {
- return false;
- }
-
- }
-
- return true;
-}
-
// EOF
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index c731a7d6cf..e6788ab249 100755
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -429,7 +429,6 @@ public:
static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val);
static void updateMask(U32& mask, LLAssetType::EType at);
static void createNewWearable(const LLUUID& item_id);
- static bool canAddWearables(const uuid_vec_t& item_ids);
LLWearableItemsList* mParent;
};
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 03712c1065..4365c28a5e 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 =
@@ -11303,16 +11304,25 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
if (!avatar || !avatar->mDrawable)
{
+ LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL;
return;
}
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL;
assertInitialized();
bool visually_muted = avatar->isVisuallyMuted();
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
+ << " is " << ( visually_muted ? "" : "not ") << "visually muted"
+ << LL_ENDL;
+ bool too_complex = avatar->isTooComplex();
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
+ << " is " << ( too_complex ? "" : "not ") << "too complex"
+ << LL_ENDL;
pushRenderTypeMask();
- if (visually_muted)
+ if (visually_muted || too_complex)
{
andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
}
@@ -11357,7 +11367,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 ???
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
@@ -11470,7 +11480,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
F32 old_alpha = LLDrawPoolAvatar::sMinimumAlpha;
- if (visually_muted)
+ if (visually_muted || too_complex)
{ //disable alpha masking for muted avatars (get whole skin silhouette)
LLDrawPoolAvatar::sMinimumAlpha = 0.f;
}
@@ -11532,7 +11542,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLGLDisable blend(GL_BLEND);
- if (visually_muted)
+ if (visually_muted || too_complex)
{
gGL.setColorMask(true, true);
}
@@ -11561,13 +11571,16 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
}
- if (LLMuteList::getInstance()->isMuted(avatar->getID()))
- { //grey muted avatar
- gGL.diffuseColor4ub(64,64,64,255);
+ if (too_complex)
+ { // Visually muted avatar
+ LLColor4 muted_color(avatar->getMutedAVColor());
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set jellybaby " << muted_color << LL_ENDL;
+ gGL.diffuseColor4fv( muted_color.mV );
}
else
- { // Visually muted avatar
- gGL.diffuseColor4fv( avatar->getMutedAVColor().mV );
+ { //grey muted avatar
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " set grey" << LL_ENDL;
+ gGL.diffuseColor4ub(64,64,64,255);
}
{
@@ -11594,7 +11607,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
- LLVOAvatar::sUseImpostors = TRUE;
+ LLVOAvatar::sUseImpostors = true; // @TODO ???
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_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index ba91b0b5d9..0cb412ad9a 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -116,8 +116,8 @@
<menu_item_separator />
<menu_item_check
- name="Normal"
- label="Normal Rendering">
+ name="RenderNormally"
+ label="Render Normally">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="0" />
@@ -126,8 +126,8 @@
parameter="0" />
</menu_item_check>
<menu_item_check
- name="Always use impostor"
- label="Always use impostor">
+ name="DoNotRender"
+ label="Do Not Render">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="1" />
@@ -136,8 +136,8 @@
parameter="1" />
</menu_item_check>
<menu_item_check
- name="Never use impostor"
- label="Never use impostor">
+ name="AlwaysRenderFully"
+ label="Always Render Fully">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="2" />
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index cfbbe41f95..9fb1fd2aff 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -106,8 +106,8 @@
<menu_item_separator />
<menu_item_check
- name="Normal"
- label="Normal Rendering">
+ name="RenderNormally"
+ label="Render Normally">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="0" />
@@ -116,8 +116,8 @@
parameter="0" />
</menu_item_check>
<menu_item_check
- name="Always use impostor"
- label="Always use impostor">
+ name="DoNotRender"
+ label="Do Not Render">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="1" />
@@ -126,8 +126,8 @@
parameter="1" />
</menu_item_check>
<menu_item_check
- name="Never use impostor"
- label="Never use impostor">
+ name="AlwaysRenderFully"
+ label="Always Render Fully">
<menu_item_check.on_check
function="Avatar.CheckImpostorMode"
parameter="2" />
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index e0cc73f894..cb81138268 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1540,14 +1540,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
@@ -2678,26 +2678,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 bd8099ef1f..de7c27af65 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7678,6 +7678,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 3344b97794..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 f77678e5f8..0b605fc3be 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4046,5 +4046,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>
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 32cf9d3df6..cae6bded9f 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -387,9 +387,13 @@ class Windows_i686_Manifest(ViewerManifest):
if self.args['configuration'].lower() == 'debug':
self.path("msvcr120d.dll")
self.path("msvcp120d.dll")
+ self.path("msvcr100d.dll")
+ self.path("msvcp100d.dll")
else:
self.path("msvcr120.dll")
self.path("msvcp120.dll")
+ self.path("msvcr100.dll")
+ self.path("msvcp100.dll")
# Vivox runtimes
self.path("SLVoice.exe")