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. how to provide multiple render threads for scene graph for more than one QQuickWindow instances on-screen ?
Forum Updated to NodeBB v4.3 + New Features

how to provide multiple render threads for scene graph for more than one QQuickWindow instances on-screen ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 1.2k Views 1 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.
  • M Offline
    M Offline
    mohammad sina msh
    wrote on last edited by
    #1

    i wanted to have more than on qquickwindow with scene graph and according to this link : https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph.html#what-if-there-is-no-or-more-than-one-window-visible

    i think i should prepare multiple render threads for handle this..
    how can i prepare multiple render thread for multiple qquickwindow with scenegraph?

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      According to the source code in Qt 5.15.2 and 6.6.1, the threaded scene graph renderer automatically allocates 1 thread per window. There's no additional configuration necessary.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      M 3 Replies Last reply
      1
      • jeremy_kJ jeremy_k

        According to the source code in Qt 5.15.2 and 6.6.1, the threaded scene graph renderer automatically allocates 1 thread per window. There's no additional configuration necessary.

        M Offline
        M Offline
        mohammad sina msh
        wrote on last edited by
        #3

        @jeremy_k hi and thanks for your comment.
        but when i use a qquickwindow every thing goes well and i set graphics api in that window in main.cpp with this code :

         QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
        

        and when i remove this code from main c++ it couldnt render any more.

        so i think my problem is related to this setGraphicsApi

        because in my problem when i open another qquickwindow inside the main window on qml with a scence graph,
        the new window and the main window couldnt render well
        and text that loaded with opengl could'nt render well and rectangle that i draw render with a single color green color.
        and its not any more like that thing that i drawed.
        i cant show you by 2 screenshot from my app first is when i open my app by just one window and second is my app when i opened second window scenegraph:
        Screen Shot 2024-01-30 at 2.17.59 AM.png
        you can see texts are ok and render rectangles and lines is ok.
        but in second screen shout every thing are not ok:
        Screen Shot 2024-01-30 at 2.20.09 AM.png
        some time main window render well some time not well .and second window every time couldn't render .
        and this second window should render just like main window

        1 Reply Last reply
        0
        • jeremy_kJ jeremy_k

          According to the source code in Qt 5.15.2 and 6.6.1, the threaded scene graph renderer automatically allocates 1 thread per window. There's no additional configuration necessary.

          M Offline
          M Offline
          mohammad sina msh
          wrote on last edited by
          #4

          @jeremy_k
          and this is screenshot of when mainwindow and second window all of that couln't render well:
          Screen Shot 2024-01-30 at 2.05.31 AM.png

          1 Reply Last reply
          0
          • jeremy_kJ jeremy_k

            According to the source code in Qt 5.15.2 and 6.6.1, the threaded scene graph renderer automatically allocates 1 thread per window. There's no additional configuration necessary.

            M Offline
            M Offline
            mohammad sina msh
            wrote on last edited by
            #5

            @jeremy_k hello could you help me?

            jeremy_kJ 1 Reply Last reply
            0
            • M mohammad sina msh

              @jeremy_k hello could you help me?

              jeremy_kJ Offline
              jeremy_kJ Offline
              jeremy_k
              wrote on last edited by
              #6

              That looks like a graphics driver/interface usage problem rather than a lack of rendering threads. The software renderer might be a viable option. An upgrade or downgrade of Qt or the driver might fix it.

              Asking a question about code? http://eel.is/iso-c++/testcase/

              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