[vtkusers] Off-screen rendering, X11 and black window

Olli gammelnerd at gmail.com
Fri Jun 4 05:02:44 EDT 2010


Hi!

I'm trying off-screen rendering on Linux. I couldn't  figure out how to get
rid of the black window that keeps popping up every time new image is
rendered. Is there a way? The code goes approximately like this:

vtkSmartPointer<vtkXOpenGLRenderWindow> renWin =
vtkSmartPointer<vtkXOpenGLRenderWindow>::New();
renWin->AddRenderer(renderer);
renWin->SetSize(x, y);

vtkSmartPointer<vtkWindowToImageFilter> wif =
vtkSmartPointer<vtkWindowToImageFilter>::New();
wif->SetInput( renWin );
wif->ReadFrontBufferOff();

renWin->SetOffScreenRendering(1);
renWin->SetMapped(0);
renWin->Render();

I found vtkXOpenGLOffScreenRenderWindow code from the wiki, but that code
needs serious refactoring, because it is for an older VTK version. I'm using
5.4.

Olli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100604/6c81246f/attachment.htm>


More information about the vtkusers mailing list