diff options
author | prep <prep@lindenlab.com> | 2012-05-09 15:56:06 -0400 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2012-05-09 15:56:06 -0400 |
commit | 92ce47a1b21b3cc06d3d962394f44617a780ffbd (patch) | |
tree | da41492c597ba5432af17b278cdd698b894085c1 /indra/newview/pipeline.cpp | |
parent | 88674e02ddaf8d300a0a65c216eaf304cbeb7c3a (diff) |
Added support to disable a draw pool. When the movable option checkbox is selected we will now also cull the terrain draw pool.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
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; + } +} |