Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41191

Impossible to share resources between QOpenGL/QuickWidgets in different TLWs



    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.4.0 Alpha
    • Fix Version/s: 5.4.0 Beta
    • Component/s: GUI: OpenGL
    • Labels:


      There has to be a way to share resources like textures between the contexts used by QOpenGLWidget or QQuickWidget instances that belong to different top-level windows.

      Right now the TLWs' contexts share with the internal global share context of the WebEngine fame. This is of course null when WebEngine is not in use. Therefore the TLWs' contexts do not share with each other.

      Figure out a way to enable sharing between two QOpenGLWidgets that belong to different TLWs. This was possible with QGLWidget (since the user was in ocntrol of setting up sharing) and is required by desktop app that use multiple windows with OpenGL rendering in them.

      Suggestion: Introduce an application attribute to trigger global sharing. This is anyway the case when using WebEngine, so this opt-in flag just extends it to apps that do not use WebEngine. When the attribute is set, QGuiApplication creates a dummy context and stores it in QOpenGLContextPrivate (like the WebEngine init stuff would do). (when WebEngine is used, the context provided by it takes precedence)

      This would also introduce a major convenience factor compared to the QGLWidget: Apps only need to set an app attribute instead of creating extra dummy contexts and pass around "share widgets" just to f.ex. get sharing for 3 windows.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            lagocs Laszlo Agocs
            lagocs Laszlo Agocs
            0 Vote for this issue
            1 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes