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. Scenegraph with OpenGL : Unwanted rendering

Scenegraph with OpenGL : Unwanted rendering

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
scengraphvtkopenglqquickwindowsynchronization
6 Posts 2 Posters 801 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.
  • J Offline
    J Offline
    julienchz
    wrote on 23 Nov 2021, 14:00 last edited by julienchz
    #1

    Hello everyone,
    My problem is quite simple. I was inspired by the scenegraph example of Qt with OpenGL to synchronize my 3D viewer made with VTK (GUI thread and QSGRenderthread). This synchronization is done through my QQuickWindow, the problem is that all the updates of a QML element result in a rendering of my 3D Viewer.

        QObject::connect(w, &QQuickWindow::beforeSynchronizing, this, &QQuickVTKRenderItem::sync,
          Qt::DirectConnection);
        QObject::connect(
          w, &QQuickWindow::beforeRendering, this, &QQuickVTKRenderItem::paint, Qt::DirectConnection);
        QObject::connect(w, &QQuickWindow::sceneGraphInvalidated, this, &QQuickVTKRenderItem::cleanup,
          Qt::DirectConnection);
    

    However, for performance concerns, I want to control all the renderings of my viewer. Do you know how to fix this?
    Thanks for your help.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JoeCFD
      wrote on 23 Nov 2021, 14:51 last edited by
      #2

      Is it possible to override the func update of the 3D viewer and do conditional update in this func?

      J 1 Reply Last reply 23 Nov 2021, 15:12
      0
      • J JoeCFD
        23 Nov 2021, 14:51

        Is it possible to override the func update of the 3D viewer and do conditional update in this func?

        J Offline
        J Offline
        julienchz
        wrote on 23 Nov 2021, 15:12 last edited by
        #3

        @JoeCFD update() is a Qt signal so I can't overide it unfortunalety

        J 1 Reply Last reply 23 Nov 2021, 20:16
        0
        • J julienchz
          23 Nov 2021, 15:12

          @JoeCFD update() is a Qt signal so I can't overide it unfortunalety

          J Offline
          J Offline
          JoeCFD
          wrote on 23 Nov 2021, 20:16 last edited by JoeCFD
          #4

          @julienchz
          it is a slot.
          https://doc.qt.io/qt-5/qwidget.html#update

          J 2 Replies Last reply 24 Nov 2021, 08:13
          0
          • J JoeCFD
            23 Nov 2021, 20:16

            @julienchz
            it is a slot.
            https://doc.qt.io/qt-5/qwidget.html#update

            J Offline
            J Offline
            julienchz
            wrote on 24 Nov 2021, 08:13 last edited by
            #5

            @JoeCFD ah yes my bad, I tried to override it it was my first idea but Qt didn't really like it, I should have made a mistake. I'll try again thanks

            1 Reply Last reply
            0
            • J JoeCFD
              23 Nov 2021, 20:16

              @julienchz
              it is a slot.
              https://doc.qt.io/qt-5/qwidget.html#update

              J Offline
              J Offline
              julienchz
              wrote on 29 Nov 2021, 14:20 last edited by
              #6

              @JoeCFD I was working on other stuffs but now I remember why I can't override QQuickItem update() method... it is a non-virtual slot, so it can't solve my rendering issues. I am still looking for a solution ...

              1 Reply Last reply
              0

              5/6

              24 Nov 2021, 08:13

              • Login

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