]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client/renderingengine.cpp
refacto: hide mesh_cache inside the rendering engine
[dragonfireclient.git] / src / client / renderingengine.cpp
index 970bcf95b4dcbd2b63fd8cece033853a7d7ab187..da902247714a52beb21b4e678a19ac162330208e 100644 (file)
@@ -225,12 +225,17 @@ bool RenderingEngine::print_video_modes()
        return videomode_list != NULL;
 }
 
+void RenderingEngine::removeMesh(const irr::scene::IMesh* mesh)
+{
+       m_device->getSceneManager()->getMeshCache()->removeMesh(mesh);
+}
+
 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);
+                       mesh_cache->removeMesh(mesh);
        }
 }