summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-09-01 17:18:16 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-09-01 17:18:16 -0600
commit38c19f4e55c0f6a104de87dfb57313a6c529b4d6 (patch)
treec44c6003e4438e38af12f78cb580a3ba9d951f9f /indra/newview/pipeline.cpp
parent7ee10ae1def26708fa44c25355982aa56195d5f9 (diff)
for SH-2242: fixes the assertion caused by gGL.diffuseColor4f when shadows is on.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d9fa4881e7..f821ab8e34 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4041,6 +4041,8 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumShadowPasses() > 0)
{
+ poolp->prerender() ;
+
gGLLastMatrix = NULL;
glLoadMatrixd(gGLModelView);
@@ -8341,12 +8343,8 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-
- gGL.diffuseColor4f(1,1,1,1);
stop_glerror();
-
- gGL.setColorMask(false, false);
//glCullFace(GL_FRONT);
@@ -8357,6 +8355,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{ //occlusion program is general purpose depth-only no-textures
gOcclusionProgram.bind();
}
+
+ gGL.diffuseColor4f(1,1,1,1);
+ gGL.setColorMask(false, false);
+
LLFastTimer ftm(FTM_SHADOW_SIMPLE);
gGL.getTexUnit(0)->disable();
for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i)