Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. OpenGL ES 3.0 with Qt Quick on Android
QtWS25 Last Chance

OpenGL ES 3.0 with Qt Quick on Android

Scheduled Pinned Locked Moved Mobile and Embedded
opengl es 3.0qt quickandroid
6 Posts 2 Posters 4.6k 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.
  • J Offline
    J Offline
    Jeanne-Kamikaze
    wrote on 10 Aug 2015, 20:39 last edited by
    #1

    Hi,

    Is it possible to use OpenGL ES 3.0 on Android using Qt Quick? I am running the "OpenGL under QML" example application [1] on an android device, and would like to extend the example using GLES30 functionality. However, the project pro/makefile generates an android manifest that asks the device for a 2.0 context, and I don't seem to find a way to change that. The makefile re-generates the manifest on every build, so editing the manifest does not seem to be the proper way to change the opengl context version. The manifest also targets an api level lower than 18, which is the minimum required for 3.0, so I should also change that as well.

    Is OpenGL ES 3.0 even supported using Qt Quick on Android? Is there any documentation explaining how to set up such an environment?

    Thanks.

    [1] http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DanWatkins
      wrote on 10 Aug 2015, 22:02 last edited by
      #2

      It is possible to use OpenGL ES up to version 3.1 along with functions from the AEP. I don't believe there is much official documentation, but I asked a similar question on the interest mailing list here. You may find my little sample project on GitHub to be of some help. It is incomplete, but you may get somewhere with it. Another interesting resource is this GitHub project.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jeanne-Kamikaze
        wrote on 11 Aug 2015, 08:11 last edited by
        #3

        Thanks for the links and the fast reply.

        What I don't see is how you access GLES3 functions. The header file <GLES3/gl31.h> does not exist on my end, even though I have Qt 5.5 and latest android sdk/ndk. In your code I see you include <QtGui/QOpenGLFunctions>, but inspection of that file and the files it includes reveals there is no 3.x logic as of Qt 5.5. The other project by TReed has a bunch of header files where they seem to declare the functions manually, but I don't see how it defines the enums or if all of this is even necessary. How exactly are you accessing 3.x functions and enums?

        Thanks.

        D 1 Reply Last reply 12 Aug 2015, 02:51
        0
        • J Jeanne-Kamikaze
          11 Aug 2015, 08:11

          Thanks for the links and the fast reply.

          What I don't see is how you access GLES3 functions. The header file <GLES3/gl31.h> does not exist on my end, even though I have Qt 5.5 and latest android sdk/ndk. In your code I see you include <QtGui/QOpenGLFunctions>, but inspection of that file and the files it includes reveals there is no 3.x logic as of Qt 5.5. The other project by TReed has a bunch of header files where they seem to declare the functions manually, but I don't see how it defines the enums or if all of this is even necessary. How exactly are you accessing 3.x functions and enums?

          Thanks.

          D Offline
          D Offline
          DanWatkins
          wrote on 12 Aug 2015, 02:51 last edited by
          #4

          @Jeanne-Kamikaze It seems my project is more incomplete than I originally thought. At one point I had everything building on Android by including the gl31.h header file. That code has been lost somehow, so I'm not sure how to accomplish it anymore. You can try downloading the Khronos GLES3 header files from here and then including them manually. Then the problem is linking, which unfortunately I'm not sure how to solve.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jeanne-Kamikaze
            wrote on 12 Aug 2015, 09:11 last edited by
            #5

            I see. I'll see if I can use those header files. The problem I have with Qt is that apparently it makes me inherit from QOpenGLFunctions to be able to call opengl. I don't even know who thought that would be a remotely good idea, but it basically forces me to either put all the rendering code in one class, or to put it into multiple classes all inheriting from QOpenGLFunctions, both solutions of which make my code absolutely ugly and no longer portable.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DanWatkins
              wrote on 12 Aug 2015, 20:54 last edited by
              #6

              Well good news: It appears GLES 3.1 will have some main stream support in Qt 5.6.

              1 Reply Last reply
              0

              3/6

              11 Aug 2015, 08:11

              • Login

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