Search code examples
c++directxcompatibility

DirectX backward compatibility


I'm just a beginner trying to understand the path to follow for creating graphical applications (not games!!). Since I'm very addicted to Windows I chosen to try DirectX as graphic library, with C++. The point is: DirectX 9, 10, 11 (and further more to come from Microsoft..): which one do I choose? I know that programming in DX9 is forward compatible with DX10/11, but is it DX11 backward compatible with DX10/9? And I don't mean that solely for a programming level compatibility, but an actual runtime compatibility: if a user runs a DX11 made application on a DX9 environment, would it work just fine? If not, how may I make a DX "universal" application?

Also, an Off-topic question (answering that is fully optional): I read a lot of good about Qt and WxWidgets. Would you suggest to use one of those instead of DirectX? Right now I have no plans for portability on other operating systems, still, would it be better to get ready just in case I change my mind?

Many thanks to anyone who'll answer :)


Solution

  • Regarding your first question, you can code to DX11 and target DX9 level hardware. More information is available on this MSDN overview page.

    Reading your second question, however, makes me wonder if you really want to be using DirectX for your purposes. DirectX is typically used for the Direct3D graphics and input APIs. You may find that WPF or GDI+ is acceptable (and in fact, WPF is accelerated by DirectX so you gain some of the performance benefits.)

    Qt and wxWidgets are both portable UI SDK/libraries. You can certainly use these, however if your are targetting Windows platforms only, then the portability isn't of much use. If you are sticking with C++ over C#, then Qt is not a bad choice for a UI library.

    Edit: If Win8 only, consider using a C++/XAML combo