[vtkusers] Mesa SetOffScreenRendering; no X

Randy Heiland heiland at ncsa.uiuc.edu
Tue Mar 19 10:57:20 EST 2002


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





More information about the vtkusers mailing list