コード例 #1
0
//-----------------------------------------------------------------------
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;
        }
    }
}
コード例 #2
0
//-----------------------------------------------------------------------
void CompositorManager::removeCompositor(Viewport *vp, const String &compositor)
{
    CompositorChain *chain = getCompositorChain(vp);
    for(size_t pos=0; pos < chain->getNumCompositors(); ++pos)
    {
        CompositorInstance *instance = chain->getCompositor(pos);
        if(instance->getCompositor()->getName() == compositor)
        {
            chain->removeCompositor(pos);
            break;
        }
    }
}