[vtkusers] vtkRendererSource and vtkRenderWindow.

Eloisa Bentivegna bentivegna at cct.lsu.edu
Tue Jun 22 16:34:41 EDT 2010


Eric E. Monson ha scritto:
> Hello Eloisa,
> 
> Hopefully someone who had actually done this will step in if I get something wrong, but I wanted to get you started in what I think is the correct direction. If you want to do "offscreen rendering", the current method (assuming you're using a fairly recent version of VTK -- 5.4 or 5.6 or git) is to build OSMesa (or maybe your OS comes with it?) and have VTK use that for OpenGL rendering. 
> 
> Here's an email from last year explaining a little of this:
> 
> http://www.vtk.org/pipermail/vtkusers/2009-April/100419.html
> 
> Just make sure you ignore older information you come across which refer to "mangled Mesa", as this isn't supported any more. 
> 
> Then, the more current filter (instead of vtkRendererSource) is vtkWindowToImageFilter:
> 
> http://www.vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html
> 
> And there is an example of doing offscreen rendering using this filter on the VTK Examples Wiki page:
> 
> http://www.vtk.org/Wiki/VTK/Examples/OffScreenRendering

Thanks for all the details!

After installing a few missing packages, I was able to compile the 
off-screen example given above. However, I get:


$ ./OffScreenRendering

ERROR: In /home/bentiveg/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 405
vtkXOpenGLRenderWindow (0x8eb6fa0): Could not find a decent visual


Segmentation fault


This looks like OpenGL is still looking for a window manager, but this 
time gets confused and aborts. I've checked for any possible mixup 
between the newly installed libs that come with Mesa and the old system 
ones, but it seems like everything is working as it should. Does anyone 
have any further suggestions? I'm using VTK 5.6.0 and Mesa 7.8.2.

Thanks for your help!
Eloisa



More information about the vtkusers mailing list