OSMesa: Difference between revisions

From Octave
Jump to navigation Jump to search
(→‎known problems: link to Ubuntu LTS installation problem)
Line 54: Line 54:
* {{bug|44979}} Clumsy/missing configure check
* {{bug|44979}} Clumsy/missing configure check
* {{bug|44338}} Doesn't work on Windows (MXE build)
* {{bug|44338}} Doesn't work on Windows (MXE build)
* [https://bugs.launchpad.net/bugs/1424059 LP #1424059] libosmesa6 is not installable on Ubuntu 14.04 with HWE updates

Revision as of 09:17, 22 September 2015

OSMesa is used since Octave 4.0 for offscreen rendering from OpenGL toolkits FLTK and Qt.

This enables printing without a X display, for example when ssh'ing to a remote machine, or if the figure is invisible (#33180).


libOSMesa

The minimum required version of OSMesa for Octave is 9.0.0. Versions < 9.0 show a strange bug where the return values of

 glGetIntegerv (GL_DEPTH_BITS, &z);
 glGetIntegerv (GL_STENCIL_BITS, &s);
 glGetIntegerv (GL_ACCUM_RED_BITS, &a);

contain arbitrary values and the rendered buffer is garbage. This only happens if OSMesa is linked together with Octave, standalone OSMesa examples works fine.

On Debian GNU/Linux 8.0 (jessie), Ubuntu 14.04 (trusty) and Fedora 21 there is no need to build OSMesa from source, just use your package manager which installs libosmesa > 10.0.

Build libOSMesa from source

Needed for example for Debian wheezy or Ubuntu 12.04.5 which ships OSMesa 8.0.5.

 wget -nc ftp://ftp.freedesktop.org/pub/mesa/current/mesa-10.5.4.tar.xz
 tar Jxf mesa-10.5.4.tar.xz
 cd mesa-10.5.4/
 
 autoreconf -fi
 
 ./configure \
   CXXFLAGS="-O2 -g -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
   CFLAGS="-O2 -g -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
   --disable-xvmc \
   --disable-glx \
   --disable-dri \
   --with-dri-drivers="" \
   --with-gallium-drivers="" \
   --disable-shared-glapi \
   --disable-egl \
   --with-egl-platforms="" \
   --enable-osmesa \
   --enable-gallium-llvm=no \
   --prefix=/usr/local/mesa/10.2.2/classic
 make -j4
 # optional
 make check
 sudo make install

Floating point textures

Floating point textures are disabled by default due to patent restrictions. We should check if we can enable it with "--enable-texture-float"

known problems

  • #44478 Segfault with proprietary Nvidia drivers
  • #44979 Clumsy/missing configure check
  • #44338 Doesn't work on Windows (MXE build)
  • LP #1424059 libosmesa6 is not installable on Ubuntu 14.04 with HWE updates