From 847b709c27ea0c902b345f9a8d68c255c077c541 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 9 May 2011 12:18:04 -0600 Subject: fix for SH-1530: Viewer crash in LLSurface::getWaterHeight --- indra/newview/llviewercamera.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') 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(); } -- cgit v1.2.3 From dab6d7b50706ef09be26b5c6ca4ca8c7b8b2d051 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 9 May 2011 16:41:00 -0600 Subject: fix for SH-Render Metadata Physics Shapes on Development Client Gives Black Screen --- indra/newview/llviewerdisplay.cpp | 2 +- indra/newview/pipeline.cpp | 15 +++++++++++++++ indra/newview/pipeline.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'indra') 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(); -- cgit v1.2.3