[vtkusers] VTK Offscreen Rendering
Kevin H. Hobbs
hobbsk at ohiou.edu
Wed Apr 15 15:51:43 EDT 2009
On Wed, 2009-03-25 at 21:57 -0400, Shari Rolnick wrote:
> I’ve been using VTK with mangled Mesa to create offscreen
> visualizations for some time, but from glancing through the more
> recent documentation and mailing list archives, it looks like that is
> no longer the preferred method, but I couldn’t figure out how to make
> offscreen rendering work otherwise. In addition, it looks like (for
> example) the vtkAxesActor does not work with mangled Mesa. (The
> actors don’t show up in images that are generated offscreen.) Could
> someone either direct me to an example or instructions for the “right”
> way to do offscreen rendering now, or tell me how I might get the
> vtkAxesActor working with mangled Mesa?
>
>
>
> Thanks,
> Shari
The right way is to just build mesa and mesa's offscreen library osmesa.
Then tell cmake to link VTK with mesa and osmesa.
My CMakeCache.txt has these settings:
VTK_OPENGL_HAS_OSMESA:BOOL=ON
OPENGL_INCLUDE_DIR:PATH=/home/kevin/mesa/include
OPENGL_gl_LIBRARY:FILEPATH=/home/kevin/mesa/lib64/libGL.so
OPENGL_glu_LIBRARY:FILEPATH=/home/kevin/mesa/lib64/libGLU.so
OSMESA_INCLUDE_DIR:PATH=/home/kevin/mesa/include
OSMESA_LIBRARY:FILEPATH=/home/kevin/mesa/lib64/libOSMesa.so
You can set them in ccmake to point to your own mesa build or set only
VTK_OPENGL_HAS_OSMESA and set the environment variables
CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH such that cmake finds files
from mesa before system files and graphics libraries from ati or nvidia.
Your operating system may provide mesa and osmesa.
You may have to build two copies of VTK, one to use libraries from ati
or nvidia and one to do offscreen rendering.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090415/679da115/attachment.pgp>
More information about the vtkusers
mailing list