本文整理汇总了C++中CompositionTargetPass::getOutputName方法的典型用法代码示例。如果您正苦于以下问题:C++ CompositionTargetPass::getOutputName方法的具体用法?C++ CompositionTargetPass::getOutputName怎么用?C++ CompositionTargetPass::getOutputName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompositionTargetPass
的用法示例。
在下文中一共展示了CompositionTargetPass::getOutputName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _compileTargetOperations
//-----------------------------------------------------------------------
void CompositorInstance::_compileTargetOperations(CompiledState &compiledState)
{
/// Collect targets of previous state
if(mPreviousInstance)
mPreviousInstance->_compileTargetOperations(compiledState);
/// Texture targets
CompositionTechnique::TargetPassIterator it = mTechnique->getTargetPassIterator();
while(it.hasMoreElements())
{
CompositionTargetPass *target = it.getNext();
TargetOperation ts(getTargetForTex(target->getOutputName()));
/// Set "only initial" flag, visibilityMask and lodBias according to CompositionTargetPass.
ts.onlyInitial = target->getOnlyInitial();
ts.visibilityMask = target->getVisibilityMask();
ts.lodBias = target->getLodBias();
/// Check for input mode previous
if(target->getInputMode() == CompositionTargetPass::IM_PREVIOUS)
{
/// Collect target state for previous compositor
/// The TargetOperation for the final target is collected seperately as it is merged
/// with later operations
mPreviousInstance->_compileOutputOperation(ts);
}
/// Collect passes of our own target
collectPasses(ts, target);
compiledState.push_back(ts);
}
}
示例2: setCompositorEnabled
//-----------------------------------------------------------------------
void CompositorChain::setCompositorEnabled(size_t position, bool state)
{
CompositorInstance* inst = getCompositor(position);
if (!state && inst->getEnabled())
{
// If we're disabling a 'middle' compositor in a chain, we have to be
// careful about textures which might have been shared by non-adjacent
// instances which have now become adjacent.
CompositorInstance* nextInstance = getNextInstance(inst, true);
if (nextInstance)
{
CompositionTechnique::TargetPassIterator tpit = nextInstance->getTechnique()->getTargetPassIterator();
while(tpit.hasMoreElements())
{
CompositionTargetPass* tp = tpit.getNext();
if (tp->getInputMode() == CompositionTargetPass::IM_PREVIOUS)
{
if (nextInstance->getTechnique()->getTextureDefinition(tp->getOutputName())->pooled)
{
// recreate
nextInstance->freeResources(false, true);
nextInstance->createResources(false);
}
}
}
}
}
inst->setEnabled(state);
}
示例3: isInputPreviousTarget
//---------------------------------------------------------------------
bool CompositorManager::isInputPreviousTarget(CompositorInstance* inst, const Ogre::String& localName)
{
CompositionTechnique::TargetPassIterator tpit = inst->getTechnique()->getTargetPassIterator();
while(tpit.hasMoreElements())
{
CompositionTargetPass* tp = tpit.getNext();
if (tp->getInputMode() == CompositionTargetPass::IM_PREVIOUS &&
tp->getOutputName() == localName)
{
return true;
}
}
return false;
}
示例4: deriveTextureRenderTargetOptions
//---------------------------------------------------------------------
void CompositorInstance::deriveTextureRenderTargetOptions(
const String& texname, bool *hwGammaWrite, uint *fsaa)
{
// search for passes on this texture def that either include a render_scene
// or use input previous
bool renderingScene = false;
CompositionTechnique::TargetPassIterator it = mTechnique->getTargetPassIterator();
while (it.hasMoreElements())
{
CompositionTargetPass* tp = it.getNext();
if (tp->getOutputName() == texname)
{
if (tp->getInputMode() == CompositionTargetPass::IM_PREVIOUS)
{
// this may be rendering the scene implicitly
// Can't check mPreviousInstance against mChain->_getOriginalSceneCompositor()
// at this time, so check the position
CompositorChain::InstanceIterator instit = mChain->getCompositors();
renderingScene = true;
while(instit.hasMoreElements())
{
CompositorInstance* inst = instit.getNext();
if (inst == this)
break;
else if (inst->getEnabled())
{
// nope, we have another compositor before us, this will
// be doing the AA
renderingScene = false;
}
}
if (renderingScene)
break;
}
else
{
// look for a render_scene pass
CompositionTargetPass::PassIterator pit = tp->getPassIterator();
while(pit.hasMoreElements())
{
CompositionPass* pass = pit.getNext();
if (pass->getType() == CompositionPass::PT_RENDERSCENE)
{
renderingScene = true;
break;
}
}
}
}
}
if (renderingScene)
{
// Ok, inherit settings from target
RenderTarget* target = mChain->getViewport()->getTarget();
*hwGammaWrite = target->isHardwareGammaEnabled();
*fsaa = target->getFSAA();
}
else
{
*hwGammaWrite = false;
*fsaa = 0;
}
}