コード例 #1
0
	//---------------------------------------------------------------------
	void ResourceBackgroundQueue::shutdown()
	{
		WorkQueue* wq = Root::getSingleton().getWorkQueue();
		wq->abortRequestsByChannel(mWorkQueueChannel);
		wq->removeRequestHandler(mWorkQueueChannel, this);
		wq->removeResponseHandler(mWorkQueueChannel, this);
	}
コード例 #2
0
 LodWorkQueueWorker::~LodWorkQueueWorker()
 {
     Root* root = Root::getSingletonPtr();
     if (root) {
         WorkQueue* wq = root->getWorkQueue();
         if (wq) {
             wq->removeRequestHandler(mChannelID, this);
         }
     }
 }
コード例 #3
0
	//---------------------------------------------------------------------
	Page::~Page()
	{
		WorkQueue* wq = Root::getSingleton().getWorkQueue();
		wq->removeRequestHandler(mWorkQueueChannel, this);
		wq->removeResponseHandler(mWorkQueueChannel, this);

		destroyAllContentCollections();
		if (mDebugNode)
		{
			// destroy while we have the chance
			SceneNode::ObjectIterator it = mDebugNode->getAttachedObjectIterator();
			while(it.hasMoreElements())
				mParent->getSceneManager()->destroyMovableObject(it.getNext());
			mDebugNode->removeAndDestroyAllChildren();
			mParent->getSceneManager()->destroySceneNode(mDebugNode);

			mDebugNode = 0;
		}
	}
コード例 #4
0
    //---------------------------------------------------------------------
    TerrainPagedWorldSection::~TerrainPagedWorldSection()
    {
        //remove the pending tasks, but keep the front one, as it may have been in running
        if(!mPagesInLoading.empty())
            mPagesInLoading.erase( ++mPagesInLoading.begin(), mPagesInLoading.end() );

        while(!mPagesInLoading.empty())
        {
            OGRE_THREAD_SLEEP(50);
            Root::getSingleton().getWorkQueue()->processResponses();
        }

        WorkQueue* wq = Root::getSingleton().getWorkQueue();
        wq->removeRequestHandler(mWorkQueueChannel, this);
        wq->removeResponseHandler(mWorkQueueChannel, this);

        OGRE_DELETE mTerrainGroup;
        if(mTerrainDefiner)
            OGRE_DELETE mTerrainDefiner;
    }