The current ParaView ebuild in Gentoo does not seem to support off-screen rendering using OSMesa. It would be nice to have that. The process of compiling ParaView with OSMesa support is described here: http://www.paraview.org/Wiki/ParaView/ParaView_And_Mesa_3D#Configuring_ParaView_for_use_with_OSMesa The process of compiling Mesa with the appropriate flags is described here: https://blog.kitware.com/messing-with-mesa-for-paraview-5-0vtk-7-0/ Using less explicit flags might also work (VTK 7.0.0 as shipped with ParaView 5.0.0 has an VTK_USE_OFFSCREEN flag): https://github.com/urzds/paraview-docker/blob/master/Dockerfile
For ParaView 5.0 and newer this depends on bug #574070 as the rendering backend now requires OpenGL 3.2.
Let's see. I'll try to get this going with the paraview 5 bump.
If you need any hints, you are welcome to look at these files: https://github.com/urzds/mesa-docker/blob/master/Dockerfile https://github.com/urzds/paraview-docker/blob/5.0.0-osmesa/Dockerfile Be aware that for ParaView 5.0 you need Mesa 11.2, because that contains a new function for OSMesa to get an OpenGL 3 context. See-Also: https://bugs.freedesktop.org/show_bug.cgi?id=93965 More information on how to set this up: https://blog.kitware.com/paraview-5-0-0-available-for-download/ https://blog.kitware.com/kitware-unleashes-brand-new-rendering-backend-in-paraview-5-0/ There is another alternative to OSMesa: Off-screen rendering via an EGL context with hardware acceleration: https://blog.kitware.com/off-screen-rendering-through-the-native-platform-interface-egl/ So there are two mutually exclusive ways to do off-screen rendering: Using OSMesa and using EGL. Thus I would suggest following REQUIRED_USE: off-screen? ( ^^ ( osmesa egl ) ) And only enable off-screen rendering if USE=off-screen. I suggest it this way, because "egl" for most ebuilds means "use EGL instead of GLX to setup the rendering context" and thus be enabled globally by the user, but for ParaView 5.0 it would trigger off-screen rendering. This might be unexpected by the user. Similarly, "osmesa" mostly means "additional, optional support for off-screen rendering", not loosing the regular visual output.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b33b3e60d21c49c0fe9ebb58e607c3a5436a9a1a commit b33b3e60d21c49c0fe9ebb58e607c3a5436a9a1a Author: Matthias Maier <tamiko@gentoo.org> AuthorDate: 2019-04-25 18:14:10 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2019-04-25 22:11:15 +0000 sci-visualization/paraview: add USE=offscreen, reorganize configuration, QA - Add USE=offscreen - Fix QA warnings about unused configuration variables - Reorganize configuration variables - Add Python 3 support Closes: https://bugs.gentoo.org/574072 Closes: https://bugs.gentoo.org/659602 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Matthias Maier <tamiko@gentoo.org> sci-visualization/paraview/metadata.xml | 5 +- .../paraview/paraview-5.6.0-r1.ebuild | 311 +++++++++++++++++++++ 2 files changed, 314 insertions(+), 2 deletions(-)