Building ParaView 5.10.1 with onscreen and offscreen support

Hi,

I am trying to build ParaView 5.10.1 from source with support for both onscreen and offscreen rendering. I used the ParaView and Offscreen Rendering page as a reference. I have a Debian 10 system.

To build ParaView, I use the following CMake settings

cmake -GNinja <paraview-source-directory>             \
    -DPARAVIEW_USE_PYTHON=ON                          \
    -DPARAVIEW_USE_MPI=OFF                            \
    -DPARAVIEW_USE_CUDA=OFF                           \
    -DPARAVIEW_USE_QT=ON                              \
    -DVTK_USE_X=ON                                    \
    -DOPENGL_INCLUDE_DIR=<opengl-include-dir>         \
    -DOPENGL_gl_LIBRARY=<opengl-library>              \
    -DVTK_OPENGL_HAS_EGL=ON                           \
    -DOPENGL_EGL_opengl_LIBRARY=<egl-opengl-library>  \
    -DVTK_SMP_IMPLEMENTATION_TYPE=OPENMP              \
    -DCMAKE_BUILD_TYPE=Release

I use VTK_USE_X=ON to support onscreen rendering (for the desktop Qt client) and OPENGL_HAS_EGL=ON to support (headless) offscreen rendering (connecting to pvserver from a different machine). If I use remote visualization (using pvserver), I do not encounter any issues. However, using paraview (on the machine I built it on) gives an error stating

GLEW could not be initialized: Missing GL version

When I change the value of VTK_OPENGL_HAS_EGL to OFF, paraview no longer gives this error and is working as expected. However, as soon as I try to use remote visualization (pvserver), I get the following warning

Display is not accessible on the server side.
Remote rendering will be disabled.

It thus seems as if VTK_OPENGL_HAS_EGL=ON causes the GLEW error, as turning it off fixes the issue with paraview. However, when it is off, remote rendering using pvserver is no longer supported.

In both cases, the CMake variables related to OpenGL point to the proper system libraries.

I would like to build ParaView such that paraview does not give the error related to GLEW and that pvserver supports remote rendering. Any suggestions are welcome.

Despite what this wiki page claims, this is not supported because of this:

https://gitlab.kitware.com/vtk/vtk/-/issues/18547

1 Like