[vtkusers] Mesa SetOffScreenRendering; no X

Randy Heiland heiland at ncsa.uiuc.edu
Wed Mar 20 10:26:32 EST 2002


Well, no fear, once again the Python-wrapped VTK shows its superiority to the
Tcl-wrapped VTK :)  I can do this in a Python script.

(For anyone who might find this meaningful, this was a test build of VTK on an
Intel McKinley, using gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85).
 Except for having to turn off optimization when compiling a half-dozen or so
classes, the build went fine.  Oh, and I had to build Python as a shared lib
instead of the default static lib, else I got link error for the VTK Python
libs)

--Randy

On Mar 19, 11:54am, Berk Geveci wrote:
> Subject: Re: [vtkusers] Mesa SetOffScreenRendering; no X
> 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
>
>-- End of excerpt from Berk Geveci





More information about the vtkusers mailing list