Scenegraph with OpenGL : Unwanted rendering
-
wrote on 23 Nov 2021, 14:00 last edited by julienchz
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. -
wrote on 23 Nov 2021, 14:51 last edited by
Is it possible to override the func update of the 3D viewer and do conditional update in this func?
-
Is it possible to override the func update of the 3D viewer and do conditional update in this func?
-
wrote on 23 Nov 2021, 20:16 last edited by JoeCFD
@julienchz
it is a slot.
https://doc.qt.io/qt-5/qwidget.html#update -
@julienchz
it is a slot.
https://doc.qt.io/qt-5/qwidget.html#update -
@julienchz
it is a slot.
https://doc.qt.io/qt-5/qwidget.html#update
4/6