From 5ea4952ca547d63c22402cc793dc81e63c52c6bd Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Wed, 23 Sep 2009 01:27:21 +0000
Subject: [PATCH] fix for EXT-1108: Green terrain rendering on login on Windows
 nVidia 9600 GT. to be reviewed by davep.

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

diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 39f6a6c3960..eadb3119190 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -236,12 +236,13 @@ void LLSurface::createSTexture()
 	{
 		// Fill with dummy gray data.
 	
-		mSTexturep =  LLViewerTextureManager::getLocalTexture(sTextureSize, sTextureSize, 3, FALSE);
-		mSTexturep->dontDiscard();
-		mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
+		//mSTexturep =  LLViewerTextureManager::getLocalTexture(sTextureSize, sTextureSize, 3, FALSE);
+		//mSTexturep->dontDiscard();
+		//mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
 		
 		// GL NOT ACTIVE HERE
-		/*U8 *default_texture = raw->getData();
+		LLPointer<LLImageRaw> raw = new LLImageRaw(sTextureSize, sTextureSize, 3);
+		U8 *default_texture = raw->getData();
 		for (S32 i = 0; i < sTextureSize; i++)
 		{
 			for (S32 j = 0; j < sTextureSize; j++)
@@ -255,8 +256,7 @@ void LLSurface::createSTexture()
 		mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
 		mSTexturep->dontDiscard();
 		gGL.getTexUnit(0)->bind(mSTexturep);
-		mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);*/
-		
+		mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);		
 	}
 }
 
-- 
GitLab