vtkPropPicker not working with QQuickVTKRenderWindow
Actors cannot be selected using vtkPropPicker
when used in a QtQuick/QML application. vtk_prop_picker.zip the attached example is my QtQuick adaption of this example HighlightPickedActor. I use Qt 5.12, VTK 9.1 (current master) on Ubuntu 20.04.
I could backtrace the problem to vtkHardwareSelector
which does not find any actors in https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/Core/vtkRenderer.cxx#L1922. The problem seems to be that the call in https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/Core/vtkHardwareSelector.cxx#L316 only causes vtkGenericOpenGLRenderWindow::Render
to be executed and is not forwarded all the way to vtkHardwareSelector::Render
. This is because in vtkGenericOpenGLRenderWindow::Render
ReadyForRendering==false
which was set here https://gitlab.kitware.com/vtk/vtk/-/blob/master/GUISupport/QtQuick/QQuickVTKRenderWindow.cxx#L195. If I comment out this->m_renderWindow->SetReadyForRendering(false);
picking actors works as expected.