public void Run <TRendererContext>(IRenderTarget <TRendererContext> renderTarget, RenderFrameHandlerEx <TRendererContext> main) where TRendererContext : IDrawingContext { Initialize(); while (!renderTarget.Terminated && !_exiting) { renderTarget.Render(_frameContext, main); NextFrame(); } }
public void Render(Rect rect) { if (_renderTarget == null) { _renderTarget = _root.CreateRenderTarget(); } try { _renderTarget.Render(_root); } catch (RenderTargetCorruptedException ex) { Logging.Logger.Information("Renderer", this, "Render target was corrupted. Exception: {0}", ex); _renderTarget.Dispose(); _renderTarget = null; } finally { _dirty = false; } }