I didn’t forget to add this before QApplication : QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
I compiled the application under 3 different systems (Windows 8, KUbuntu and Centos 7) with different GPUs and the result is always the same (glitchs or the map tiles are not displayed).
Setting surface format is just part of the story. Qt/VTK application initialization steps are very delicate - you need to perform all the steps and in the correct order. I would recommend to copy the steps from large projects, such as Paraview, because several developers worked very hard on getting those right and they are tested by thousands of users on various platforms.
I did, but I still have glitches ! Do you know which version of VTK ParaView 5.4.1 is based ? I didn’t find that info. I want to build that VTK version and try with vtkMap, because when I’m using the VTK classes from ParaView 5.4.1 libraries I don’t have glitches in vtkMap.
With the same code (weather stations Qt example from vtkMap) :
With VTK 8.0.0.rc1-54-ga9b1325 (the one used in ParaView 5.4.1), there’s no glitches :
With VTK 8.2.0 (I initialized the QSurface properly)
With the latest VTK from master (using QVTKOpenGLStereoWidget and QVTKRenderWindowAdapter::defaultFormat to initialize the QSurfaceFormat’s default format)
I managed to have this result by playing with the camera (possible with 8.2.0 too)
but this is the first result :
Otherwise, without using Qt (X11 window ?), there’s no glitches with all the versions.