diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-05-09 16:45:47 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-05-09 16:45:47 -0600 |
commit | 5f6559c0f662ae21306524a28d9c8ec0aa199163 (patch) | |
tree | c6afc37b6ad78460cb2eb594a6c768e813319317 /indra/newview | |
parent | fac4ca594f4efee1da05bdc74164f56690d03bfb (diff) | |
parent | dab6d7b50706ef09be26b5c6ca4ca8c7b8b2d051 (diff) |
Automated merge with http://hg.secondlife.com/mesh-development
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewercamera.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 15 | ||||
-rw-r--r-- | indra/newview/pipeline.h | 1 |
4 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 23b0845f31..7f7366dd3d 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -756,6 +756,10 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent) BOOL LLViewerCamera::cameraUnderWater() const { + if(!gAgent.getRegion()) + { + return FALSE ; + } return getOrigin().mV[VZ] < gAgent.getRegion()->getWaterHeight(); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index a60d7e0793..e41773d273 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -825,7 +825,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) //} LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE; - LLPipeline::updateRenderDeferred(); + LLPipeline::refreshRenderDeferred(); stop_glerror(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 923c02b860..f64eb89866 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -784,6 +784,21 @@ void LLPipeline::updateRenderDeferred() } } +//static +void LLPipeline::refreshRenderDeferred() +{ + if(gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)) + { + //turn the deferred rendering and glow off when draw physics shapes. + sRenderDeferred = FALSE ; + sRenderGlow = FALSE ; + } + else + { + updateRenderDeferred() ; + } +} + void LLPipeline::releaseGLBuffers() { assertInitialized(); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 0cf3fde562..e9a250cd6d 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -356,6 +356,7 @@ public: static BOOL getRenderHighlights(void* data); static void updateRenderDeferred(); + static void refreshRenderDeferred(); private: void unloadShaders(); |