summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawpool.cpp1
-rw-r--r--indra/newview/lldrawpool.h4
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp4
-rw-r--r--indra/newview/pipeline.cpp22
-rw-r--r--indra/newview/pipeline.h1
5 files changed, 30 insertions, 2 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 35f8a85796..81f4e3d48f 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -116,6 +116,7 @@ LLDrawPool::LLDrawPool(const U32 type)
sNumDrawPools++;
mId = sNumDrawPools;
mVertexShaderLevel = 0;
+ mSkipRender = false;
}
LLDrawPool::~LLDrawPool()
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 64774d06df..977acf7aec 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -77,6 +77,9 @@ public:
S32 getId() const { return mId; }
U32 getType() const { return mType; }
+ BOOL getSkipRenderFlag() const { return mSkipRender;}
+ void setSkipRenderFlag( BOOL flag ) { mSkipRender = flag; }
+
virtual LLViewerTexture *getDebugTexture();
virtual void beginRenderPass( S32 pass );
virtual void endRenderPass( S32 pass );
@@ -113,6 +116,7 @@ protected:
S32 mVertexShaderLevel;
S32 mId;
U32 mType; // Type of draw pool
+ BOOL mSkipRender;
};
class LLRenderPass : public LLDrawPool
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 4c55e4debd..f6eb40abdc 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -1003,6 +1003,10 @@ void LLFloaterPathfindingConsole::cleanupRenderableRestoreItems()
gPipeline.restorePermanentObjects( mRenderableRestoreList );
mRenderableRestoreList.clear();
}
+ else
+ {
+ gPipeline.skipRenderingOfTerrain( false );
+ }
}
void LLFloaterPathfindingConsole::setAgentState(LLPathfindingManager::EAgentState pAgentState)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5bad5dd821..bbe46195cb 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3864,7 +3864,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
break;
}
- p->render(i);
+ if ( !p->getSkipRenderFlag() ) { p->render(i); }
}
poolp->endRenderPass(i);
LLVertexBuffer::unbind();
@@ -4038,7 +4038,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
break;
}
- p->renderDeferred(i);
+ if ( !p->getSkipRenderFlag() ) { p->renderDeferred(i); }
}
poolp->endDeferredPass(i);
LLVertexBuffer::unbind();
@@ -10139,6 +10139,8 @@ void LLPipeline::hidePermanentObjects( std::vector<U32>& restoreList )
}
}
}
+
+ skipRenderingOfTerrain( true );
}
void LLPipeline::restorePermanentObjects( const std::vector<U32>& restoreList )
@@ -10183,5 +10185,21 @@ void LLPipeline::restorePermanentObjects( const std::vector<U32>& restoreList )
}
++itCurrent;
}
+
+ skipRenderingOfTerrain( false );
}
+void LLPipeline::skipRenderingOfTerrain( BOOL flag )
+{
+ pool_set_t::iterator iter = mPools.begin();
+ while ( iter != mPools.end() )
+ {
+ LLDrawPool* pPool = *iter;
+ U32 poolType = pPool->getType();
+ if ( hasRenderType( pPool->getType() ) && poolType == LLDrawPool::POOL_TERRAIN )
+ {
+ pPool->setSkipRenderFlag( flag );
+ }
+ ++iter;
+ }
+}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index a4ab1fa56b..8a845af418 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -368,6 +368,7 @@ public:
void hidePermanentObjects( std::vector<U32>& restoreList );
void restorePermanentObjects( const std::vector<U32>& restoreList );
+ void skipRenderingOfTerrain( BOOL flag );
private:
void unloadShaders();