Scenegraph with OpenGL : Unwanted rendering
Unsolved
QML and Qt Quick
-
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. -
@julienchz
it is a slot.
https://doc.qt.io/qt-5/qwidget.html#update