Multiple offscreen QML windows
Instance#1 creates texture "4", instance#2 creates texture "5". Now texture "4" shows instance#2 and texture "5"
is empty. Any halps?
I've managed to draw 1 offscreen window successfully, using QQuickRenderControl. It spawns a new framebuffer and I can use its texture. However when I instantiate the second offscreen, weird thing happens... It also spawns framebuffer with different texture, but the texture is empty, never filled. And what is even more surprising, that now I can see the 2nd scene on the 1st texture.
Clearly something went wrong. I tried logging the instances and seem to have all of them correctly allocated and rendered, but I ended up with this collision. The full source is on github, where "qml-renderer" creates GL context and surface and "qml-window" is an offscreen instance (and I instantiate 2 of such).
I have 1 GL context and use 1 surface (used to be 2, makes no difference). Then 2 RenderControls, 2 QuickWindows, 2 QmlEngines - all are created separately. Could anyone suggest where might be an error?
Okay, disregard that. I found the error in my code. I just stored the pointers in a wrong way and ended up with this. So there was no qml-related problems.