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. How to force OpenGL (instead of OpenGL ES) on QQuickView + QTWebEngine?

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 2.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.
  • W Offline
    W Offline
    wojtekz
    wrote on last edited by
    #1

    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
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Compile Qt with -opengl desktop config flag.

      (Z(:^

      F 1 Reply Last reply
      2
      • W Offline
        W Offline
        wojtekz
        wrote on last edited by
        #3

        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
        0
        • sierdzioS sierdzio

          Compile Qt with -opengl desktop config flag.

          F Offline
          F Offline
          fazibear
          wrote on last edited by
          #4

          @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
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            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
            0
            • W Offline
              W Offline
              wojtekz
              wrote on last edited by
              #6

              Thanks @sierdzio!

              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