[vtkusers] Offscreen rendering with no window

Bruno Oliveira bruno.manata.oliveira at gmail.com
Mon Mar 21 14:54:33 EDT 2016


Hello,

I am trying to perform offscreen rendering with the code below. But a
system window still apperas (with nothing rendered on it, ofcourse). I dont
want to create that window, how can I do that?



    renderer = vtkSmartPointer<vtkRenderer>::New();
    renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
    if (offscreen) {
        renderWindow->SetOffScreenRendering(1);
    }


    renderWindow->AddRenderer(renderer);
    renderWindow->SetAlphaBitPlanes(0); //disable usage of alpha channel


    renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
    renderWindowInteractor->SetRenderWindow(renderWindow);

    vtkSmartPointer<vtkInteractorStyleTrackballCamera> style =
vtkSmartPointer<
            vtkInteractorStyleTrackballCamera>::New();

    renderWindowInteractor->SetInteractorStyle(style);

    renderer->ResetCamera();
    renderWindow->Render();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160321/fc24dc33/attachment.html>


More information about the vtkusers mailing list