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. Multiple offscreen QML windows
Forum Updated to NodeBB v4.3 + New Features

Multiple offscreen QML windows

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 876 Views
  • 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 Offline
    R Offline
    RaubTieR
    wrote on last edited by
    #1

    [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
    0
    • R Offline
      R Offline
      RaubTieR
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved