The long road to hardware accelerated displays
No one likes it when PFD is stuttering, especially not on final approach and especially not in bad weather conditions. However, this is when the display workload is at its highest – you have lots of changing indicators and (the worst offender!) the weather radar, plus, probably, GPWS with terrain display. The display performance drops to screeching lows and makes the entire experience unpleasant at best.
This is, sadly, all too familiar to many ProSim users – display performance was never the strongest suit for the historic reasons. Namely, the technology choice was made back in a day when Windows XP was still dominating the desktop, CPUs were showing good year-to-year performance growth, screens were smaller and with a lower resolution, and GPU acceleration was more of a gimmick than a necessity in 2D vector graphics space (for example, Adobe Flash Player, ubiquitous at the time, had CPU-based rasterization). So, ProSim displays were built on top of Microsoft’s GDI+ which was proven and stable technology, worked well on XP and was using CPU for all the rendering tasks which had added benefit of no special hardware requirements and no driver issues whatsoever.
Fast-forward 10 years to 2018 and this became an obvious pain point – displays have become bigger and built up resolution considerably, single-thread CPU performance growth had stalled, and GPU acceleration became the must-have item, but the GDI+ itself was never updated to match. This left us with displays built on foundation that was not capable of supporting modern-day requirements, not to mention extending to future devices.
So, in 2018 we started work on a solution – namely, transition display rendering to Microsoft’s Direct2D which was added to Windows 7 as a GPU-accelerated vector graphics rendering platform. The problem here was the sheer amount of code to transition – ProSim displays contain at least 40,000 lines of codes so straight rewrite was not really feasible, also, the ‘new’ displays had to be looking as close as possible to the ‘old’ displays. In the end we have built an intermediate layer that accepts GDI-like commands and can render those either using GDI+ as before or with the new Direct2D layer. This was introduced as an ‘opt-in’ feature in beta cyclus around July 2018, but the work continued well into 2019.
As the results of this effort, you can enjoy smooth display rendering without performance drops in high-load scenarios even on low end devices.
Currently, Direct2D rendering is opt-in (yet strongly recommended) feature for ProSim737 and ProSimA320 and the only rendering method of upcoming ProSim737MAX, we expect to enable it by default for all the products in one of future releases.