As far as I know, current OVP projects now provide the existing GDI system as the single possibility for MFDs to make their visualizations. I understand this is the easy way, as GDI is available on all windows systems, and existing MFDs already use GDI, so it's good for compatibility. But I can also see some disadvantages:
So, about the criteria, I can think of the following (not in this order):
(*) Well, a GDI implementation exists in Wine, but that's not exactly light-weight.
(**) I may be confusing backward and forward here: I'm never really sure.
- It can be relatively slow. For some visualization plugins, it is necessary to do all the GDI drawing on the CPU to a bitmap hDC, and then transfer the bitmap to the video card on each MFD redraw. No hardware acceleration is used for any drawing primitive.
- It is not portable to non-windows platforms. For instance, in this thread, Hielor needs to convert existing MFDs from GDI to Allegro, because GDI doesn't exist in Linux(*). Also, continued use of GDI prevents a future port of Orbiter itself to non-windows platforms.
So, about the criteria, I can think of the following (not in this order):
- Can we make backward(**) compatibility? Can existing MFDs be made working on the new system? I think this shouldn't be too hard for any system, as the existing API can be re-implemented using a bitmap hDC, and doing a bitmap copy from the hDC to the target platform. I think all platforms will support this.
- Can we make forward(**) compatibility? Can MFDs for the future system be made in such a way that they will also work on older Orbiter versions? This may not be very important, but it could definitely be possible if the API has an implementation on top of GDI.
- Can it be made hardware-accelerated? Can visualization plugin developers take the library, implement it on their target (OpenGL, Direct3D or whatever), and implement some of the high-level primitives directly on their target API?
- Is it portable to non-windows platforms?
- Is it light-weight and fast? (Talking about the "fallback" software implementation here)
- Does it contain all the primitives we need?
- Does it have a nice license?
- Cairo (Has been mentioned by Urwumpe. Is accelerated on multiple targets, so it may be possible to define your own output target. How difficult is this?)
- Allegro (Used by Hielor for making an MFD in Linux. I got the idea for this thread when I started reading more about Allegro. Seems to be very multi-platform and light-weight, but how easy is it to make it accelerated?)
- AVSGL (Made by myself. Extremely unfinished and incomplete, probably doesn't compare well with the other alternatives at this stage, but is specially designed with the idea in mind to make it easily accelerated on many target platforms)
- There are many other graphics libraries out there
- Final alternative: stick to GDI.
(*) Well, a GDI implementation exists in Wine, but that's not exactly light-weight.
(**) I may be confusing backward and forward here: I'm never really sure.