Exemple #1
0
 private static void RenderQueueStarted(object sender, SceneManager.BeginRenderQueueEventArgs e)
 {
     e.SkipInvocation = false; // shut up compiler
     if (!AfterQueue && (byte)e.RenderQueueId == (byte)TargetQueue)
     {
         Render();
     }
 }
Exemple #2
0
            ///<summary>
            /// <see>RenderQueueListener.RenderQueueStarted</see>
            ///</summary>
            public void OnRenderQueueStarted(object sender, SceneManager.BeginRenderQueueEventArgs e)
            {
                // Skip when not matching viewport
                // shadows update is nested within main viewport update
                if (this.sceneManager.CurrentViewport != this.viewport)
                {
                    return;
                }

                FlushUpTo(e.RenderQueueId);
                // If noone wants to render this queue, skip it
                // Don't skip the OVERLAY queue because that's handled seperately
                if (!this.operation.RenderQueues[(int)e.RenderQueueId] && e.RenderQueueId != RenderQueueGroupID.Overlay)
                {
                    e.SkipInvocation = true;
                }
            }