--------------------------------------------------------------------------------------
| 2442 | |
| 2443 | //-------------------------------------------------------------------------------------- |
| 2444 | void CDXUTDialogResourceManager::OnD3D11DestroyDevice() |
| 2445 | { |
| 2446 | // Release the resources but don't clear the cache, as these will need to be |
| 2447 | // recreated if the device is recreated |
| 2448 | |
| 2449 | for( auto it = m_TextureCache.begin(); it != m_TextureCache.end(); ++it ) |
| 2450 | { |
| 2451 | SAFE_RELEASE( (*it)->pTexResView11 ); |
| 2452 | SAFE_RELEASE( (*it)->pTexture11 ); |
| 2453 | } |
| 2454 | |
| 2455 | // D3D11 |
| 2456 | SAFE_RELEASE( m_pVBScreenQuad11 ); |
| 2457 | SAFE_RELEASE( m_pSpriteBuffer11 ); |
| 2458 | m_SpriteBufferBytes11 = 0; |
| 2459 | SAFE_RELEASE( m_pInputLayout11 ); |
| 2460 | |
| 2461 | // Shaders |
| 2462 | SAFE_RELEASE( m_pVSRenderUI11 ); |
| 2463 | SAFE_RELEASE( m_pPSRenderUI11 ); |
| 2464 | SAFE_RELEASE( m_pPSRenderUIUntex11 ); |
| 2465 | |
| 2466 | // States |
| 2467 | SAFE_RELEASE( m_pDepthStencilStateUI11 ); |
| 2468 | SAFE_RELEASE( m_pRasterizerStateUI11 ); |
| 2469 | SAFE_RELEASE( m_pBlendStateUI11 ); |
| 2470 | SAFE_RELEASE( m_pSamplerStateUI11 ); |
| 2471 | |
| 2472 | SAFE_RELEASE( m_pDepthStencilStateStored11 ); |
| 2473 | SAFE_RELEASE( m_pRasterizerStateStored11 ); |
| 2474 | SAFE_RELEASE( m_pBlendStateStored11 ); |
| 2475 | SAFE_RELEASE( m_pSamplerStateStored11 ); |
| 2476 | |
| 2477 | EndFont11(); |
| 2478 | } |
| 2479 | |
| 2480 | |
| 2481 | //-------------------------------------------------------------------------------------- |
no test coverage detected