how to provide multiple render threads for scene graph for more than one QQuickWindow instances on-screen ?
-
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? -
@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:
you can see texts are ok and render rectangles and lines is ok.
but in second screen shout every thing are not ok:
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 -
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.