protected override void EndDraw()
        {
            RenderCoordinator.WorkStopwatch.Restart();

            try {
                RenderCoordinator.EndDraw();
            } finally {
                RenderCoordinator.WorkStopwatch.Stop();

                NextFrameTiming.EndDraw = RenderCoordinator.WorkStopwatch.Elapsed;
                NextFrameTiming.Wait    = RenderCoordinator.WaitStopwatch.Elapsed;
                PreviousFrameTiming     = NextFrameTiming;

                RenderCoordinator.WaitStopwatch.Reset();
            }

            RenderCoordinator.EnableThreading = _UseThreadedDraw;
        }
Exemple #2
0
        protected override void EndDraw()
        {
            RenderCoordinator.WorkStopwatch.Restart();

            try {
                RenderCoordinator.EndDraw();
            } finally {
                RenderCoordinator.WorkStopwatch.Stop();

                var lpc = NativeBatch.LifetimePrimitiveCount;
                var ppc = NextFrameTiming.PriorPrimitiveCount;

                NextFrameTiming.EndDraw        = RenderCoordinator.WorkStopwatch.Elapsed;
                NextFrameTiming.BeforePresent  = RenderCoordinator.BeforePresentStopwatch.Elapsed;
                NextFrameTiming.Wait           = RenderCoordinator.WaitStopwatch.Elapsed;
                NextFrameTiming.PrimitiveCount = (int)(lpc - ppc);
                PreviousFrameTiming            = NextFrameTiming;

                RenderCoordinator.WaitStopwatch.Reset();
                RenderCoordinator.BeforePresentStopwatch.Reset();
            }

            RenderCoordinator.EnableThreading = UseThreadedDraw;
        }