HRESULT APPLICATION::Cleanup() { try { m_pFont->Release(); m_pFontMouse->Release(); m_objects.clear(); m_pDevice->Release(); debug.Print("Application terminated"); } catch(...){} return S_OK; }
void FontManager::FMClean() { for(Fonts::iterator it = m_fonts.begin(); it != m_fonts.end(); ++it) { ID3DXFont* font = it->second; font->Release(); } }
void DrawMyText( IDirect3DDevice9* g_pD3DDevice, char* StrokaTexta, int x, int y, int x1, int y1, D3DCOLOR MyColor ) { RECT Rec; HFONT hFont; ID3DXFont* pFont = 0; hFont = CreateFont(30, 10, 0, 0, FW_NORMAL, FALSE, FALSE, 0, 1, 0, 0, 0, DEFAULT_PITCH | FF_MODERN, "Arial"); Rec.left = x; Rec.top = y; Rec.right = x1; Rec.bottom = y1; D3DXCreateFont( g_pD3DDevice, 30, 10, FW_NORMAL, 0, FALSE, 0, 0, 0, DEFAULT_PITCH | FF_MODERN, "Arial", &pFont ); pFont->DrawText(0, StrokaTexta, -1, &Rec, DT_WORDBREAK, MyColor); if (pFont) pFont->Release(); }
HRESULT APPLICATION::Cleanup() { try { m_mesh1.Release(); m_mesh2.Release(); m_pFont->Release(); m_pDevice->Release(); debug.Print("Application terminated"); } catch(...){} return S_OK; }
HRESULT APPLICATION::Cleanup() { try { m_pFont->Release(); if(m_pFarmerMesh != NULL) m_pFarmerMesh->Release(); m_pDevice->Release(); debug.Print("Application terminated"); } catch(...){} return S_OK; }
HRESULT APPLICATION::Cleanup() { try { m_terrain.Release(); UnloadObjectResources(); m_pFont->Release(); m_pDevice->Release(); debug.Print("Application terminated"); } catch(...){} return S_OK; }
HRESULT APPLICATION::Cleanup() { try { if(m_pHeightMap != NULL) { delete m_pHeightMap; m_pHeightMap = NULL; } m_pFont->Release(); m_pDevice->Release(); debug.Print("Application terminated"); } catch(...){} return S_OK; }