aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2021-04-28 11:07:28 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2021-05-03 19:49:19 +0200
commit74125a74d34e9b1a003107d4ef6b95b8483d2464 (patch)
tree8bdec97fb8aa537172cd8dc862adf9259b32435d /src/client/game.cpp
parente0716384d6c7abfa228b039056f1e872ca7bb8cf (diff)
downloadminetest-74125a74d34e9b1a003107d4ef6b95b8483d2464.tar.xz
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
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp25
1 files changed, 1 insertions, 24 deletions
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 =