From 5433dbee39988fdbe3f2f99510d1a136d5cd61c8 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Wed, 23 Sep 2009 21:04:57 +0000
Subject: [PATCH] fix for EXT-1125:  Mini-map terrain appears green on login
 with Low graphics settings.

---
 indra/newview/llsurface.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index eadb3119190..5440b2c9adf 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -265,7 +265,7 @@ void LLSurface::createWaterTexture()
 	if (!mWaterTexturep)
 	{
 		// Create the water texture
-		/*LLPointer<LLImageRaw> raw = new LLImageRaw(sTextureSize/2, sTextureSize/2, 4);
+		LLPointer<LLImageRaw> raw = new LLImageRaw(sTextureSize/2, sTextureSize/2, 4);
 		U8 *default_texture = raw->getData();
 		for (S32 i = 0; i < sTextureSize/2; i++)
 		{
@@ -276,11 +276,11 @@ void LLSurface::createWaterTexture()
 				*(default_texture + (i*sTextureSize/2 + j)*4 + 2) = MAX_WATER_COLOR.mV[2];
 				*(default_texture + (i*sTextureSize/2 + j)*4 + 3) = MAX_WATER_COLOR.mV[3];
 			}
-		}*/
+		}		
 		
-		
-		mWaterTexturep = LLViewerTextureManager::getLocalTexture(sTextureSize/2, sTextureSize/2, 4, FALSE);
+		mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
 		mWaterTexturep->dontDiscard();
+		gGL.getTexUnit(0)->bind(mWaterTexturep);
 		mWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
 	}
 }
-- 
GitLab