Ejemplo n.º 1
0
 private static void DoRenderLoop_Internal(IRenderPipelineAsset pipe, Camera[] cameras, IntPtr loopPtr)
 {
     RenderPipelineManager.PrepareRenderPipeline(pipe);
     if (RenderPipelineManager.currentPipeline != null)
     {
         ScriptableRenderContext renderContext = new ScriptableRenderContext(loopPtr);
         RenderPipelineManager.currentPipeline.Render(renderContext, cameras);
     }
 }
Ejemplo n.º 2
0
 private static void PrepareRenderPipeline(IRenderPipelineAsset pipe)
 {
     if (RenderPipelineManager.s_CurrentPipelineAsset != pipe)
     {
         if (RenderPipelineManager.s_CurrentPipelineAsset != null)
         {
             RenderPipelineManager.CleanupRenderPipeline();
         }
         RenderPipelineManager.s_CurrentPipelineAsset = pipe;
     }
     if (RenderPipelineManager.s_CurrentPipelineAsset != null && (RenderPipelineManager.currentPipeline == null || RenderPipelineManager.currentPipeline.disposed))
     {
         RenderPipelineManager.currentPipeline = RenderPipelineManager.s_CurrentPipelineAsset.CreatePipeline();
     }
 }
Ejemplo n.º 3
0
        private static bool DoRenderLoop_Internal(IRenderPipelineAsset pipe, Camera[] cameras, IntPtr loopPtr)
        {
            bool result;

            if (!RenderPipelineManager.PrepareRenderPipeline(pipe))
            {
                result = false;
            }
            else
            {
                ScriptableRenderContext renderContext = default(ScriptableRenderContext);
                renderContext.Initialize(loopPtr);
                RenderPipelineManager.currentPipeline.Render(renderContext, cameras);
                result = true;
            }
            return(result);
        }