Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 137

problem with multiple qquickwindow for render 2d using qnanopainter [closed]

$
0
0

my project is about rendering some 2d on qml .for this i use qnanopainter that work with qt quick scene graph.qnanopainter is a library in github for painting, instead of qpainter it works with opengl and its Realy easy to use and its good for me who not expert in raw opengl and shaders.

every thing in single window application goes well .

but

my problem is i want to have multiple QQuickwindow that in each of that i want to render some 2d graphical's using qnanopainter that implement on qt quick scene graph.and when i use single window every thing goes well.

but when i prepare second window rendering on main window and second window on qt quick scene graph goes unwell.for example texts (rendered by qnanopainter) show like this : enter image description hereinstead of this : enter image description here

and the rectangles and lines that i draw with qnanopainter render with single green color.

i searched a lot and i'm wondering this is relevant:textso according to the above link i dont know i should use thread for each window for scene graph or not? and i don't know it can solve my problem or not.!

and another thing i think it maybe related to setGraphicsApi for qquickwindow:

 QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);

for main window in main.cpp when i want to load main.qml with engine i use the above code for setting graphics api for scenegraphand i think maybe second qquickwindow that i opened in qml force to setgraphicsapibut i try it and it doesn't help me.


Viewing all articles
Browse latest Browse all 137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>