FIRE-6004: Wired up reloading for shaders where necessary and removed unnecessary callbacks
parent
53c80993fb
commit
b2887f6b1f
|
|
@ -38,10 +38,25 @@
|
|||
#include "lltimectrl.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lldrawpoolbump.h"
|
||||
#include "llviewertexturelist.h"
|
||||
|
||||
// Ansariel: Copied from llviewercontrol.cpp, handleSetShaderChanged()
|
||||
static void handleShaderChanged()
|
||||
{
|
||||
// changing shader level may invalidate existing cached bump maps, as the shader type determines the format of the bump map it expects - clear and repopulate the bump cache
|
||||
gBumpImageList.destroyGL();
|
||||
gBumpImageList.restoreGL();
|
||||
|
||||
// else, leave terrain detail as is
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
}
|
||||
|
||||
FloaterQuickPrefs::FloaterQuickPrefs(const LLSD& key)
|
||||
: LLTransientDockableFloater(NULL,true,key)
|
||||
: LLTransientDockableFloater(NULL, true, key)
|
||||
{
|
||||
// For Phototools
|
||||
mCommitCallbackRegistrar.add("Quickprefs.ShaderChanged", boost::bind(&handleShaderChanged));
|
||||
}
|
||||
|
||||
FloaterQuickPrefs::~FloaterQuickPrefs()
|
||||
|
|
@ -53,7 +68,8 @@ void FloaterQuickPrefs::onOpen(const LLSD& key)
|
|||
}
|
||||
|
||||
|
||||
void FloaterQuickPrefs::initCallbacks(void) {
|
||||
void FloaterQuickPrefs::initCallbacks(void)
|
||||
{
|
||||
LLWLParamManager& param_mgr = LLWLParamManager::instance();
|
||||
getChild<LLUICtrl>("WaterPresetsCombo")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeWaterPreset, this, _1));
|
||||
getChild<LLUICtrl>("WLPresetsCombo")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeSkyPreset, this, _1));
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
</panel>
|
||||
|
||||
<panel name="P_WL_Settings">
|
||||
<check_box label="Einfache Shader - Aktiviert lassen (s. Tooltip!)" name="BasicShaders" tool_tip="Diese Einstellung sollte IMMER eingeschaltet sein, da sie für Schärfentiefe, Licht und Schatten, Ambient Occlusion, Wasserreflektionen und weiteren Features benötigt wird."/>
|
||||
<check_box name="UseLightShaders1" label="Atmosphären-Shader aktivieren (Windlight)" tool_tip="Diese Einstellung aktiviert die komplette Windlight-Funktionalität (Atmosphären-Shader). Falls diese Einstellung nicht aktiviert werden kann, bitte prüfen, ob „Einfache Shader“ weiter unten aktiviert sind."/>
|
||||
</panel>
|
||||
|
||||
|
|
@ -70,7 +71,7 @@
|
|||
</panel>
|
||||
|
||||
<panel name="P_R_Res">
|
||||
<text name="T_R_Res" tool_tip="Legt die Qualität der Wasserreflektionen fest. Damit Änderungen wirksam werden, muss „Einfache Shader“ aus- und wieder eingeschaltet werden. Falls eine Qualität von „Sehr gut“ oder höher verwendet wird, muss „Licht und Schatten“ aktiviert sein (siehe Reiter „Licht“).">
|
||||
<text name="T_R_Res" tool_tip="Legt die Qualität der Wasserreflektionen fest. Falls eine Qualität von „Sehr gut“ oder höher verwendet wird, muss „Licht und Schatten“ aktiviert sein (siehe Reiter „Licht“).">
|
||||
Qualität
|
||||
</text>
|
||||
<combo_box name="ReflectionRescombo">
|
||||
|
|
@ -81,7 +82,6 @@
|
|||
<combo_box.item label="Überragend - HINWEIS: „Licht und Schatten“ muss aktiviert sein (Reiter „Licht“)" name="4"/>
|
||||
<combo_box.item label="Lebensecht - HINWEIS: „Licht und Schatten“ muss aktiviert sein (Reiter „Licht“)" name="5"/>
|
||||
</combo_box>
|
||||
<check_box label="Einfache Shader - Aktiviert lassen (s. Tooltip!)" name="BasicShaders" tool_tip="Diese Einstellung sollte IMMER eingeschaltet sein. Falls der Wert für die Qualität oben geändert wurde, muss diese Option aus- und wieder eingeschaltet werden, damit die Änderungen wirksam werden."/>
|
||||
<check_box label="Transparentes Wasser" name="TransparentWater" tool_tip="Stellt Wasser transparent dar. Falls diese Einstellung deaktiert ist, wird Wasser undurchsichtig und mit einer einfachen Textur versehen dargestellt."/>
|
||||
</panel>
|
||||
</panel>
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
</panel>
|
||||
|
||||
<panel name="P_Texture_Bumpiness">
|
||||
<text name="T_Texture_Bumpiness" tool_tip="Legt die Stärke und Qualität von Normal- und Bump-Maps fest. Die Einstellung „Einfache Shader“ muss aus- und wieder eingeschaltet werden, damit die Änderung wirksam wird.">
|
||||
<text name="T_Texture_Bumpiness" tool_tip="Legt die Stärke und Qualität von Normal- und Bump-Maps fest.">
|
||||
Textur-Holprigkeit
|
||||
</text>
|
||||
<combo_box name="BumpStrengthSelection">
|
||||
|
|
@ -385,7 +385,6 @@
|
|||
<combo_box.item label="Rau (stärker)" name="4"/>
|
||||
<combo_box.item label="Rauer (sehr stark)" name="5"/>
|
||||
</combo_box>
|
||||
<check_box label="Einfache Shader - Aktiviert lassen (s. Tooltip!)" name="BasicShaders1" tool_tip="Diese Einstellung sollte IMMER eingeschaltet sein, da sie für Schärfentiefe, Licht und Schatten, Ambient Occlusion, Wasserreflektionen und weiteren Features benötigt wird. Falls die Textur-Holprigkeit geändert wurde, muss diese Einstellung aus- und wieder eingeschaltet werden."/>
|
||||
</panel>
|
||||
</panel>
|
||||
|
||||
|
|
|
|||
|
|
@ -68,9 +68,21 @@
|
|||
top_pad="5"
|
||||
left="4"
|
||||
width="275"
|
||||
height="30"
|
||||
height="55"
|
||||
border_visible="true"
|
||||
background_visible="true">
|
||||
<check_box
|
||||
control_name="VertexShaderEnable"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Basic Shaders - Leave ON! (see tool tip!)"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
name="BasicShaders"
|
||||
tool_tip="This should ALWAYS be on as it is required for DoF, Shadows and Lights, Ambient Occlusion, Water Reflections and more."
|
||||
top_pad="10"
|
||||
width="240">
|
||||
</check_box>
|
||||
<check_box
|
||||
control_name="WindLightUseAtmosShaders"
|
||||
enabled_control="VertexShaderEnable"
|
||||
|
|
@ -83,8 +95,6 @@
|
|||
top_pad="10"
|
||||
tool_tip="This will enable full WindLight functionality (atmospheric shaders). If you cannot enable this feature, ensure that Basic Shaders are enabled below."
|
||||
width="110">
|
||||
<check_box.commit_callback
|
||||
function="Pref.VertexShaderEnable"/>
|
||||
</check_box>
|
||||
</panel>
|
||||
|
||||
|
|
@ -538,7 +548,7 @@
|
|||
top_pad="5"
|
||||
left="4"
|
||||
width="275"
|
||||
height="83"
|
||||
height="58"
|
||||
border_visible="true"
|
||||
background_visible="true">
|
||||
<text
|
||||
|
|
@ -549,7 +559,7 @@
|
|||
top_pad="15"
|
||||
width="80"
|
||||
layout="topleft"
|
||||
tool_tip="Determines the resolution/quality of water reflections. In order for the changes to take effect, you must toggle off and on the 'Basic Shaders' check box below. Also, whenever resolution settings are set to 'Very Good' or above, you must also enable 'Lighting and Shadows' in tab 'Light'.">
|
||||
tool_tip="Determines the resolution/quality of water reflections. Whenever resolution settings are set to 'Very Good' or above, you must also enable 'Lighting and Shadows' in tab 'Light'.">
|
||||
Resolution
|
||||
</text>
|
||||
<combo_box
|
||||
|
|
@ -586,21 +596,9 @@
|
|||
label="Life-Like - NOTE: You must also enable 'Lighting and Shadows' (Light Tab)"
|
||||
name="5"
|
||||
value="4096"/>
|
||||
<combo_box.commit_callback
|
||||
function="Quickprefs.ShaderChanged"/>
|
||||
</combo_box>
|
||||
<check_box
|
||||
control_name="VertexShaderEnable"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Basic Shaders - Leave ON! (see tool tip!)"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
name="BasicShaders"
|
||||
tool_tip="This should ALWAYS be on. When you change the resolution setting above you must turn this box off and on for the change to take effect."
|
||||
top_pad="10"
|
||||
width="240">
|
||||
<check_box.commit_callback
|
||||
function="Pref.VertexShaderEnable"/>
|
||||
</check_box>
|
||||
<check_box
|
||||
control_name="RenderTransparentWater"
|
||||
height="16"
|
||||
|
|
@ -612,8 +610,6 @@
|
|||
tool_tip="Render water as transparent. Disabling renders water as opaque with a simple texture applied."
|
||||
top_pad="5"
|
||||
width="240">
|
||||
<check_box.commit_callback
|
||||
function="Pref.VertexShaderEnable"/>
|
||||
</check_box>
|
||||
<!--slider
|
||||
control_name="RenderReflectionRes"
|
||||
|
|
@ -690,8 +686,6 @@
|
|||
top_pad="10"
|
||||
tool_tip="This will enable shadows from the Sun and Moon and in-world light sources. It will also allow you to turn on Depth of Field and other graphic features. Basically you need to turn this on to see most of the 'eye candy' in-world. If you cannot enable this feature or see its effect, first ensure both Atmospheric Shaders and Basic Shaders are enabled in tab 'WL'."
|
||||
width="240">
|
||||
<check_box.commit_callback
|
||||
function="Pref.VertexShaderEnable"/>
|
||||
</check_box>
|
||||
<check_box
|
||||
control_name="RenderLocalLights"
|
||||
|
|
@ -3224,10 +3218,10 @@
|
|||
follows="left|top"
|
||||
height="15"
|
||||
left="10"
|
||||
top_pad="12"
|
||||
top_pad="25"
|
||||
width="110"
|
||||
layout="topleft"
|
||||
tool_tip="Controls the strength and resolution of normal and bump maps. You must toggle to check box below for changes to take effect.">
|
||||
tool_tip="Controls the strength and resolution of normal and bump maps.">
|
||||
Texture Bumpiness
|
||||
</text>
|
||||
<combo_box
|
||||
|
|
@ -3264,20 +3258,8 @@
|
|||
name="5"
|
||||
value="16"/>
|
||||
<combo_box.commit_callback
|
||||
function="Pref.QualityPerformance"/>
|
||||
function="Quickprefs.ShaderChanged"/>
|
||||
</combo_box>
|
||||
<check_box
|
||||
follows="left|top"
|
||||
control_name="VertexShaderEnable"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Basic Shaders - Leave ON! (see tool tip!)"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
name="BasicShaders1"
|
||||
tool_tip="This should ALWAYS be on as it is required for DoF, Shadows and Lights, Ambient Occlusion, Water Reflections and more. When you change the Texture Bumpiness setting above you must turn this box off and on for the change to take effect."
|
||||
top_pad="7"
|
||||
width="230"/>
|
||||
</panel>
|
||||
</panel>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue