private void CompositionTargetRendering(object sender, EventArgs e) { if (!_viewportInitialized) { InitializeViewport(); } if (!_viewportInitialized) { return; //stop if the line above failed. } if (!_invalid && !DeveloperTools.DeveloperMode) { return; //in developermode always render so that fps can be counterd. } if ((Renderer != null) && (_map != null)) { _invalid = false; Renderer.Render(Map.Viewport, _map.Layers); if (DeveloperTools.DeveloperMode) { _fpsCounter.FramePlusOne(); } _invalid = false; } }
private void RenderWpf() { if ((Renderer != null) && (_map != null)) { Renderer.Render(RenderCanvas, Map.Viewport, _map.Layers, _map.BackColor); if (DeveloperTools.DeveloperMode) { FpsCounter.FramePlusOne(); } _invalid = false; } }