summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolterrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolterrain.cpp')
-rw-r--r--indra/newview/lldrawpoolterrain.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 593636b14a..e716214d72 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -145,6 +145,18 @@ S32 LLDrawPoolTerrain::getDetailMode()
return sDetailMode;
}
+void LLDrawPoolTerrain::boostTerrainDetailTextures()
+{
+ // Hack! Get the region that this draw pool is rendering from!
+ LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
+ LLVLComposition *compp = regionp->getComposition();
+ for (S32 i = 0; i < 4; i++)
+ {
+ compp->mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
+ compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
+ }
+}
+
void LLDrawPoolTerrain::render(S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN);
@@ -154,14 +166,7 @@ void LLDrawPoolTerrain::render(S32 pass)
return;
}
- // Hack! Get the region that this draw pool is rendering from!
- LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
- LLVLComposition *compp = regionp->getComposition();
- for (S32 i = 0; i < 4; i++)
- {
- compp->mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
- compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
- }
+ boostTerrainDetailTextures();
LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f);
@@ -236,6 +241,8 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass)
return;
}
+ boostTerrainDetailTextures();
+
renderFullShader();
// Special-case for land ownership feedback