diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-22 00:10:57 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-22 00:10:57 -0500 |
commit | a2d08a6d80c4be7456d30f728da1838e63eb397f (patch) | |
tree | 29736b2700fddedfe453b2eb35808376de16c8dd /indra/newview/llviewershadermgr.cpp | |
parent | 66acb932ba7bbd7fecbe78a34e753b5aab2d2104 (diff) |
SH-2244 Fix "RenderGLCoreProfile" actually make a core profile context and modify viewer to run under said context without generating errors.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 23351fc994..d1d3334fed 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -443,6 +443,20 @@ void LLViewerShaderMgr::setShaders() return; } + if (LLRender::sGLCoreProfile) + { + if (!gSavedSettings.getBOOL("VertexShaderEnable")) + { //vertex shaders MUST be enabled to use core profile + gSavedSettings.setBOOL("VertexShaderEnable", TRUE); + } + + if (!gSavedSettings.getBOOL("RenderTransparentWater")) + { //non-transparent water uses fixed function + gSavedSettings.setBOOL("RenderTransparentWater", TRUE); + } + } + + //setup preprocessor definitions LLShaderMgr::instance()->mDefinitions["samples"] = llformat("%d", gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"))); LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits); |