summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-01-11 18:52:27 -0500
committerOz Linden <oz@lindenlab.com>2013-01-11 18:52:27 -0500
commit7d56fb04dfdf47768e2e81ec80d15737370af271 (patch)
tree29a9188f7ad87c687afca4f26f6f75649f19a5f4 /indra/llrender
parent597b374f382946b95d556af82cad612124b3211a (diff)
parentde0863ed6e91fda0c1b5342b9fecf07c4af47d63 (diff)
merge gamma correction rendering
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp9
-rw-r--r--indra/llrender/llgl.h2
-rw-r--r--indra/llrender/llshadermgr.cpp3
-rw-r--r--indra/llrender/llshadermgr.h4
4 files changed, 18 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 0b56b3889c..ab6310f545 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -969,6 +969,15 @@ void LLGLManager::initExtensions()
ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts) &&
ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts);
#endif
+#ifdef GL_EXT_texture_sRGB
+ mHassRGBTexture = ExtensionExists("GL_EXT_texture_sRGB", gGLHExts.mSysExts);
+#endif
+
+#ifdef GL_ARB_framebuffer_sRGB
+ mHassRGBFramebuffer = ExtensionExists("GL_ARB_framebuffer_sRGB", gGLHExts.mSysExts);
+#else
+ mHassRGBFramebuffer = ExtensionExists("GL_EXT_framebuffer_sRGB", gGLHExts.mSysExts);
+#endif
mHasMipMapGeneration = mHasFramebufferObject || mGLVersion >= 1.4f;
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index d70e764769..1e921d1e97 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -115,6 +115,8 @@ public:
BOOL mHasARBEnvCombine;
BOOL mHasCubeMap;
BOOL mHasDebugOutput;
+ BOOL mHassRGBTexture;
+ BOOL mHassRGBFramebuffer;
// Vendor-specific extensions
BOOL mIsATI;
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 3b1ec281c9..e52411ebe5 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -1121,6 +1121,9 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("lightMap");
mReservedUniforms.push_back("bloomMap");
mReservedUniforms.push_back("projectionMap");
+
+ mReservedUniforms.push_back("global_gamma");
+ mReservedUniforms.push_back("texture_gamma");
llassert(mReservedUniforms.size() == END_RESERVED_UNIFORMS);
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 4b93aae735..a711a64919 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -164,6 +164,10 @@ public:
DEFERRED_LIGHT,
DEFERRED_BLOOM,
DEFERRED_PROJECTION,
+
+ GLOBAL_GAMMA,
+ TEXTURE_GAMMA,
+
END_RESERVED_UNIFORMS
} eGLSLReservedUniforms;