当前位置: 首页>>代码示例>>C++>>正文


C++ CompositorChain类代码示例

本文整理汇总了C++中CompositorChain的典型用法代码示例。如果您正苦于以下问题:C++ CompositorChain类的具体用法?C++ CompositorChain怎么用?C++ CompositorChain使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CompositorChain类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _reconstructAllCompositorResources

//---------------------------------------------------------------------
void CompositorManager::_reconstructAllCompositorResources()
{
    // In order to deal with shared resources, we have to disable *all* compositors
    // first, that way shared resources will get freed
    typedef vector<CompositorInstance*>::type InstVec;
    InstVec instancesToReenable;
    for (Chains::iterator i = mChains.begin(); i != mChains.end(); ++i)
    {
        CompositorChain* chain = i->second;
        CompositorChain::InstanceIterator instIt = chain->getCompositors();
        while (instIt.hasMoreElements())
        {
            CompositorInstance* inst = instIt.getNext();
            if (inst->getEnabled())
            {
                inst->setEnabled(false);
                instancesToReenable.push_back(inst);
            }
        }
    }

    //UVs are lost, and will never be reconstructed unless we do them again, now
    if( mRectangle )
        mRectangle->setDefaultUVs();

    for (InstVec::iterator i = instancesToReenable.begin(); i != instancesToReenable.end(); ++i)
    {
        CompositorInstance* inst = *i;
        inst->setEnabled(true);
    }
}
开发者ID:Gerviba,项目名称:MuOnline,代码行数:32,代码来源:OgreCompositorManager.cpp

示例2: delete

DeferredShadingSystem::~DeferredShadingSystem()
{
	// Delete mini lights
	for(std::set<MLight*>::iterator i=mLights.begin(); i!=mLights.end(); ++i)
	{
		delete (*i);
	}
	// Delete the ambient light
	delete mAmbientLight;

	if (mCurrentMode==DSM_SHOWLIT && mInstance[mCurrentMode]->getEnabled())
	{
		RenderTarget* renderTarget = mInstance[mCurrentMode]->getRenderTarget("mrt_output");
		assert(renderTarget);

		LogManager::getSingleton().logMessage("Removing Listener from:");
		LogManager::getSingleton().logMessage(renderTarget->getName());

		renderTarget->removeListener(this);
	}

	CompositorChain *chain = CompositorManager::getSingleton().getCompositorChain(mViewport);
	for(int i=0; i<DSM_COUNT; ++i)
		chain->_removeInstance(mInstance[i]);

	delete mLightMaterialGenerator;
}
开发者ID:venkatarajasekhar,项目名称:viper,代码行数:27,代码来源:DeferredShading.cpp

示例3:

	DeferredShadingSystem::~DeferredShadingSystem()
	{
		CompositorChain *chain = CompositorManager::getSingleton().getCompositorChain(mViewport);
		for(int i=0; i<DSM_COUNT; ++i)
			chain->_removeInstance(mInstance[i]);
		CompositorManager::getSingleton().removeCompositorChain(mViewport);
	}
开发者ID:mavaL,项目名称:MiniCraft,代码行数:7,代码来源:DeferredShading.cpp

示例4: getByName

//-----------------------------------------------------------------------
CompositorInstance *CompositorManager::addCompositor(Viewport *vp, const String &compositor, int addPosition)
{
    CompositorPtr comp = getByName(compositor);
    if(comp.isNull())
        return 0;
    CompositorChain *chain = getCompositorChain(vp);
    return chain->addCompositor(comp, addPosition==-1 ? CompositorChain::LAST : (size_t)addPosition);
}
开发者ID:Gerviba,项目名称:MuOnline,代码行数:9,代码来源:OgreCompositorManager.cpp

示例5: getCompositorChain

//-----------------------------------------------------------------------
void CompositorManager::setCompositorEnabled(Viewport *vp, const String &compositor, bool value)
{
    CompositorChain *chain = getCompositorChain(vp);
    for(size_t pos=0; pos < chain->getNumCompositors(); ++pos)
    {
        CompositorInstance *instance = chain->getCompositor(pos);
        if(instance->getCompositor()->getName() == compositor)
        {
            chain->setCompositorEnabled(pos, value);
            break;
        }
    }
}
开发者ID:Gerviba,项目名称:MuOnline,代码行数:14,代码来源:OgreCompositorManager.cpp

示例6:

DeferredShadingSystem::~DeferredShadingSystem()
{
	CompositorChain *chain = CompositorManager::getSingleton().getCompositorChain(mViewport);
	for(int i=0; i<DSM_COUNT; ++i)
		chain->_removeInstance(mInstance[i]);
	CompositorManager::getSingleton().removeCompositorChain(mViewport);

	Ogre::CompositorManager& compMgr = Ogre::CompositorManager::getSingleton();
	CompositorLogicMap::const_iterator itor = mCompositorLogics.begin();
	CompositorLogicMap::const_iterator end  = mCompositorLogics.end();
	while( itor != end )
	{
		compMgr.unregisterCompositorLogic( itor->first );
		delete itor->second;
		++itor;
	}
	mCompositorLogics.clear();
}
开发者ID:j-rivero,项目名称:ogre-acornacorn,代码行数:18,代码来源:DeferredShading.cpp


注:本文中的CompositorChain类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。