Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Multiple offscreen QML windows

    QML and Qt Quick
    1
    2
    638
    Loading More Posts
    • 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.
    • R
      RaubTieR last edited by

      [tl;dr]
      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?

      1 Reply Last reply Reply Quote 0
      • R
        RaubTieR last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post