protected void RenderFrameToDraw(Frame frameToDraw, bool endDraw) { Squared.Threading.Profiling.Superluminal.BeginEventFormat("Issue Frame", "SRFrame #{0}", frameToDraw.Index, color: 0x10CFCF); try { PresentBegunSignal.Reset(); if (frameToDraw != null) { Manager.PrepareManager.AssertEmpty(); Manager.FlushBufferGenerators(frameToDraw.Index); RenderFrame(frameToDraw, true); } if (endDraw) { RunBeforePresentHandlers(); SetPresentBegun(); _SyncEndDraw(); SetPresentEnded(); } if (endDraw) { RunAfterPresentHandlers(); } } finally { if (frameToDraw != null) { frameToDraw.Dispose(); } Squared.Threading.Profiling.Superluminal.EndEvent(); } }
protected void RenderFrameToDraw(Frame frameToDraw, bool endDraw) { try { if (frameToDraw != null) { Manager.PrepareManager.AssertEmpty(); Manager.FlushBufferGenerators(frameToDraw.Index); RenderFrame(frameToDraw, true); } if (endDraw) { RunBeforePresentHandlers(); _SyncEndDraw(); } FlushPendingDisposes(); if (endDraw) { RunAfterPresentHandlers(); } } finally { if (frameToDraw != null) { frameToDraw.Dispose(); } } }