Error: no override is found for 'vtkPolyDataMapper'

I have built vtk-8.2.0, and have compiled a simple test program, cylinder.cxx.
When I run it, a window pops up for a couple of seconds, with this message (which I managed to capture on my phone with some difficulty):

Generic Warning: In C:\VTK\VTK 8.2.0\VTK 8.2.0\Rendering\Core\vtkPolyDataMapper.cxx, line 28
Error: no override found for ‘vtkPolyDataMapper’

I don’t know if this error is the reason, but the program doesn’t run - nothing is displayed except this popup.

In order to render, the program must link vtkRenderingOpenGL2. I’m pretty sure that this library is included in the CMakeLists.txt of the official cylinder.cxx example.

In fact, if I’m not mistaken, when building VTK 8 it was possible to configure which rendering backend to use:

VTK_RENDERING_BACKEND:STRING=OpenGL
VTK_RENDERING_BACKEND:STRING=OpenGL2

Since the OpenGL2 backend is that one that requires OpenGL 3.2 or later, this might have been the cause of your difficulties with Qt.

Hello,

During my time with VTK8 and Qt, I indeed had always to enable the OpenGL2 backend. The other didn’t work for me.

regards,

PC