本文整理汇总了C++中DisplayPtr::MRTRenderBeginPass方法的典型用法代码示例。如果您正苦于以下问题:C++ DisplayPtr::MRTRenderBeginPass方法的具体用法?C++ DisplayPtr::MRTRenderBeginPass怎么用?C++ DisplayPtr::MRTRenderBeginPass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DisplayPtr
的用法示例。
在下文中一共展示了DisplayPtr::MRTRenderBeginPass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
void DisplayMaterial::Render()
{
m_pEffect->SetTechnique(m_hTechnique);
#if 0
for_each(m_vRenderList.begin(), m_vRenderList.end(), RenderObjectFunction(this));
#else
DisplayPtr pDisplay = Display::GetInstance();
DisplayStateManagerPtr pStateManager = pDisplay->GetStateManagerInterface();
EffectPtr pEffect = GetEffect()->GetEffect();
size_t uCount = m_vRenderList.size();
UInt uPassCount;
UInt uChangeCount;
UInt uDuplicateCount;
pEffect->Begin(&uPassCount, EFFECT_RENDER_FLAGS);
for (UInt uPass = 0 ; uPass < uPassCount ; ++uPass)
{
pDisplay->MRTRenderBeginPass(uPass);
pStateManager->BeginPass(uPass);
pEffect->BeginPass(uPass);
for (size_t i = 0 ; uCount > i ; ++i)
{
DisplayObjectPtr pDisplayObject = m_vRenderList[i];
pDisplayObject->RenderBegin();
pDisplay->SetCurrentWorldMatrix(pDisplayObject->GetWorldMatrix());
UseParams();
pEffect->CommitChanges();
pDisplayObject->Render();
pDisplayObject->RenderEnd();
}
pEffect->EndPass();
pStateManager->EndPass(uChangeCount, uDuplicateCount);
pDisplay->MRTRenderEndPass();
}
pEffect->End();
#endif
m_vRenderList.clear();
}