OpenInsight and Direct2D
Published 10 JAN 2013 at 06:00:54AM
Updated on 08 JAN 2013 at 06:00:54AM
As you may have noticed in a previous post on RXI files OpenInsight 10 provides the option to use Direct2D rendering when painting windows and controls on the screen. If you're not familiar with Direct2D it's a new graphics engine Microsoft introduced with Windows 7 that aims to replace the traditional GDI graphics interface that has been a part of Windows since time began. Essentially it's a hardware-accelerated API that takes advantage of modern GPUs to provide high-performance rendering of 2D geometry, bitmaps and text.
(The official MSDN Direct2D documentation can be found here).
By default OpenInsight will use Direct2D if it is available on the platform (usually Windows 7, Windows 8 and Vista SP2) unless you override this via the aforementioned /2D switch or the UseD2D option to turn it off. You can also disable it at runtime by using the SYSTEM object's D2D property, which takes a simple boolean value of 1 or 0.
Of course you're probably asking why you would want to disable this? Well, to be honest you probably don't, but it's a sad fact that not all graphics cards are created equal (or at least their drivers aren't) and it's nice to have the option to drop back to standard GDI rendering in case you ever run across a problem. We've also found it useful during our own development cycle here to see how the system behaves when Direct2D is not available, such as when running on an XP platform (of course we do actually test on XP itself, but switching platforms mid-development slows the entire process down, so initial testing of GDI rendering is done on Windows 7).
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).