diff options
author | Jonathan Goodman <geenz@geenzo.com> | 2012-08-29 04:56:54 -0400 |
---|---|---|
committer | Jonathan Goodman <geenz@geenzo.com> | 2012-08-29 04:56:54 -0400 |
commit | e606677ed885c4e9189b0768b5e6f999fa2cf885 (patch) | |
tree | bca76b8c003506acc0d6f595f4beaa4bd5fcf6aa /indra/llrender | |
parent | c911efb953a600092a6213c088d5b94fcf7779d3 (diff) |
Added the ability to remove a preprocessor define.
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 5 | ||||
-rw-r--r-- | indra/llrender/llglslshader.h | 1 |
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, |