MCPcopy Create free account
hub / github.com/GPUOpen-Effects/GeometryFX / OnD3D11DestroyDevice

Method OnD3D11DestroyDevice

framework/d3d11/dxut/Optional/DXUTgui.cpp:2444–2478  ·  view source on GitHub ↗

--------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2442
2443//--------------------------------------------------------------------------------------
2444void 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//--------------------------------------------------------------------------------------

Callers 1

OnD3D11DestroyDeviceFunction · 0.45

Calls 1

EndFont11Function · 0.85

Tested by

no test coverage detected