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
QtWS25 Last Chance

Scenegraph with OpenGL : Unwanted rendering

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
scengraphvtkopenglqquickwindowsynchronization
6 Posts 2 Posters 798 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 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
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on 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
      0
      • JoeCFDJ JoeCFD

        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 last edited by
        #3

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

        JoeCFDJ 1 Reply Last reply
        0
        • J julienchz

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

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

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

          J 2 Replies Last reply
          0
          • JoeCFDJ JoeCFD

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

            J Offline
            J Offline
            julienchz
            wrote on 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
            • JoeCFDJ JoeCFD

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

              J Offline
              J Offline
              julienchz
              wrote on 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

              • Login

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