Force legacy OpenGL when mesa is enabled.
The issue arises when using superbuild (SB) to build binaries with mesa enabled on a system that has GLVND-based OpenGL. Mesa that the SB builds is without glvnd. Thus, it only builds libGL (old ABI) and not libGLX, libOpenGL etc (new GLVND-based ABI). When building on a system with GLVND, ParaView ends up finding and linking directly with the GLVD-based libraries i.e. libGLX, libOpenGL etc. However, when building on non-GLVD based system, ParaView finds and links using old OpenGL ABI i.e. libGL. Thus, in former case the Mesa libGL will never be loaded while in the latter case, it will be loaded correctly if found in search path – the mechanism ParaView has traditionally relied on for the runtime mesa switching.
In summary, we need to fix how the runtime mesa-dispatch is expected to work when using GLVND-based OpenGL interfaces. For 5.7, forcing use of legacy OpenGL interfaces when mesa is enabled (as done in attached patch), should suffice.
Backport: release