Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngine causes problems in custom OpenGL renderer

QWebEngine causes problems in custom OpenGL renderer

Scheduled Pinned Locked Moved Unsolved QtWebEngine
qwebengineopenglwindows
3 Posts 3 Posters 2.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.
  • T Offline
    T Offline
    tamato
    wrote on 8 May 2017, 17:05 last edited by tamato 5 Aug 2017, 17:06
    #1

    Our team is upgrading from qt 5.3 to 5.7, can't do 5.8 just yet.
    We do simulations and occasionally we display web content and were using QtWebKit to do so. While using QtWebKit we were not having any problems between Qt and our in house renderer.

    When we swapped in QWebEngine is when opengl started to throw errors in our rendering code.

    We initialize QWebEngine at the start of the application and everything is fine, but when we try to load a web page we get an opengl error.

    When we load a web page is random, its done through user interaction, it could be seconds after everything is loaded or minutes.

    If our renderer is disabled just before loading a web page and then re-enabled after its loaded, no error's are thrown.
    If we don't disable our renderer and close the web page, errors are thrown.
    And if it is disable, close the page and then re-enable errors are thrown.

    Normally our renderer is threaded, the rendering operations are done on a seperate thread, but for these tests our renderer is moved to the main thread. There is no difference in behavior it is threaded or not.

    The error's we see are,
    In glClientWaitSync we get GL_INVALID_ENUM when trying to delete the sync object
    And in glDrawArrays, no error is given it just halts, if debugging. If not debugging, the app just closes down.

    I have tried using opengl's debug message callback (GL_ARB_debug_output) which is how we see GL_INVALID_ENUM for glClientWaitSync, but the callback is not called when glDrawArrays errors out.

    Steps have been taken to ensure the Opengl version and profile type are then same, 3.2 compatibility, between our renderer and Qt's Globally shared opengl context. This may be different from QWebEngines. The documentation stats that QWebEngine uses opengl 2.x, but I can't confirm this.

    The pixel format may be different, I'm not sure how to get QWebEngines to test if they are the same.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      HojjatJafary
      wrote on 3 Jul 2017, 12:02 last edited by
      #2

      Did you try to put QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); before initializing the webengine?

      1 Reply Last reply
      0
      • W Offline
        W Offline
        WilliamVV
        wrote on 10 Oct 2017, 05:11 last edited by
        #3

        I use QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); It can really screen bugs。but , error too;

        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