Skip to content
Snippets Groups Projects
Commit 04661f4b authored by Jaswant Panchumarti (Kitware)'s avatar Jaswant Panchumarti (Kitware)
Browse files

Enable runtime detection of GLX, EGL and OSMesa for OpenGL context

- closes #18547
- closes #19383
- Use glad instead of glew for loading GL extension functions
because GLEW has trouble using GLX and EGL in the same build.
- Replaces the VTK::glew module with VTK::glad.
- Removed the utility VTK::opengl module because it is unnecessary
after the changes made to vtkOpenGLOptions.cmake
- OpenGL is now loaded at runtime in desktop platforms.
- For mobile and webassembly, when VTK_OPENGL_USE_GLES is ON,
glad finds and links to the OpenGL::GLES3 library.
- Support for OSMesa is always available from VTK. Users must make
sure the libOSMesa.so or osmesa.dll is installed.
- Support for EGL is always available from VTK in Linux and Android.
Users must make sure libEGL is installed.
- On platforms where multiple render window backends are possible, the
vtkOpenGLRenderWindow is made the default factory override and it's
New method implements runtime tests to determine what render windows
can work. It basically constructs the platform implementation render
window, attempts to initialize it and checks whether it was
successfully intialized.
- The X OpenGL render window class was updated to not call abort.
It also print warnings instead of errors when it fails to open X
display. This allows us to safely test support for GLX at runtime.
- The new environment variable VTK_DEFAULT_OPENGL_WINDOW
can optionally be used to force a render window subclass
at runtime. It is useful to debug support for a fallback render
window on different system configuration.
- Remove usage of unnecessary CMake flag VTK_OPENGL_HAS_MESA.
- Since there is no compile time depedency for OSMesa in VTK,
this commit makes VTK act as if it can always use OSMesa,
obviously when the system executing VTK code has osmesa installed.
- ci scripts will be adjusted in next commits
parent 1659b640
No related branches found
No related tags found
No related merge requests found
Showing
with 150 additions and 84 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment