summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3a1edb0d00..f5f2ba52bf 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1666,17 +1666,23 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
- for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
- iter != gPipeline.mNearbyLights.end(); iter++)
- {
- const LLViewerObject *vobj = iter->drawable->getVObj();
- if (vobj && vobj->getAvatar()
- && vobj->isAttachment() && vobj->getAvatar() == muted_avatar)
- {
- gPipeline.mLights.erase(iter->drawable);
- gPipeline.mNearbyLights.erase(iter);
- }
- }
+ light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
+ while (iter != gPipeline.mNearbyLights.end())
+ {
+ const LLViewerObject* vobj = iter->drawable->getVObj();
+ if (vobj
+ && vobj->getAvatar()
+ && vobj->isAttachment()
+ && vobj->getAvatar() == muted_avatar)
+ {
+ gPipeline.mLights.erase(iter->drawable);
+ iter = gPipeline.mNearbyLights.erase(iter);
+ }
+ else
+ {
+ iter++;
+ }
+ }
}
U32 LLPipeline::addObject(LLViewerObject *vobj)
@@ -8359,7 +8365,7 @@ void LLPipeline::doWaterHaze()
else
{
//render water patches like LLDrawPoolWater does
- LLGLDepthTest depth(GL_FALSE);
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
gGLLastMatrix = NULL;