From 190ff3c346ae8f86b4533fd03f7a0dcb0808dde3 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 18 Jul 2011 10:39:02 -0500
Subject: [PATCH] SH-2031 Fix for link error in llui_libtest

---
 indra/llrender/llglslshader.cpp     | 4 ++++
 indra/llrender/llglslshader.h       | 6 ++++++
 indra/newview/llviewershadermgr.cpp | 2 --
 indra/newview/llviewershadermgr.h   | 4 ----
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index c582858413d..80c93bb0d23 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -51,6 +51,10 @@ using std::string;
 GLhandleARB LLGLSLShader::sCurBoundShader = 0;
 bool LLGLSLShader::sNoFixedFunction = false;
 
+//UI shader -- declared here so llui_libtest will link properly
+LLGLSLShader	gUIProgram;
+LLGLSLShader	gSolidColorProgram;
+
 BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
 {
 	return v1 != v2;
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 24562c3c42c..621e0b82eea 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -142,4 +142,10 @@ class LLGLSLShader
 	std::string mName;
 };
 
+//UI shader (declared here so llui_libtest will link properly)
+extern LLGLSLShader			gUIProgram;
+//output vec4(color.rgb,color.a*tex0[tc0].a)
+extern LLGLSLShader			gSolidColorProgram;
+
+
 #endif
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 812b03a2e6c..a772777495c 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -63,11 +63,9 @@ LLVector4			gShinyOrigin;
 
 //utility shaders
 LLGLSLShader	gOcclusionProgram;
-LLGLSLShader	gUIProgram;
 LLGLSLShader	gCustomAlphaProgram;
 LLGLSLShader	gGlowCombineProgram;
 LLGLSLShader	gTwoTextureAddProgram;
-LLGLSLShader	gSolidColorProgram;
 
 //object shaders
 LLGLSLShader		gObjectSimpleProgram;
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 6b22e83a9f7..93a0ecc4f04 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -289,16 +289,12 @@ extern LLVector4			gShinyOrigin;
 
 //utility shaders
 extern LLGLSLShader			gOcclusionProgram;
-extern LLGLSLShader			gUIProgram;
 extern LLGLSLShader			gCustomAlphaProgram;
 extern LLGLSLShader			gGlowCombineProgram;
 
 //output tex0[tc0] + tex1[tc1]
 extern LLGLSLShader			gTwoTextureAddProgram;
 								
-//output vec4(color.rgb,color.a*tex0[tc0].a)
-extern LLGLSLShader			gSolidColorProgram;
-
 //object shaders
 extern LLGLSLShader			gObjectSimpleProgram;
 extern LLGLSLShader			gObjectSimpleWaterProgram;
-- 
GitLab