Difference between revisions of "OSMesa"

From Octave
Jump to navigation Jump to search
(add known problem section)
Line 1: Line 1:
 
OSMesa is used since Octave 4.0 for offscreen rendering from OpenGL toolkits FLTK and Qt.
 
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 (Bug #33180).  
+
 
 +
This enables printing without a X display, for example when ssh'ing to a remote machine, or if the figure is invisible ({{bug|33180}}).  
  
  
Line 47: Line 48:
  
 
Floating point textures are disabled by default due to patent restrictions. We should check if we can enable it with "--enable-texture-float"
 
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 ==
 +
 +
* {{bug|44478}} Segfault with proprietary Nvidia drivers
 +
* {{bug|44979}} Clumsy/missing configure check
 +
* {{bug|44338}} Doesn't work on Windows (MXE build)

Revision as of 12:31, 13 May 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/MesaLib-10.2.2.tar.bz2
 tar xjf MesaLib-10.2.2.tar.bz2
 cd Mesa-10.2.2/
 
 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)