[vtkusers] Mesa SetOffScreenRendering; no X

Berk Geveci berk.geveci at kitware.com
Tue Mar 19 11:54:36 EST 2002


Unfortunately, it's not that simple. It looks like (at least on 
unix), you can not load libvtkRenderingTCL without loading tk 
(which requires a display). If you try to load libvtkRenderingTCL.so
from tclsh, you will get an error unless you load libtk.so first (which
checks for the display). I don't know why libvtkRenderingTCL.so
is dependent on libtk.so. Probably because of the interactor stuff. 

-Berk


On Tue, 2002-03-19 at 10:57, Randy Heiland wrote:
> Thanks Prabhu.  Yes, I had searched the archive and found the post about Xvfb.
>  However, this shouldn't be (and isn't) necessary for doing Mesa offscreen
> rendering.  So, to follow up on my original post...
> 
> I now realize that the  /Rendering/vtkMesa* classes are used for the mangled
> Mesa stuff (which I wasn't using).  Hence, these classes were not compiled.
> 
> I switched to a C++ example (tweaked Mace.cxx) instead of the Tcl example and
> the Mesa offscreen rendering worked just fine:
> 
>   vtkRenderWindow *renWin = vtkRenderWindow::New();
>     renWin->AddRenderer(renderer);
>     renWin->SetOffScreenRendering(1);
> ...
>   vtkWindowToImageFilter *w2if = vtkWindowToImageFilter::New();
>     w2if->SetInput( renWin );
> 
>   vtkJPEGWriter *jpgWriter = vtkJPEGWriter::New();
>     jpgWriter->SetInput(w2if->GetOutput());
> ...
> 
> I realized that the Tcl script was probably trying to do some Tk thing that
> required X.  This question still remains - how to build VTK w/ Tcl, but no Tk,
> so that one can do Mesa offscreen rendering on a machine without xdm running.
>  Perhaps it's as easy as not setting the TK_ keys in the CMakeCache.txt file??
> 
> --Randy
> 
> 
> 
> On Mar 19, 12:29pm, Prabhu Ramachandran wrote:
> > Subject: [vtkusers] Mesa SetOffScreenRendering; no X
> > >>>>> "RH" == Randy Heiland <heiland at ncsa.uiuc.edu> writes:
> >
> >     RH> I've built VTK (4.0) on a Linux box with no xdm running.  I've
> >     RH> built it with Mesa and the OSMesa (offscreen) libs.  Can I
> >     RH> expect to have a script with
> >     RH> vtkMesaImageWindow/SetOffScreenRendering run OK?  I know, for
> >     RH> example, that I can run the Mesa 'osdemo' and it produces an
> >     RH> image file.
> >
> > Well, this is not entirely unrelated but there was a wonderful post a
> > long while ago by Robert Belleman on how to do off screen rendering on
> > X using Xvfb.  Here it is:
> >
> > http://public.kitware.com/pipermail/vtkusers/2000-November/004850.html
> >
> > Its really a pretty cool way of doing off screen rendering without
> > much heart ache.  Here is another one on how I used this idea to do
> > off screen rendering with scripted MayaVi.
> >
> > http://sourceforge.net/mailarchive/forum.php?thread_id=529819&forum_id=1824
> >
> > Hope this is of some use.
> > prabhu
> >-- End of excerpt from Prabhu Ramachandran
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list