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. How to grabs the contents of and item with QQuickRenderControl?
Qt 6.11 is out! See what's new in the release blog

How to grabs the contents of and item with QQuickRenderControl?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 1.2k Views 2 Watching
  • 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.
  • L Offline
    L Offline
    lqsa
    wrote on last edited by lqsa
    #1

    On QQuickRenderControl help, [http://doc.qt.io/qt-5/qquickrendercontrol.html#details](link url), says:

    "QQuickWindow and QQuickView and their associated internal render loops render the Qt Quick scene onto a native window. In some cases, for example when integrating with 3rd party OpenGL renderers, it might be beneficial to get the scene into a texture that can then be used in arbitrary ways by the external rendering engine. QQuickRenderControl makes this possible in a hardware accelerated manner, unlike the performance-wise limited alternative of using QQuickWindow::grabWindow()"

    How to use QQuickRenderControl to do the same functionallity than QQuickWindow::grabWindow()? And, is it possible to do it only with a QQuickItem?

    ? 1 Reply Last reply
    0
    • L lqsa

      On QQuickRenderControl help, [http://doc.qt.io/qt-5/qquickrendercontrol.html#details](link url), says:

      "QQuickWindow and QQuickView and their associated internal render loops render the Qt Quick scene onto a native window. In some cases, for example when integrating with 3rd party OpenGL renderers, it might be beneficial to get the scene into a texture that can then be used in arbitrary ways by the external rendering engine. QQuickRenderControl makes this possible in a hardware accelerated manner, unlike the performance-wise limited alternative of using QQuickWindow::grabWindow()"

      How to use QQuickRenderControl to do the same functionallity than QQuickWindow::grabWindow()? And, is it possible to do it only with a QQuickItem?

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! There is an example on how to use QQuickRenderControl, see here.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lqsa
        wrote on last edited by
        #3

        Hi!

        I've already seen this example, but it's very complex and seems that it isn't like a grabWindow. It seems that is an example for draw in the scene, but, how can I grab the scene content in a QImage like grabWindow?

        ? 1 Reply Last reply
        0
        • L lqsa

          Hi!

          I've already seen this example, but it's very complex and seems that it isn't like a grabWindow. It seems that is an example for draw in the scene, but, how can I grab the scene content in a QImage like grabWindow?

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #4

          QQuickRenderControl makes it possible to render into a FBO, so the image stays in the GPU. You can then reuse the image in other GPU operations. That makes it fast. grabWindow copies the image from the GPU's RAM to the systems RAM, so you can process the image with the CPU. Uploading it to the GPU again for reuse would make it slow.

          In simple words: If you want to have a QImage, then use grabWindow. If you want to have the image inside a FBO, use QQuickRenderControl and friends.

          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