Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Unsolved How to force OpenGL (instead of OpenGL ES) on QQuickView + QTWebEngine?

    General and Desktop
    3
    6
    944
    Loading More Posts
    • 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
      wojtekz last edited by

      I'm working on a kiosk system that has a full blown desktop GPU. I'm using QtWebEngine 1.5 on QtQuick 2.0

      It turns out that my web engine reports that it uses OpenGL ES 3.0 instead of OpenGl 3.0. Due to this fact there's no out of the box antialiasing and the performance is poor (I believe some operations normally supported by opengl are moved to the CPU which is weak on this box).

      I've already set the QT_LOGGING_RULES to confirm that OpenGL 3.0 is available but somehow opengl es is used by either qquick or qt web engine. What I've tried so far: qputenv("QT_OPENGL", "desktop"); and app.setAttribute(Qt::AA_UseDesktopOpenGL);

      Is there any way of explicitly telling QQuickView (or maybe qt web engine?) to use desktop implementation of OpenGL?

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        Compile Qt with -opengl desktop config flag.

        (Z(:^

        F 1 Reply Last reply Reply Quote 2
        • W
          wojtekz last edited by

          Thanks for the response.

          It looks like QWebEngine explicitly passes the argument --use-gl=egl to QWebKit.

          How do I remove that default argument?

          1 Reply Last reply Reply Quote 0
          • F
            fazibear @sierdzio last edited by

            @sierdzio I've added

            QMAKE_CXXFLAGS += -opengl=desktop
            

            To pro file but with no luck. Got such an error:

            /var/jenkins_home/._nerves/artifacts/nerves_system_rzjb-portable-1.0.0/host/bin/x86_64-unknown-linux-gnu-g++ -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/var/jenkins_home/._nerves/artifacts/nerves_system_rzjb-portable-1.0.0/host/x86_64-buildroot-linux-gnu/sysroot -opengl=desktop -O2 -O3 -Wall -W -dM -E -o _build/qt/moc_predefs.h ../../../../._nerves/artifacts/nerves_system_rzjb-portable-1.0.0/host/mkspecs/features/data/dummy.cpp
            cc1plus: error: output filename specified twice
            
            1 Reply Last reply Reply Quote 0
            • sierdzio
              sierdzio Moderators last edited by

              That's wrong place to add it.

              You need to compile Qt (not your app) and pass -opengl desktop to configure script. Then once Qt is built, you'd need to compile your app normally (no extra flags necessary) using that Qt version.

              (Z(:^

              1 Reply Last reply Reply Quote 0
              • W
                wojtekz last edited by

                Thanks @sierdzio!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post