This line fails to build on MSVC: https://github.com/Slicer/VTK/blob/08161371c282cd7eb8ce3058882e6ffa846fac67/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx#L1083 Changing it to `#ifdef VTK_REPORT_OPENGL_ERRORS` seems to fix the issue. The problem is already fixed in VTK master.