Cleanup offscreen rendering support in VTK.
This commit cleans up offscreen rendering support in VTK. This includes several changes. 1. It makes EGL support independent of onscreen GL support. It's now possible to enable EGL and GLX in same build of VTK, for example, so long as the two use shared GL-dispatch mechanism. Previously, EGL could not be enabled together with GLX (i.e. `VTK_USE_X` set to ON). These changes allow for that configuration. 2. `VTK_USE_OFFSCREEN_EGL` is replaced by `VTK_OPENGL_HAS_EGL`. This is consistent with `VTK_OPENGL_HAS_OSMESA` flag. And also in similar vein to changes to `FindOpenGL.cmake` where EGL becomes a component of `find_package(OpenGL)`. 3. `VTK_EGL_DEVICE_INDEX` has been replaced by `VTK_DEFAULT_EGL_DEVICE_INDEX` since it only affect the default value, and doesn't preclude users from manually specifying the device index. 4. `VTK_USE_OFFSCREEN` has been replaced by `VTK_DEFAULT_RENDER_WINDOW_OFFSCREEN`, since similar to `3` ...
Showing with 269 additions and 226 deletions