//-------------------------------------------------------------------------------------- // Release D3D9 resources created in the OnD3D9ResetDevice callback //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9LostDevice( void* pUserContext ) { g_DialogResourceManager.OnD3D9LostDevice(); g_SettingsDlg.OnD3D9LostDevice(); if( g_pFont9 ) g_pFont9->OnLostDevice(); SAFE_RELEASE( g_pSprite9 ); SAFE_DELETE( g_pTxtHelper ); }
//-------------------------------------------------------------------------------------- // This callback function will be called immediately after the Direct3D device has // entered a lost state and before IDirect3DDevice9::Reset is called. Resources created // in the OnResetDevice callback should be released here, which generally includes all // D3DPOOL_DEFAULT resources. See the "Lost Devices" section of the documentation for // information about lost devices. //-------------------------------------------------------------------------------------- void CALLBACK OnLostDevice( void* pUserContext ) { g_DialogResourceManager.OnD3D9LostDevice(); g_SettingsDlg.OnD3D9LostDevice(); if( g_pFont ) g_pFont->OnLostDevice(); if( g_pEffect ) g_pEffect->OnLostDevice(); SAFE_RELEASE( g_pTextSprite ); }
//-------------------------------------------------------------------------------------- // Release D3D9 resources created in the OnD3D9ResetDevice callback //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9LostDevice( void* pUserContext ) { g_DialogResourceManager.OnD3D9LostDevice(); g_D3DSettingsDlg.OnD3D9LostDevice(); CDXUTDirectionWidget::StaticOnD3D9LostDevice(); if( g_pFont9 ) g_pFont9->OnLostDevice(); if( g_pEffect9 ) g_pEffect9->OnLostDevice(); SAFE_RELEASE( g_pSprite9 ); SAFE_DELETE( g_pTxtHelper ); }
//-------------------------------------------------------------------------------------- // This callback function will be called immediately after the Direct3D device has // entered a lost state and before IDirect3DDevice9::Reset is called. Resources created // in the OnResetDevice callback should be released here, which generally includes all // D3DPOOL_DEFAULT resources. See the "Lost Devices" section of the documentation for // information about lost devices. //-------------------------------------------------------------------------------------- void CALLBACK OnLostDevice( void* pUserContext ) { g_DialogResourceManager.OnD3D9LostDevice(); g_SettingsDlg.OnD3D9LostDevice(); CDXUTDirectionWidget::StaticOnD3D9LostDevice(); if( g_pFont ) g_pFont->OnLostDevice(); if( g_pEffect ) g_pEffect->OnLostDevice(); SAFE_RELEASE( g_pSprite ); }
//-------------------------------------------------------------------------------------- // Release D3D9 resources created in the OnD3D9ResetDevice callback //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9LostDevice( void* pUserContext ) { g_DialogResourceManager.OnD3D9LostDevice(); g_SettingsDlg.OnD3D9LostDevice(); DXUTGetGlobalResourceCache().OnLostDevice(); if( g_pFont9 ) g_pFont9->OnLostDevice(); if( g_pEffect9 ) g_pEffect9->OnLostDevice(); SAFE_RELEASE( g_pSprite9 ); SAFE_DELETE( g_pTxtHelper ); g_Mesh.Destroy(); SAFE_RELEASE( g_pTexture9 ); }
//-------------------------------------------------------------------------------------- // Release D3D9 resources created in the OnD3D9ResetDevice callback //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9LostDevice( void* pUserContext ) { #ifdef CONSOLE std::cout << "OnD3D9LostDevice start" << std::endl; #endif g_DialogResourceManager.OnD3D9LostDevice(); g_SettingsDlg.OnD3D9LostDevice(); if( g_pFont9 ) g_pFont9->OnLostDevice(); if( g_pEffect9 ) g_pEffect9->OnLostDevice(); SAFE_RELEASE( g_pSprite9 ); SAFE_DELETE( g_pTxtHelper ); DX9Info::DX9DestroyAllBuffers(); #ifdef CONSOLE std::cout << "OnD3D9LostDevice end" << std::endl; #endif }
//-------------------------------------------------------------------------------------- // Release D3D9 resources created in the OnD3D9ResetDevice callback //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9LostDevice( void* pUserContext ) { g_DialogResourceManager.OnD3D9LostDevice(); g_SettingsDlg.OnD3D9LostDevice(); }