mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Some globals (un-)init fixes
This commit is contained in:
parent
2af5191070
commit
d8190e1c5f
16 changed files with 58 additions and 62 deletions
|
@ -253,8 +253,11 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
|||
|
||||
RenderingEngine::~RenderingEngine()
|
||||
{
|
||||
sanity_check(s_singleton == this);
|
||||
|
||||
core.reset();
|
||||
m_device->closeDevice();
|
||||
m_device->drop();
|
||||
s_singleton = nullptr;
|
||||
}
|
||||
|
||||
|
@ -278,10 +281,7 @@ void RenderingEngine::removeMesh(const scene::IMesh* mesh)
|
|||
void RenderingEngine::cleanupMeshCache()
|
||||
{
|
||||
auto mesh_cache = m_device->getSceneManager()->getMeshCache();
|
||||
while (mesh_cache->getMeshCount() != 0) {
|
||||
if (scene::IAnimatedMesh *mesh = mesh_cache->getMeshByIndex(0))
|
||||
mesh_cache->removeMesh(mesh);
|
||||
}
|
||||
mesh_cache->clear();
|
||||
}
|
||||
|
||||
bool RenderingEngine::setupTopLevelWindow()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue