diff options
author | Graham Madarasz (Graham) <graham@lindenlab.com> | 2013-05-03 09:16:15 -0700 |
---|---|---|
committer | Graham Madarasz (Graham) <graham@lindenlab.com> | 2013-05-03 09:16:15 -0700 |
commit | 9187a06d0bc70ea7670192a5fe53f75ef6f36259 (patch) | |
tree | 9e902c03d217e9698e7707406defa259b87cc5a3 | |
parent | 419a06036b8ec172bdfa91ab7f1f7691cdbdb2ca (diff) |
NORSPEC-151 make disabling bumpyshiny disable adv lighting model as well
-rwxr-xr-x | indra/newview/llface.cpp | 1 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llvovolume.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/pipeline.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml | 23 |
5 files changed, 22 insertions, 13 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 879dbf8470..999bfc48ef 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1331,6 +1331,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) { + llassert(tep->getShiny() <= 3); color.mV[3] = U8 (alpha[tep->getShiny()] * 255); } } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index bbf88060c1..b45c944a5f 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1089,8 +1089,9 @@ void LLFloaterPreference::refreshEnabledState() ctrl_reflections->setEnabled(reflections); // Bump & Shiny + LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny"); bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); - getChild<LLCheckBoxCtrl>("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE); + bumpshiny_ctrl->setEnabled(bumpshiny ? TRUE : FALSE); radio_reflection_detail->setEnabled(reflections); @@ -1149,6 +1150,7 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) && shaders && gGLManager.mHasFramebufferObject && gSavedSettings.getBOOL("RenderAvatarVP") && @@ -2319,3 +2321,4 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() } } + diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a08a8a9676..9b940300f5 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4152,7 +4152,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_vec.push_back(draw_info); draw_info->mTextureMatrix = tex_mat; draw_info->mModelMatrix = model_mat; - if (mat) + if (mat && LLPipeline::sRenderBump && LLPipeline::sRenderDeferred) { // We have a material. Update our draw info accordingly. draw_info->mMaterial = mat; @@ -4178,6 +4178,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, 0.5f, 0.75f }; + llassert(shiny <= 3); float spec = alpha[shiny]; LLVector4 specColor(spec, spec, spec, spec); draw_info->mSpecColor = specColor; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c62f099e3b..7317996de6 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1018,7 +1018,8 @@ void LLPipeline::updateRenderDeferred() { BOOL deferred = ((RenderDeferred && LLRenderTarget::sUseFBO && - LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && VertexShaderEnable && RenderAvatarVP && WindLightUseAtmosShaders) ? TRUE : FALSE) && 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 708dcf4e95..d7db7caf66 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -211,16 +211,19 @@ 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 + 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" |