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. Can I dynamically choose ANGEL or native OpenGL
QtWS25 Last Chance

Can I dynamically choose ANGEL or native OpenGL

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 6.2k 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.
  • W Offline
    W Offline
    weiyuemin
    wrote on last edited by
    #1

    I'm On Windows, and I'm mainly using QtQuick2.

    When configure, we can choose whether to use ANGEL or use native OpenGL.
    If I configure Qt using -opengl desktop, Qt will use native OpenGL driver. If without that option, Qt will use the ANGLE-library to translate OpenGL calls into DirectX.

    My question is:
    Can I dynamically choose ANGEL or native OpenGL? I prefer native OpenGL, but if the graphic card of some user do not support OpenGL 2.1 or higher, I would like to run my application with ANGEL.

    Can this be achieved ?

    Thank you :)

    1 Reply Last reply
    0
    • martin_kyM Offline
      martin_kyM Offline
      martin_ky
      wrote on last edited by
      #2

      Hello weiyuemin,

      no, you can't chose between ANGLE (OpenGL ES 2 api on top of Direct 3D) and native desktop OpenGL at the moment. As you correctly stated, the choice is made when you configure and compile Qt.

      I heard that the Qt team is thinking about a solution to this, but I also heard that would require significant refactoring of Qt GUI.

      The only solution to support both at the moment would be to compile Qt twice: both for desktop OpenGL and ANGLE and distribute both sets of Qt libs with your program (perhaps only the Qt5Gui.dll). Your program will then have to somehow select the appropriate libs to use.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        weiyuemin
        wrote on last edited by
        #3

        I link Qt dynamically, so I should prepare both sets of Qt dlls.. I will try it at sometime.
        Thank you :)

        1 Reply Last reply
        0
        • W Offline
          W Offline
          weiyuemin
          wrote on last edited by
          #4

          Can I bring the new version of OpenGL dll together with my application? Bringing both sets of Qt dlls is a bit large.

          I believe that most graphic cards should support OpenGL 2.1 (it is on the newly bought PC). they seemingly to only support OpenGL 1.1 because the stock Windows driver only supports OpenGL 1.1.

          Is there any approach that enables OpenGL 2.1 without updating graphic card driver ?

          1 Reply Last reply
          0
          • martin_kyM Offline
            martin_kyM Offline
            martin_ky
            wrote on last edited by
            #5

            I think the code that access OpenGL directly is focused in Qt5Gui.dll so you may only need to shipt two versions of this single .dll (it's about 5 MB on my system). Maybe also the Qt5Multimedia*.dlls, but I'm not sure if that is necessary - try and see. Then place those two sets of .dlls in two separate directories and make two startup .bat scripts which will bring the appropriate .dlls into PATH.

            To your second question: Windows provides only an API to OpenGL, the actual implementation is provided by your graphics card driver. Well, Windows also has a stock implementation, but this is the old 1.1 version, which you mentioned. And AFAIK that one is even a software one (i.e. not GPU accelerated). BTW. it should not be a problem to get and install recent GPU driver for a newly bought computer, or is it?

            1 Reply Last reply
            0
            • W Offline
              W Offline
              weiyuemin
              wrote on last edited by
              #6

              Well, it's not a problem for me to get and install recent GPU driver, but it may be a problem/barrier for others:

              My friend had been using the default GPU driver (brought by Windows 7) for years. He was surprised when I told him that he need to update his GPU driver, because he is a user of LOL(league of legends, a popular game these days), and he thought a gamer shouldn't have 'driver problems' when running a desktop application.

              I think it will be a problem for quite some users, so I'm eager to find a solution to this.

              BTW, now I don't think using ANGEL is a very good choice, because of these bugs:

              https://bugreports.qt-project.org/browse/QTBUG-29223
              https://bugreports.qt-project.org/browse/QTBUG-30158

              Meanwhile '-opengl desktop' version works well on these.

              1 Reply Last reply
              0
              • martin_kyM Offline
                martin_kyM Offline
                martin_ky
                wrote on last edited by
                #7

                Could be that some OEM Windows installation come with bundled drivers or that the default built-in drivers work for your friend. In my experience is, after a fresh installation (XP / Vista / 7), Windows starts in a low resolution mode, no graphics acceleration and says something like "Install your GPU driver to improve your graphics experience". Windows Update may be able to fetch and install the drivers for you. So it could be the case that your friend already has the driver, without the need of manual download and installation.

                The point is: without a GPU driver, you get no GPU acceleration, no matter if you use OpenGL or Direct3D (ANGLE) API.

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  weiyuemin
                  wrote on last edited by
                  #8

                  Thank you :) I'll try to do more investigation to know how many people are using their PCs with the default built-in drivers.

                  1 Reply Last reply
                  0

                  • Login

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