summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorJonathan Goodman <geenz@geenzo.com>2012-08-29 04:56:54 -0400
committerJonathan Goodman <geenz@geenzo.com>2012-08-29 04:56:54 -0400
commite606677ed885c4e9189b0768b5e6f999fa2cf885 (patch)
treebca76b8c003506acc0d6f595f4beaa4bd5fcf6aa /indra/llrender
parentc911efb953a600092a6213c088d5b94fcf7779d3 (diff)
Added the ability to remove a preprocessor define.
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp5
-rw-r--r--indra/llrender/llglslshader.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 04878cabe2..39e81c4bfc 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -379,6 +379,11 @@ void LLGLSLShader::addPermutation(std::string name, std::string value)
mDefines[name] = value;
}
+void LLGLSLShader::removePermutation(std::string name)
+{
+ mDefines[name].erase();
+}
+
GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type)
{
if (type >= GL_SAMPLER_1D_ARB && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB ||
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 185e6e7aeb..f511c39484 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -124,6 +124,7 @@ public:
GLint mapUniformTextureChannel(GLint location, GLenum type);
void addPermutation(std::string name, std::string value);
+ void removePermutation(std::string name);
//enable/disable texture channel for specified uniform
//if given texture uniform is active in the shader,