diff options
author | simon <none@none> | 2014-03-26 10:04:53 -0700 |
---|---|---|
committer | simon <none@none> | 2014-03-26 10:04:53 -0700 |
commit | 33dfc0a8a1ed56d7d24611981736fd5baf6b03c2 (patch) | |
tree | 5dfdbcede0d8c689e796cf65ebc21bb149c17b8e /indra/newview/lldrawpoolterrain.cpp | |
parent | 00a325ccb90b1c6800ec78e1211b5097d9c27a58 (diff) | |
parent | 5c20e06dbd0845e2d45daae610c43fc89e24028f (diff) |
Pull in downstream -bear, viewer-release and become version 3.7.5
Diffstat (limited to 'indra/newview/lldrawpoolterrain.cpp')
-rwxr-xr-x | indra/newview/lldrawpoolterrain.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index c3ec234223..d7ecacf2e6 100755 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -88,8 +88,11 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : //gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get()); m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP); - mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN); - + if (mTexturep) + { + mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN); + } + //gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } @@ -851,11 +854,18 @@ void LLDrawPoolTerrain::renderSimple() // Pass 1/1 // Stage 0: Base terrain texture pass - mTexturep->addTextureStats(1024.f*1024.f); + if (mTexturep) + { + mTexturep->addTextureStats(1024.f*1024.f); + } gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - gGL.getTexUnit(0)->bind(mTexturep); + + if (mTexturep) + { + gGL.getTexUnit(0)->bind(mTexturep); + } LLVector3 origin_agent = mDrawFace[0]->getDrawable()->getVObj()->getRegion()->getOriginAgent(); F32 tscale = 1.f/256.f; |