mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
e0716384d6
commit
74125a74d3
4 changed files with 13 additions and 32 deletions
|
@ -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 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue