Qt and DirectX 9
-
As far as I know, this can be done.
Qt itself, of course, uses OpenGL and if you decide to go with DX, you will loose the cross-platform support.
-
Depending on what kind of support you have in mind the answer is either yes or no.
Qt can provide you with a native handle to the window. With that you can create whichever DirectX version context you need and draw there whatever you want. That's a bout it. There are no helpers classes or functions etc. Qt itself knows nothing about DirectX. -
When using the Angle builds of Qt (not the native OpenGL ones), you could, in theory, mix Qt content with other Direct3D stuff by pulling out the D3D handle Angle uses via EGL_ANGLE_surface_d3d_texture_2d_share_handle. Or, if the goal is to have some D3D rendering as part of the Qt content, EGL_ANGLE_d3d_share_handle_client_buffer could be used to create an EGL pbuffer from a D3D texture. The pbuffer can then be used as a texture, allowing the D3D rendering to be shown in a Qt Quick scene etc.
-
@agocs - though this might work, having a dependency on both ANGLE and OpenGL (for the extension mechanism) just to get a D3D handle seems like an overkill. This might be a better solution if you needed to mix OpenGL and D3D, though I can't imagine why someone would want to.