-----------------------------------------------------------------------
| 469 | } |
| 470 | //----------------------------------------------------------------------- |
| 471 | void RenderSystem::destroyRenderPassDescriptor( RenderPassDescriptor *renderPassDesc ) |
| 472 | { |
| 473 | RenderPassDescriptorSet::iterator itor = mRenderPassDescs.find( renderPassDesc ); |
| 474 | assert( itor != mRenderPassDescs.end() && "Already destroyed?" ); |
| 475 | if( itor != mRenderPassDescs.end() ) |
| 476 | mRenderPassDescs.erase( itor ); |
| 477 | |
| 478 | if( renderPassDesc->mDepth.texture ) |
| 479 | { |
| 480 | _dereferenceSharedDepthBuffer( renderPassDesc->mDepth.texture ); |
| 481 | |
| 482 | if( renderPassDesc->mStencil.texture && |
| 483 | renderPassDesc->mStencil.texture == renderPassDesc->mDepth.texture ) |
| 484 | { |
| 485 | _dereferenceSharedDepthBuffer( renderPassDesc->mStencil.texture ); |
| 486 | renderPassDesc->mStencil.texture = 0; |
| 487 | } |
| 488 | } |
| 489 | if( renderPassDesc->mStencil.texture ) |
| 490 | { |
| 491 | _dereferenceSharedDepthBuffer( renderPassDesc->mStencil.texture ); |
| 492 | renderPassDesc->mStencil.texture = 0; |
| 493 | } |
| 494 | |
| 495 | delete renderPassDesc; |
| 496 | } |
| 497 | //--------------------------------------------------------------------- |
| 498 | void RenderSystem::destroyAllRenderPassDescriptors() |
| 499 | { |
no test coverage detected