From 0954d4f5d563740d0425fb9e8d118a95a34bd283 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 22 Nov 2013 15:46:50 -0700 Subject: fix for SH-4632: Water over land doesn't render when teleporting to the same place twice with location toolbar --- indra/newview/llviewermessage.cpp | 2 ++ indra/newview/pipeline.cpp | 16 +++++++++++++++- indra/newview/pipeline.h | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bf1e915d5d..c5126ea78a 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3917,6 +3917,8 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // Teleport is finished; it can't be cancelled now. gViewerWindow->setProgressCancelButtonVisible(FALSE); + gPipeline.doResetVertexBuffers(true); + // Do teleport effect for where you're leaving // VEFFECT: TeleportStart LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c2c981893a..c4fa80f0a2 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7385,12 +7385,26 @@ void LLPipeline::resetVertexBuffers() static LLTrace::BlockTimerStatHandle FTM_RESET_VB("Reset VB"); -void LLPipeline::doResetVertexBuffers() +void LLPipeline::doResetVertexBuffers(bool forced) { if (!mResetVertexBuffers) { return; } + if(!forced && LLSpatialPartition::sTeleportRequested) + { + if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + { + return; //wait for teleporting to finish + } + else + { + //teleporting aborted + LLSpatialPartition::sTeleportRequested = FALSE; + mResetVertexBuffers = false; + return; + } + } LL_RECORD_BLOCK_TIME(FTM_RESET_VB); mResetVertexBuffers = false; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 469c7b329e..9e29ebd2a8 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -101,7 +101,7 @@ public: void destroyGL(); void restoreGL(); void resetVertexBuffers(); - void doResetVertexBuffers(); + void doResetVertexBuffers(bool forced = false); void resizeScreenTexture(); void releaseGLBuffers(); void releaseLUTBuffers(); -- cgit v1.2.3