BUG-11562: Reinstalling Nicky's fix since LL's fix won't be along for a while

Wed, 11 May 2016 18:13:12 -0500

author
Tonya Souther <tonya.souther@gmail.com>
date
Wed, 11 May 2016 18:13:12 -0500
changeset 48964
6ef91b579e05
parent 48963
a4e3bc4126ca
child 48965
79f76ecb6bc8

BUG-11562: Reinstalling Nicky's fix since LL's fix won't be along for a while

indra/newview/lldrawpoolterrain.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/lldrawpoolterrain.cpp	Tue May 10 13:43:27 2016 +0200
     1.2 +++ b/indra/newview/lldrawpoolterrain.cpp	Wed May 11 18:13:12 2016 -0500
     1.3 @@ -57,6 +57,38 @@
     1.4  static LLGLSLShader* sShader = NULL;
     1.5  static LLTrace::BlockTimerStatHandle FTM_SHADOW_TERRAIN("Terrain Shadow");
     1.6  
     1.7 +// <FS:ND> Hack to preload the invisiprim textures and make them fall into the right texturelist bucket
     1.8 +
     1.9 +LLPointer<LLViewerTexture> mAlphaRampImagep2;
    1.10 +LLPointer<LLViewerTexture> m2DAlphaRampImagep2;
    1.11 +
    1.12 +void preloadForInvisiprims()
    1.13 +{
    1.14 +	U32 format = GL_ALPHA8;
    1.15 +	U32 int_format = GL_ALPHA;
    1.16 +	mAlphaRampImagep2 = LLViewerTextureManager::getFetchedTextureFromFile( "alpha_gradient.tga",
    1.17 +                                                                           FTT_LOCAL_FILE,
    1.18 +                                                                           TRUE, LLGLTexture::BOOST_NONE,
    1.19 +                                                                           LLViewerTexture::FETCHED_TEXTURE,
    1.20 +                                                                           format, int_format,
    1.21 +                                                                           LLUUID( "e97cf410-8e61-7005-ec06-629eba4cd1fb" ) );
    1.22 +
    1.23 +	//gGL.getTexUnit(0)->bind(mAlphaRampImagep.get());
    1.24 +	mAlphaRampImagep2->setAddressMode( LLTexUnit::TAM_CLAMP );
    1.25 +
    1.26 +	m2DAlphaRampImagep2 = LLViewerTextureManager::getFetchedTextureFromFile( "alpha_gradient_2d.j2c",
    1.27 +                                                                             FTT_LOCAL_FILE,
    1.28 +                                                                             TRUE, LLGLTexture::BOOST_NONE,
    1.29 +                                                                             LLViewerTexture::FETCHED_TEXTURE,
    1.30 +                                                                             format, int_format,
    1.31 +                                                                             LLUUID( "38b86f85-2575-52a9-a531-23108d8da837" ) );
    1.32 +
    1.33 +	//gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
    1.34 +	m2DAlphaRampImagep2->setAddressMode( LLTexUnit::TAM_CLAMP );
    1.35 +
    1.36 +}
    1.37 +// </FS:ND>
    1.38 +
    1.39  
    1.40  LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
    1.41  	LLFacePool(POOL_TERRAIN),
    1.42 @@ -99,6 +131,8 @@
    1.43  	mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
    1.44  	
    1.45  	//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
    1.46 +
    1.47 +	preloadForInvisiprims(); // <FS:ND/> load textures for invisiprims (same UUID as above, but put them into the texturelist for normal textures rather than UI).
    1.48  }
    1.49  
    1.50  LLDrawPoolTerrain::~LLDrawPoolTerrain()

mercurial