示例#1
0
	void BaseManager::destroy()
	{
		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		destroyRender();

		if (mpHGE)
		{
			mpHGE->System_Shutdown();
			mpHGE->Release();
		}
		/*
		if (hWnd)
		{
			DestroyWindow(hWnd);
			hWnd = 0;
		}

		UnregisterClass(WND_CLASS_NAME, hInstance);
		*/
	}
示例#2
0
	void BaseManager::destroy()
	{
		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		// очищаем сцену
		if (mSceneManager)
		{
			mSceneManager->clearScene();
			mSceneManager->destroyAllCameras();
			mSceneManager = nullptr;
			mCamera = nullptr;
		}

		if (mWindow)
		{
			mWindow->destroy();
			mWindow = nullptr;
		}

		if (mRoot)
		{
			Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
			if (window)
				window->removeAllViewports();
			delete mRoot;
			mRoot = nullptr;
		}

	}
示例#3
0
void BasisManager::destroyBasisManager() // очищаем все параметры каркаса приложения
{

	destroyGui();

	// очищаем сцену
	if (mSceneMgr) {
		mSceneMgr->clearScene();
		mSceneMgr->destroyAllCameras();
		mSceneMgr = 0;
	}

	destroyInput(); // удаляем ввод

	if (mWindow) {
		mWindow->destroy();
		mWindow = 0;
	}

	if (mRoot) {
		Ogre::RenderWindow * mWindow = mRoot->getAutoCreatedWindow();
		if (mWindow) mWindow->removeAllViewports();
		delete mRoot;
		mRoot = 0;
	}

}
示例#4
0
void xrSASH::ReleaseEngine()
{
	m_bReinitEngine = true;

	destroyInput();
	Console->Destroy();
	destroySound();
	destroyEngine();
}
示例#5
0
	void BaseManager::shutdown() {
		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		//destroyRender();
	}
示例#6
0
AudioMixer::~AudioMixer()
{
	if(m_metronomeEnabledRef > 0) {
		appLog(LOG_CAT, Log::Warning)
			<< QStringLiteral("Audio mixer destroyed while metronome still refernced");
	}

	// Delete all child inputs cleanly
	while(!m_inputs.isEmpty())
		destroyInput(m_inputs.first());
}
示例#7
0
	void BaseManager::destroy()
	{
		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		destroyRender();
	}
示例#8
0
	void BaseManager::destroy()
	{
		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		destroyRender();

		SDL_GL_DeleteContext(mContext);
		IMG_Quit();
		SDL_Quit();
	}
示例#9
0
Game::~Game()
{
	destroyInput();

	if (viewport)
		delete viewport;

	if (camera)
		delete camera;

	if (sceneManager)
		delete sceneManager;

	if (window)
		delete window;

	if (ogreRoot)
		delete ogreRoot;
}
示例#10
0
	void BaseManager::destroy()
	{
		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		destroyRender();

		if (hWnd)
		{
			DestroyWindow(hWnd);
			hWnd = 0;
		}

		UnregisterClass(WND_CLASS_NAME, hInstance);
	}
示例#11
0
	void BaseManager::shutdown()
	{
		mPreLuaScript.clear();
		mPreLuaLocation.clear();
		mPreLoad.clear();

		destroyScene();

		destroyPointerManager();

		destroyInput();

		destroyGui();

		mSceneManager->destroyQuery( mSceneQuery );
		mSceneQuery = nullptr;

		destroySceneManager();

		//清除内部帧监听器
		//必须在destroyScene等后面被施放
		delete mInputFilter;
		mInputFilter = nullptr;

		if (mRoot)
		{
			Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
			if (window)
				window->removeAllViewports();
			OGRE_DELETE mRoot;
			mRoot = nullptr;
		}

		if( mCoutSource ){
			//删除mCoutSource,不要过早删除它。
			delete mCoutSource;
			mCoutSource = nullptr;
		}
	}
示例#12
0
/// <summary>
/// Completely resets the mixer. This must be called whenever an audio input
/// or the output format changes in a way that cannot be done on-the-fly.
/// WARNING: This causes an output discontinuity which means that it cannot be
/// called while broadcasting!
/// </summary>
void AudioMixer::resetMixer()
{
	// Serialize to a temporary buffer
	QByteArray data;
	QBuffer buffer(&data);
	buffer.open(QIODevice::ReadWrite);
	{
		QDataStream stream(&buffer);
		stream.setByteOrder(QDataStream::LittleEndian);
		stream.setFloatingPointPrecision(QDataStream::SinglePrecision);
		stream.setVersion(12);
		serialize(&stream);
		if(stream.status() != QDataStream::Ok) {
			// TODO
		}
	}

	// Completely reset mixer
	while(!m_inputs.isEmpty())
		destroyInput(m_inputs.first());
	m_outStats = AudioStats(getSampleRate(), getNumChannels());
	m_refTimestampUsec = App->getUsecSinceFrameOrigin();
	m_minInputDelayUsec = 0;
	m_sampleNum = 0;

	// Restore previous state
	buffer.seek(0);
	{
		QDataStream stream(&buffer);
		stream.setByteOrder(QDataStream::LittleEndian);
		stream.setFloatingPointPrecision(QDataStream::SinglePrecision);
		stream.setVersion(12);
		unserialize(&stream);
		if(stream.status() != QDataStream::Ok) {
			// TODO
		}
	}
}
示例#13
0
	void BaseManager::windowClosed(Ogre::RenderWindow* _rw)
	{
		mExit = true;
		destroyInput();
	}
示例#14
0
 DiInputManager::~DiInputManager()
 {
     destroyInput();
 }
示例#15
0
void BasisManager::windowClosed(Ogre::RenderWindow* rw)
{
	m_exit = true;
	destroyInput();
}
示例#16
0
	OISInputWindow::~OISInputWindow()
	{
		destroyInput();
	}