Skip to content

Compile ParaView with EGL support on Ubuntu 14.04

Alexandre Ancel edited this page Feb 15, 2016 · 4 revisions

(Rough notes ahead)

  • Download & install recent NVidia drivers (At least 355, for GLdispatch support; the current configuration was tested with: 358.16): https://help.ubuntu.com/community/NvidiaManual

  • Ensure that the drivers are correctly installed, you should have:

    • libGL.so.
    • libEGL_nvidia.so (or similar)
    • libGLdispatch.so.0
  • You can check the features of your graphic card with nvidia-smi. If you are using a K80 and GPU Compute mode is marked as N/A, you should however be able to use OpenGL with the K80. As this link explains, OpenGL is enabled on K40 and K80.

  • Get and install the EGL includes: (from https://www.khronos.org/registry/egl/)

# In <egl_install_dir>/include/EGL, put:
wget https://www.khronos.org/registry/egl/api/EGL/egl.h
wget https://www.khronos.org/registry/egl/api/EGL/eglext.h
wget https://www.khronos.org/registry/egl/api/EGL/eglplatform.h
# In <egl_install_dir>/include/KHR, put:
wget https://www.khronos.org/registry/egl/api/KHR/khrplatform.h
  • ParaView configuration:
# Explanation line
cmake .. \
# Disable testing and enable Catalyst, Python and MPI (Not needed for EGL)
-DBUILD_TESTING=OFF -DPARAVIEW_ENABLE_CATALYST=ON -DPARAVIEW_ENABLE_PYTHON=ON \
-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DPARAVIEW_USE_MPI=ON \
# Required EGL: Enable OpenGL2 backend, use offscreen EGL for VTK
-DVTK_RENDERING_BACKEND=OpenGL2 -DVTK_USE_OFFSCREEN_EGL=ON \
# Need to disable other backends like X, 
# We must not build ParaView UI as we want offscren 
# + You would end up with X errors during the build, like XCreateWindow ...
-DVTK_USE_X=OFF -DPARAVIEW_BUILD_QT_GUI=OFF \
# Manually specify GLdispatch library, no .so in nvidia drivers
-DEGL_gldispatch_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 \
# Manually specify EGL includes, with the previously described layout 
-DEGL_INCLUDE_DIR:PATH=/data/software/install/EGL/include \
# Install in this directory (change it)
-DCMAKE_INSTALL_PREFIX=/data/software/install/ParaView/5.0.0.egl/gcc-4.9.0/openmpi-1.10.0

# Clean copy/paste line
cmake .. \
-DBUILD_TESTING=OFF -DPARAVIEW_ENABLE_CATALYST=ON -DPARAVIEW_ENABLE_PYTHON=ON \
-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DPARAVIEW_USE_MPI=ON \
-DVTK_RENDERING_BACKEND=OpenGL2 -DVTK_USE_OFFSCREEN_EGL=ON \
-DVTK_USE_X=OFF -DPARAVIEW_BUILD_QT_GUI=OFF \
-DEGL_gldispatch_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 \
-DEGL_INCLUDE_DIR:PATH=/data/software/install/EGL/include \
-DCMAKE_INSTALL_PREFIX=/data/software/install/ParaView/5.0.0.egl/gcc-4.9.0/openmpi-1.10.0
  • Prepare the environment: make sure that no DISPLAY variable is set, either by an X server or ssh (-X or -Y):
unset DISPLAY
  • Launch the pvserver for remote rendering (As of now, the --disable-xdisplay-test seems to be needed for remote rendering to work):
pvserver --disable-xdisplay-test
  • Connect your local ParaView instance to the pvserver

  • Make sure remote rendering is enabled: Go into ParaView -> About ParaView -> Connection information and check that the OpenGL renderer corresponds to the graphics card on the server.

Kitware links: