mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
refacto: add RenderingEngine::cleanupMeshCache
This permits to prevent client to own the mesh cache cleanup logic. It's better in RenderingEngine
This commit is contained in:
@@ -225,6 +225,15 @@ bool RenderingEngine::print_video_modes()
|
||||
return videomode_list != NULL;
|
||||
}
|
||||
|
||||
void RenderingEngine::cleanupMeshCache()
|
||||
{
|
||||
auto mesh_cache = m_device->getSceneManager()->getMeshCache();
|
||||
while (mesh_cache->getMeshCount() != 0) {
|
||||
if (scene::IAnimatedMesh *mesh = mesh_cache->getMeshByIndex(0))
|
||||
m_rendering_engine->get_mesh_cache()->removeMesh(mesh);
|
||||
}
|
||||
}
|
||||
|
||||
bool RenderingEngine::setupTopLevelWindow(const std::string &name)
|
||||
{
|
||||
// FIXME: It would make more sense for there to be a switch of some
|
||||
|
Reference in New Issue
Block a user