We have an aging .NET Windows desktop marine navigation application that does some moderately complex rendering of S-57 marine vector charts (maps), ships, predictors and various navigation objects such as routes. The rendering was implemented long ago with System.Drawing.Graphics
.
In some situations the drawing can get extremely slow. We have used the VS2013 profiler and dotTrace profiler to optimize obvious hotspots in our code. The remaining time is spent in methods such as Graphics.DrawLines
, Graphics.FillPolygon
, etc.
Long run, the rendering needs to be re-implemented or ported to a graphics API that is hardware accelerated.
Does there exist any sort of (MS or third-party) wrapper to Direct2D or OpenGL that has the same interface as System.Drawing.Graphics
. That is a class with an identical or nearly identical public interface as Graphics
, but that is implemented with DirectX/OpenGL/other instead of GDI+?
I have looked but not found any as we would like this as well.
The closest accelerated library we've found is Win2D. https://github.com/Microsoft/Win2D
The major caveat with Win2D is that it's primarily supported on Windows 10. It was created in the Windows 8 days but even that is considered legacy.