示例#1
0
	~Application()
	{
		Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this);

		if (mRoot) {
			if (mSceneMgr)
				mRoot->destroySceneManager(mSceneMgr);
			Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this);
			delete mRoot;
		}
	}
示例#2
0
	RenderBoxWrap::~RenderBoxWrap()
	{
		FrameAdvise(false);
		mRenderBox->removeCamera();

		mRenderBox->eventMouseDrag = nullptr;
		mRenderBox->eventMouseWheel = nullptr;
		mRenderBox->eventMouseButtonPressed = nullptr;
		mRenderBox->eventMouseButtonReleased = nullptr;
		mRenderBox->eventUpdateViewport = nullptr;

		Ogre::Root * root = Ogre::Root::getSingletonPtr();
		if (root && mScene) root->destroySceneManager(mScene);
	}
示例#3
0
	void RenderBoxScene::destroy()
	{
		clearScene();

		if (mCanvas)
		{
			frameAdvise(false);

			mCanvas->eventMouseDrag = nullptr;
			mCanvas->eventMouseButtonPressed = nullptr;
			mCanvas->eventMouseButtonReleased = nullptr;

			Ogre::Root* root = Ogre::Root::getSingletonPtr();
			if (root && mScene)
				root->destroySceneManager(mScene);
			mScene= nullptr;
		}

		RenderBox::destroy();
	}