[vtkusers] Mangled Mesa
Henkjan Huisman
h.huisman at rad.umcn.nl
Thu Oct 23 10:31:17 EDT 2003
Hi,
Struggled a few hours to get Mangled Mesa functional for Offscreen
printing with VTK. I use it to batch process medical images. Without an
actual screen I print resulting images in a report to easily review the
results of an experiment.
I found this non-trivial and only few references exist. I would like to
share this info. Here is what I did:
=================== Mesa-4.0.4:
Download source
Modify in the file Make-config in the 'linux:' target the following
vars:
"GL_LIB = libVTKMesaGL.so"
"GLU_LIB = libVTKMesaGLU.so"
"GLUT_LIB = libVTKMesaglut.so"
"GLW_LIB = libVTKMesaGLw.so"
"OSMESA_LIB = libOSVTKMesa.so"
"CFLAGS = -O -g -ansi -pedantic -fPIC -ffast-math
-DUSE_MGL_NAMESPACE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L
-D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include"
then:
make -f Makefile.X11 linux
cp Mesa-4.0.4/lib/* /data/usr/mesa404/lib/
I use 'VTKMesa' name extension to avoid conflicts with my RH9.0 libs
(especially OSMesa lib in XFree!). I'm using shared libraries, because
that allows me to use dynamic libs from VTK and not the vtk program
itself without explicitly having to load VTKMesaGL with my app.
I copied the 'VTKMesa' libs in /data/usr/mesa404/lib/, but any odd
place will work. Avoid /usr/lib /usr/local/lib for now.
=============== VTK-4.2.2:
follow normal instructions to get a proper vtk, then ccmake with the
following options:
VTK_USE_MANGLED_MESA ON
MANGLED_MESA_INCLUDE_DIR /data/usr/mesa404/include
MANGLED_MESA_LIBRARY /data/usr/mesa404/lib/libVTKMesaGL.so
MANGLED_OSMESA_INCLUDE_DIR /data/usr/mesa404/include
MANGLED_OSMESA_LIBRARY /data/usr/mesa404/lib/libOSVTKMesa.so
OPENGL_xmesa_INCLUDE_DIR /data/usr/mesa404/include
test using /data/prog/VTK-4.2.2/Examples/MangledMesa/Tcl scripts
Good luck
Henkjan
More information about the vtkusers
mailing list