diff options
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloatersettingsdebug.cpp | 19 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 4 |
3 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ff897ef962..cf6e31fa4d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -568,7 +568,7 @@ static void settings_to_globals() LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile"); LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); - LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); + LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO") && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0; LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = llclamp(gSavedSettings.getF32("RenderVolumeLODFactor"), 0.01f, MAX_LOD_FACTOR); diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index fb202b4c40..73269d0531 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -34,6 +34,7 @@ #include "llcolorswatch.h" #include "llviewercontrol.h" #include "lltexteditor.h" +#include "llviewershadermgr.h" LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) @@ -207,6 +208,11 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) getChildView("val_text")->setVisible( FALSE); mComment->setText(LLStringUtil::null); + getChild<LLUICtrl>("boolean_combo")->setEnabled(true); + getChild<LLUICtrl>("TRUE")->setEnabled(true); + getChild<LLUICtrl>("FALSE")->setEnabled(true); + getChild<LLUICtrl>("default_btn")->setEnabled(true); + if (controlp) { eControlType type = controlp->type(); @@ -288,6 +294,19 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) { getChild<LLUICtrl>("boolean_combo")->setValue(LLSD("")); } + + bool bUseVAO = controlp->getName() == "RenderUseVAO"; + if (bUseVAO) + { + bool use_shaders = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0; + getChild<LLUICtrl>("boolean_combo")->setEnabled(use_shaders); + getChild<LLUICtrl>("TRUE")->setEnabled(use_shaders); + getChild<LLUICtrl>("FALSE")->setEnabled(use_shaders); + getChild<LLUICtrl>("default_btn")->setEnabled(use_shaders); + if (!use_shaders) { + getChild<LLUICtrl>("boolean_combo")->setValue(LLSD(false)); + } + } } break; case TYPE_STRING: diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7c0ba51dd3..54e1ad10b8 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -481,7 +481,7 @@ void LLPipeline::init() sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO"); - LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); + LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO") && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0; LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw"); sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); @@ -7430,7 +7430,7 @@ void LLPipeline::doResetVertexBuffers(bool forced) sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO"); - LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO"); + LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO") && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0; LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw"); LLVertexBuffer::sEnableVBOs = gSavedSettings.getBOOL("RenderVBOEnable"); LLVertexBuffer::sDisableVBOMapping = LLVertexBuffer::sEnableVBOs && gSavedSettings.getBOOL("RenderVBOMappingDisable") ; |