From 74125a74d34e9b1a003107d4ef6b95b8483d2464 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 28 Apr 2021 11:07:28 +0200 Subject: refacto: hide mesh_cache inside the rendering engine This permit cleaner access to meshCache and ensure we don't access to it from all the code --- src/client/game.cpp | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/client/game.cpp') diff --git a/src/client/game.cpp b/src/client/game.cpp index 612072136..8400d7639 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -652,8 +652,6 @@ public: protected: - void extendedResourceCleanup(); - // Basic initialisation bool init(const std::string &map_dir, const std::string &address, u16 port, const SubgameSpec &gamespec); @@ -968,7 +966,7 @@ Game::~Game() delete itemdef_manager; delete draw_control; - extendedResourceCleanup(); + clearTextureNameCache(); g_settings->deregisterChangedCallback("doubletap_jump", &settingChangedCallback, this); @@ -4063,27 +4061,6 @@ void Game::readSettings() ****************************************************************************/ /****************************************************************************/ -void Game::extendedResourceCleanup() -{ - // Extended resource accounting - infostream << "Irrlicht resources after cleanup:" << std::endl; - infostream << "\tRemaining meshes : " - << RenderingEngine::get_mesh_cache()->getMeshCount() << std::endl; - infostream << "\tRemaining textures : " - << driver->getTextureCount() << std::endl; - - for (unsigned int i = 0; i < driver->getTextureCount(); i++) { - irr::video::ITexture *texture = driver->getTextureByIndex(i); - infostream << "\t\t" << i << ":" << texture->getName().getPath().c_str() - << std::endl; - } - - clearTextureNameCache(); - infostream << "\tRemaining materials: " - << driver-> getMaterialRendererCount() - << " (note: irrlicht doesn't support removing renderers)" << std::endl; -} - void Game::showDeathFormspec() { static std::string formspec_str = -- cgit v1.2.3