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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue