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/renderingengine.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/client/renderingengine.h') diff --git a/src/client/renderingengine.h b/src/client/renderingengine.h index fae431f1f..73b55229e 100644 --- a/src/client/renderingengine.h +++ b/src/client/renderingengine.h @@ -26,6 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "irrlichttypes_extrabloated.h" #include "debug.h" +namespace irr { namespace scene { +class IMesh; +}} class ITextureSource; class Camera; class Client; @@ -58,6 +61,8 @@ public: static bool print_video_modes(); void cleanupMeshCache(); + void removeMesh(const irr::scene::IMesh* mesh); + static RenderingEngine *get_instance() { return s_singleton; } io::IFileSystem *get_filesystem() @@ -71,12 +76,6 @@ public: return s_singleton->m_device->getVideoDriver(); } - static scene::IMeshCache *get_mesh_cache() - { - sanity_check(s_singleton && s_singleton->m_device); - return s_singleton->m_device->getSceneManager()->getMeshCache(); - } - static scene::ISceneManager *get_scene_manager() { sanity_check(s_singleton && s_singleton->m_device); -- cgit v1.2.3