summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolterrain.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-08-14 09:01:56 -0400
committerOz Linden <oz@lindenlab.com>2012-08-14 09:01:56 -0400
commit24c1b62e27e066dc62e7681593ce7c93ee84d5a8 (patch)
tree76d5b8a1c4eb43073e85156d74e8f3eac11dfe74 /indra/newview/lldrawpoolterrain.cpp
parent2c2167229eac3efd7e7b1c5eafde8ee2e66184cd (diff)
parent337976096530729a7d671df68907cd59a7986972 (diff)
merge back beta fixes
Diffstat (limited to 'indra/newview/lldrawpoolterrain.cpp')
-rw-r--r--indra/newview/lldrawpoolterrain.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 7fc78fb382..9bc32fddbd 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -308,6 +308,7 @@ void LLDrawPoolTerrain::drawLoop()
if (model_matrix != gGLLastMatrix)
{
+ llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
gGLLastMatrix = model_matrix;
gGL.loadMatrix(gGLModelView);
if (model_matrix)
@@ -594,7 +595,8 @@ void LLDrawPoolTerrain::renderFull4TU()
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.translatef(-1.f, 0.f, 0.f);
-
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+
// Set alpha texture and do lighting modulation
gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);
gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
@@ -742,6 +744,7 @@ void LLDrawPoolTerrain::renderFull2TU()
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.translatef(-1.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// Care about alpha only
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
@@ -781,6 +784,7 @@ void LLDrawPoolTerrain::renderFull2TU()
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.translatef(-2.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// Care about alpha only
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);