aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterhardwaresettings.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2010-09-07 13:41:02 +0200
committerArmin Weatherwax2010-09-23 15:42:40 +0200
commit087e15e89930d51c3964329befb273ae3b2d330d (patch)
tree684c49a772b0097ed88a25660e1fd3dd10b264cc /linden/indra/newview/llfloaterhardwaresettings.cpp
parentRobin Cornelius: fixes for building plugins on Linux 64bit (diff)
downloadmeta-impy-087e15e89930d51c3964329befb273ae3b2d330d.zip
meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.gz
meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.bz2
meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.xz
port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewer 2 texture system
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterhardwaresettings.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloaterhardwaresettings.cpp b/linden/indra/newview/llfloaterhardwaresettings.cpp
index 7886e39..8c91f5a 100644
--- a/linden/indra/newview/llfloaterhardwaresettings.cpp
+++ b/linden/indra/newview/llfloaterhardwaresettings.cpp
@@ -68,6 +68,7 @@ void LLFloaterHardwareSettings::onClickHelp(void* data)
68 68
69void LLFloaterHardwareSettings::initCallbacks(void) 69void LLFloaterHardwareSettings::initCallbacks(void)
70{ 70{
71 childSetCommitCallback("fbo", refreshState);
71} 72}
72 73
73// menu maintenance functions 74// menu maintenance functions
@@ -83,7 +84,8 @@ void LLFloaterHardwareSettings::refresh()
83 mVideoCardMem = gSavedSettings.getS32("TextureMemory"); 84 mVideoCardMem = gSavedSettings.getS32("TextureMemory");
84 mFogRatio = gSavedSettings.getF32("RenderFogRatio"); 85 mFogRatio = gSavedSettings.getF32("RenderFogRatio");
85 mProbeHardwareOnStartup = gSavedSettings.getBOOL("ProbeHardwareOnStartup"); 86 mProbeHardwareOnStartup = gSavedSettings.getBOOL("ProbeHardwareOnStartup");
86 87 mRenderDeferred = gSavedSettings.getBOOL("RenderDeferred");
88 mRenderUseFBO = gSavedSettings.getBOOL("RenderUseFBO");
87 childSetValue("fsaa", (LLSD::Integer) mFSAASamples); 89 childSetValue("fsaa", (LLSD::Integer) mFSAASamples);
88 refreshEnabledState(); 90 refreshEnabledState();
89} 91}
@@ -101,6 +103,20 @@ void LLFloaterHardwareSettings::refreshEnabledState()
101 childSetEnabled("vbo", FALSE); 103 childSetEnabled("vbo", FALSE);
102 } 104 }
103 105
106 if (!gGLManager.mHasFramebufferObject)
107 {
108 childSetEnabled("fbo", FALSE);
109 }
110
111 if (!gGLManager.mHasDrawBuffers || !gSavedSettings.getBOOL("RenderUseFBO"))
112 {
113 childSetEnabled("deferred", FALSE);
114 }
115 else
116 {
117 childSetEnabled("deferred", TRUE);
118 }
119
104 // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance 120 // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
105 childSetEnabled("gamma", !gPipeline.canUseWindLightShaders()); 121 childSetEnabled("gamma", !gPipeline.canUseWindLightShaders());
106 childSetEnabled("(brightness, lower is brighter)", !gPipeline.canUseWindLightShaders()); 122 childSetEnabled("(brightness, lower is brighter)", !gPipeline.canUseWindLightShaders());
@@ -108,6 +124,12 @@ void LLFloaterHardwareSettings::refreshEnabledState()
108 124
109} 125}
110 126
127//static
128void LLFloaterHardwareSettings::refreshState(LLUICtrl*, void*)
129{
130 LLFloaterHardwareSettings::instance()->refreshEnabledState();
131}
132
111// static instance of it 133// static instance of it
112LLFloaterHardwareSettings* LLFloaterHardwareSettings::instance() 134LLFloaterHardwareSettings* LLFloaterHardwareSettings::instance()
113{ 135{
@@ -202,7 +224,8 @@ void LLFloaterHardwareSettings::cancel()
202 gSavedSettings.setS32("TextureMemory", mVideoCardMem); 224 gSavedSettings.setS32("TextureMemory", mVideoCardMem);
203 gSavedSettings.setF32("RenderFogRatio", mFogRatio); 225 gSavedSettings.setF32("RenderFogRatio", mFogRatio);
204 gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup ); 226 gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup );
205 227 gSavedSettings.setBOOL("RenderUseFBO", mRenderUseFBO);
228 gSavedSettings.setBOOL("RenderDeferred", mRenderDeferred);
206 close(); 229 close();
207} 230}
208 231