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. QQuickFramebufferObject with external OpenGL in Qt6
Forum Updated to NodeBB v4.3 + New Features

QQuickFramebufferObject with external OpenGL in Qt6

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qt6fboopengl
6 Posts 5 Posters 1.5k Views 1 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.
  • M Offline
    M Offline
    mnesarco
    wrote on last edited by
    #1

    Hi Friends,
    It looks like QQuickFramebufferObject is broken in Qt6. I have followed the changes required in documentation with no success. I have a working OCCT OpenGL viewer as a Quick Item in Qt 5.15.2 based on QQuickFramebufferObject. To port it to Qt6 I have tried:

        QCoreApplication::setAttribute (Qt::AA_UseDesktopOpenGL);    
        QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
        QQuickWindow::setSceneGraphBackend("opengl");
    

    I have removed window()->setClearBeforeRendering(false); from the Item as this method was removed in Qt6.

    I have removed window()->resetOpenGLState(); from the render as this method was removed in Qt6.

    All methods of the Renderer are correctly called, but nothing is rendered on the Qml Scene.

    Any help will be appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Which release are you testing your port with ?
      On which OS ?

      Can you provide a minimal compilable example that shows your issue ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Which release are you testing your port with ?
        On which OS ?

        Can you provide a minimal compilable example that shows your issue ?

        M Offline
        M Offline
        mnesarco
        wrote on last edited by
        #3

        Hi @SGaist ,
        Thank you. My current unreleased app uses Qt5.15.2, on Linux 64bits. I am trying to port it to Qt6 in advance, so i will not start with an already legacy Qt version. The current app uses QQuickFramebufferObject to embed an OpenCascade View in Qml, it works well with Qt5.15.2 but I failed to port it to Qt6. As a workaround I ditched the QQuickFramebufferObject and now i am using the classical beforeRendering/beforeRenderPassRecording on a QQuickItem derived class and it works.

        B 1 Reply Last reply
        0
        • GrecKoG Offline
          GrecKoG Offline
          GrecKo
          Qt Champions 2018
          wrote on last edited by
          #4

          Hi this might be due to the new Qt RHI, an abstraction over OpenGL, Vulkan, Metal, DirectX (might have forgotten some or mentioned some that shouldn't be).

          Qt Quick will no longer be speaking directly to OpenGL but there will be an abstraction on top of it to ensure compatility with other graphical stacks.

          You will get more info about this by googling around or watching this webinar : https://www.youtube.com/watch?v=eInD6H4XrpM

          Tom assoT 1 Reply Last reply
          0
          • GrecKoG GrecKo

            Hi this might be due to the new Qt RHI, an abstraction over OpenGL, Vulkan, Metal, DirectX (might have forgotten some or mentioned some that shouldn't be).

            Qt Quick will no longer be speaking directly to OpenGL but there will be an abstraction on top of it to ensure compatility with other graphical stacks.

            You will get more info about this by googling around or watching this webinar : https://www.youtube.com/watch?v=eInD6H4XrpM

            Tom assoT Offline
            Tom assoT Offline
            Tom asso
            wrote on last edited by Tom asso
            #5

            @GrecKo , @SGaist , @mnesarco - Has the OP's issue with QQuickFrameBufferObject (nothing rendered) been resolved in Qt 6? I've migrated to 6.7.2 and my QQuickFrameBufferObject-based application now segfaults somewhere in the Qt libraries. I realize that QQuickFrameBufferObject is now considered a 'legacy' class and works only with OpenGL, but if possible I'd like to track down the segfault and move on, deferring use of RHI to another day.
            Thanks!

            1 Reply Last reply
            0
            • M mnesarco

              Hi @SGaist ,
              Thank you. My current unreleased app uses Qt5.15.2, on Linux 64bits. I am trying to port it to Qt6 in advance, so i will not start with an already legacy Qt version. The current app uses QQuickFramebufferObject to embed an OpenCascade View in Qml, it works well with Qt5.15.2 but I failed to port it to Qt6. As a workaround I ditched the QQuickFramebufferObject and now i am using the classical beforeRendering/beforeRenderPassRecording on a QQuickItem derived class and it works.

              B Offline
              B Offline
              Berkdan
              wrote on last edited by
              #6

              @mnesarco could you please be kind to share how you have made it running since there is not much information on the web. I am suffering witth the same issue.

              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