OSMesa

From Octave
Revision as of 19:19, 13 May 2015 by Andy1978 (talk | contribs)
Jump to navigation Jump to search

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"