diff options
author | Armin Weatherwax | 2010-09-07 13:41:02 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:42:40 +0200 |
commit | 087e15e89930d51c3964329befb273ae3b2d330d (patch) | |
tree | 684c49a772b0097ed88a25660e1fd3dd10b264cc /linden/indra/newview/llfloaterhardwaresettings.cpp | |
parent | Robin Cornelius: fixes for building plugins on Linux 64bit (diff) | |
download | meta-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.cpp | 27 |
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 | ||
69 | void LLFloaterHardwareSettings::initCallbacks(void) | 69 | void 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 | ||
128 | void LLFloaterHardwareSettings::refreshState(LLUICtrl*, void*) | ||
129 | { | ||
130 | LLFloaterHardwareSettings::instance()->refreshEnabledState(); | ||
131 | } | ||
132 | |||
111 | // static instance of it | 133 | // static instance of it |
112 | LLFloaterHardwareSettings* LLFloaterHardwareSettings::instance() | 134 | LLFloaterHardwareSettings* 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 | ||