@ -112,6 +112,8 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
RenderingManager::~RenderingManager ()
{
mRendering.removeWindowEventListener(this);
delete mPlayer;
delete mSkyManager;
delete mDebugging;
@ -114,6 +114,9 @@ Water::~Water()
MeshManager::getSingleton().remove("water");
if (mReflectionTarget)
mReflectionTexture->getBuffer()->getRenderTarget()->removeListener(this);
mWaterNode->detachObject(mWater);
mSceneManager->destroyEntity(mWater);
mSceneManager->destroySceneNode(mWaterNode);
@ -156,6 +156,11 @@ void OgreRenderer::setWindowEventListener(Ogre::WindowEventListener* listener)
Ogre::WindowEventUtilities::addWindowEventListener(mWindow, listener);
}
void OgreRenderer::removeWindowEventListener(Ogre::WindowEventListener* listener)
Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, listener);
void OgreRenderer::setFov(float fov)
mCamera->setFOVy(Degree(fov));
@ -106,6 +106,7 @@ namespace OEngine
~OgreRenderer() { cleanup(); }
void setWindowEventListener(Ogre::WindowEventListener* listener);
void removeWindowEventListener(Ogre::WindowEventListener* listener);
/** Configure the renderer. This will load configuration files and
set up the Root and logging classes. */