From 07856a0640ba5c881571952f6c67d40fe5651ebb Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 21 Apr 2010 16:50:15 -0500 Subject: Make attached lights not render when disabled in deferred rendering. --- indra/newview/pipeline.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index cb656b4fbc..d80f749e56 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1979,7 +1979,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) { LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable; - if (root->getVObj()->isAttachment()) + if (root && root->getVObj() && root->getVObj()->isAttachment()) { LLVOAvatar* av = root->getParent()->getVObj()->asAvatar(); if (av && av->isImpostor()) @@ -6736,6 +6736,15 @@ void LLPipeline::renderDeferredLighting() continue; } + if (volume->isAttachment()) + { + if (!sRenderAttachedLights) + { + continue; + } + } + + LLVector3 center = drawablep->getPositionAgent(); F32* c = center.mV; F32 s = volume->getLightRadius()*1.5f; -- cgit v1.2.3