Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML and OpenGL conflicts
Forum Updated to NodeBB v4.3 + New Features

QML and OpenGL conflicts

Scheduled Pinned Locked Moved QML and Qt Quick
opengl
3 Posts 2 Posters 1.3k Views 2 Watching
  • 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.
  • Z Offline
    Z Offline
    Zylann
    wrote on 4 Jun 2015, 09:09 last edited by Zylann 6 Apr 2015, 09:15
    #1

    Hello,

    I'm currently integrating an application using OpenGL in a Qt GUI where QML is mainly used. We may need one or even more OpenGL views rendered by our application.
    But as soon as something Qt is shown, the application's rendering glitches and sometimes crash, even if the Qt stuff is in a separate window.

    We investigated the problem and found that both renderings were happening in the same thread, and Qt was stealing the OpenGL context we setup in our application (with a makeCurrent() I guess), creating random conflicts.

    At first I thought that having a threaded Qt rendering could easily solve the problem.
    I saw that QtQuickWidget's rendering wasn't threaded, so I tried to use a QtQuickView instead... with no luck.

    This is a blocking problem for our project, and I would like to know if there is a way to enable threaded rendering in QML, to prevent such conflict?

    Platform: Windows

    P 1 Reply Last reply 4 Jun 2015, 09:42
    0
    • Z Zylann
      4 Jun 2015, 09:09

      Hello,

      I'm currently integrating an application using OpenGL in a Qt GUI where QML is mainly used. We may need one or even more OpenGL views rendered by our application.
      But as soon as something Qt is shown, the application's rendering glitches and sometimes crash, even if the Qt stuff is in a separate window.

      We investigated the problem and found that both renderings were happening in the same thread, and Qt was stealing the OpenGL context we setup in our application (with a makeCurrent() I guess), creating random conflicts.

      At first I thought that having a threaded Qt rendering could easily solve the problem.
      I saw that QtQuickWidget's rendering wasn't threaded, so I tried to use a QtQuickView instead... with no luck.

      This is a blocking problem for our project, and I would like to know if there is a way to enable threaded rendering in QML, to prevent such conflict?

      Platform: Windows

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 4 Jun 2015, 09:42 last edited by
      #2

      Hi @Zylann,
      I would suggest you to ask this question on qt interest mailing list. The Qt engineers could provide a good answer to it.

      157

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        Zylann
        wrote on 5 Jun 2015, 16:01 last edited by Zylann 6 May 2015, 16:02
        #3

        Asked...

        Apparently QtQuickView is not threaded by default, and the only way I've been told to achieve this is with a non-cross-platform way, by setting a Windows environment variable QSG_RENDER_LOOP with value "threaded".
        However, it doesn't seems to work, and the way it's enabled is not quite as I expected.

        Ideally, we would like the GUI not being responsible for conflicts or lags, and vice versa...

        1 Reply Last reply
        0

        1/3

        4 Jun 2015, 09:09

        • Login

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