mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:23:53 +00:00
during cleanup we now delete all plugins created
This commit is contained in:
parent
44c644dd7b
commit
ff54508633
2 changed files with 31 additions and 2 deletions
|
@ -44,8 +44,10 @@ void OgreRenderer::cleanup()
|
|||
delete mFader;
|
||||
mFader = NULL;
|
||||
|
||||
OGRE_DELETE mRoot;
|
||||
delete mRoot;
|
||||
mRoot = NULL;
|
||||
|
||||
unloadPlugins();
|
||||
}
|
||||
|
||||
void OgreRenderer::start()
|
||||
|
@ -103,6 +105,31 @@ bool OgreRenderer::loadPlugins()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool OgreRenderer::unloadPlugins()
|
||||
{
|
||||
#ifdef ENABLE_PLUGIN_GL
|
||||
delete mGLPlugin;
|
||||
mGLPlugin = NULL;
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_Direct3D9
|
||||
delete mD3D9Plugin;
|
||||
mD3D9Plugin = NULL;
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_CgProgramManager
|
||||
delete mCgPlugin;
|
||||
mCgPlugin = NULL;
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_OctreeSceneManager
|
||||
delete mOctreePlugin;
|
||||
mOctreePlugin = NULL;
|
||||
#endif
|
||||
#ifdef ENABLE_PLUGIN_ParticleFX
|
||||
delete mParticleFXPlugin;
|
||||
mParticleFXPlugin = NULL;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void OgreRenderer::update(float dt)
|
||||
{
|
||||
mFader->update(dt);
|
||||
|
|
|
@ -151,7 +151,9 @@ namespace OEngine
|
|||
/// Start the main rendering loop
|
||||
void start();
|
||||
|
||||
bool loadPlugins() ;
|
||||
bool loadPlugins();
|
||||
|
||||
bool unloadPlugins();
|
||||
|
||||
void update(float dt);
|
||||
|
||||
|
|
Loading…
Reference in a new issue