Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt and DirectX 9
QtWS25 Last Chance

Qt and DirectX 9

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paulmcco
    wrote on 28 Mar 2014, 19:32 last edited by
    #1

    I'm sure its been asked before but I cannot find a direct answer. I want to use Qt with DirectX 9 to create a GUI based DirectX application. Does Qt have support for DirectX 9.0c?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 29 Mar 2014, 12:39 last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on 29 Mar 2014, 19:51 last edited by
        #3

        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.

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zeljko
          wrote on 30 Mar 2014, 08:43 last edited by
          #4

          Like Chris mentioned. Include directx in your project, qt can return back to you HWND (windows native handle) , and then use directx calls and provide windows handle to directx funtions ... that's it ..pretty straight.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            agocs
            wrote on 31 Mar 2014, 08:23 last edited by
            #5

            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.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on 31 Mar 2014, 09:34 last edited by
              #6

              @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.

              1 Reply Last reply
              0

              1/6

              28 Mar 2014, 19:32

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved