From e606677ed885c4e9189b0768b5e6f999fa2cf885 Mon Sep 17 00:00:00 2001
From: Jonathan Goodman <geenz@geenzo.com>
Date: Wed, 29 Aug 2012 04:56:54 -0400
Subject: [PATCH] Added the ability to remove a preprocessor define.

---
 indra/edit-me-to-trigger-new-build.txt | 1 +
 indra/llrender/llglslshader.cpp        | 5 +++++
 indra/llrender/llglslshader.h          | 1 +
 3 files changed, 7 insertions(+)

diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt
index e69de29bb2d..0519ecba6ea 100644
--- a/indra/edit-me-to-trigger-new-build.txt
+++ b/indra/edit-me-to-trigger-new-build.txt
@@ -0,0 +1 @@
+ 
\ No newline at end of file
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 04878cabe2e..39e81c4bfc2 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 185e6e7aeb8..f511c39484c 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -124,6 +124,7 @@ class LLGLSLShader
 	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, 
-- 
GitLab