diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2021-04-28 11:07:28 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2021-05-03 19:49:19 +0200 |
commit | 74125a74d34e9b1a003107d4ef6b95b8483d2464 (patch) | |
tree | 8bdec97fb8aa537172cd8dc862adf9259b32435d /src/client/renderingengine.h | |
parent | e0716384d6c7abfa228b039056f1e872ca7bb8cf (diff) | |
download | minetest-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/renderingengine.h')
-rw-r--r-- | src/client/renderingengine.h | 11 |
1 files changed, 5 insertions, 6 deletions
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); |