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


C++ VisRenderContext_cl::SetRenderFilterMask方法代码示例

本文整理汇总了C++中VisRenderContext_cl::SetRenderFilterMask方法的典型用法代码示例。如果您正苦于以下问题:C++ VisRenderContext_cl::SetRenderFilterMask方法的具体用法?C++ VisRenderContext_cl::SetRenderFilterMask怎么用?C++ VisRenderContext_cl::SetRenderFilterMask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VisRenderContext_cl的用法示例。


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

示例1: InitializePostProcessors


//.........这里部分代码省略.........
      }
    }
    else if(pSimpleCopy != NULL)
    {
      // Remove existing copy PP if not needed
      RemoveComponent(pSimpleCopy);
    }

    m_assignedContexts.EnsureCapacity(iNumPostProcessors);

    // Create a target context for each post processor
    for(iPostProcessorIndex = 0; iPostProcessorIndex < iNumPostProcessors; iPostProcessorIndex++)
    {
      VPostProcessingBaseComponent* pPostProcessor = postProcessors[iPostProcessorIndex];

      pPostProcessor->m_iTargetIndex = iPostProcessorIndex;

      const VisRenderContext_cl* pFinalTargetContext = GetFinalTargetContext();

      bool bRenderIntoFinalTargetContext = (iPostProcessorIndex >= iCopyPPIndex);

      int iPosX, iPosY, iWidth, iHeight;
      float zMin, zMax;
      if(bRenderIntoFinalTargetContext)
      {
        pFinalTargetContext->GetViewport(iPosX, iPosY, iWidth, iHeight, zMin, zMax);
      }
      else
      {
        GetReferenceContext()->GetViewport(iPosX, iPosY, iWidth, iHeight, zMin, zMax);
      }

      VisRenderContext_cl* pContext = new VisRenderContext_cl(pFinalTargetContext->GetCamera(), 90.0f, 90.0f, iWidth, iHeight, 0.0f, 0.0f, pFinalTargetContext->GetRenderFlags());
      pContext->SetRenderFilterMask(pFinalTargetContext->GetRenderFilterMask());
      pContext->SetViewport(iPosX, iPosY, iWidth, iHeight, zMin, zMax);
      pContext->SetViewProperties(pFinalTargetContext->GetViewProperties());

      pContext->SetName(pPostProcessor->GetTypeId()->m_lpszClassName);

      pContext->SetVisibilityCollector(pFinalTargetContext->GetVisibilityCollector(), false);
      pContext->SetPriority(pPostProcessor->GetPriority());
      pContext->SetUserData(pPostProcessor);
      pContext->SetRenderLoop(new PostProcessRenderLoop_cl(pPostProcessor));

      if(bRenderIntoFinalTargetContext)
      {
        pContext->SetRenderAndDepthStencilTargets(pFinalTargetContext);

        if (bUsesOffscreenRenderTarget)
        {
          // If possible, try to give the post processors that render directly into the final target context a useful depth-stencil target.
          // This is only possible if the final target context has MSAA disabled.
          bool bCanReplaceDST = false;

          if(pFinalTargetContext->RendersIntoBackBuffer())
          {
            #if !defined(_VISION_ANDROID) && !defined(_VISION_TIZEN) && !defined(_VISION_NACL)
              // On Android, the back buffer context uses a fixed FBO, so we can't replace the DST.
              bCanReplaceDST = Vision::Video.GetCurrentConfig()->m_eMultiSample == VVIDEO_MULTISAMPLE_OFF;
            #endif
          }
          else if(pFinalTargetContext->GetRenderTarget(0) != NULL)
          {
            bCanReplaceDST = static_cast<VisRenderableTexture_cl*>(pFinalTargetContext->GetRenderTarget(0))->GetConfig()->m_iMultiSampling <= 1;
          }
开发者ID:Arpit007,项目名称:projectanarchy,代码行数:66,代码来源:VRendererNodeCommon.cpp


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