-------------------------------------------------------------------------------------- Description: Starts re-rendering of impostor billboards. Should be called before any BeginImpostorUpdate. Arguments: renderContext - Current render context --------------------------------------------------------------------------------------
| 380 | // renderContext - Current render context |
| 381 | // -------------------------------------------------------------------------------------- |
| 382 | void Tr2ImpostorManager::BeginUpdateAtlas( Tr2RenderContext& renderContext ) |
| 383 | { |
| 384 | if( !m_rt || !m_rt->IsValid() || m_renderQueue.empty() ) |
| 385 | { |
| 386 | return; |
| 387 | } |
| 388 | |
| 389 | if( m_atlasDirty ) |
| 390 | { |
| 391 | renderContext.m_esm.PushDepthStencilBuffer( Tr2TextureAL() ); |
| 392 | renderContext.m_esm.PushRenderTarget( *m_rt ); |
| 393 | |
| 394 | renderContext.Clear( Tr2RenderContextEnum::CLEARFLAGS_TARGET, 0, 0 ); |
| 395 | |
| 396 | renderContext.m_esm.PopRenderTarget(); |
| 397 | renderContext.m_esm.PopDepthStencilBuffer(); |
| 398 | m_atlasDirty = false; |
| 399 | } |
| 400 | |
| 401 | renderContext.m_esm.PushRenderTarget( *m_itemRt ); |
| 402 | renderContext.m_esm.PushDepthStencilBuffer( *m_ds ); |
| 403 | |
| 404 | renderContext.Clear( Tr2RenderContextEnum::CLEARFLAGS_TARGET | Tr2RenderContextEnum::CLEARFLAGS_ZBUFFER, 0, 0.f ); |
| 405 | } |
| 406 | |
| 407 | // -------------------------------------------------------------------------------------- |
| 408 | // Description: |
no test coverage detected