MantisBT - VTK | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0011912 | VTK | (No Category) | public | 2011-03-01 08:11 | 2013-06-05 16:10 | |||||
Reporter | Sergey Slyadnev | |||||||||
Assigned To | Jean-Christophe Fillion-Robin | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | ||||||||||
Target Version | Fixed in Version | 5.10.1 | ||||||||
Project | ||||||||||
Type | ||||||||||
Summary | 0011912: vtkXOpenGLRenderWindow: blank window appears in off-screen rendering mode | |||||||||
Description | Tests were performed on Red Hat 5.5 (64bit) with VTK 5.6.1. I've tried to enable the off-screen rendering mode on both Windows & Linux platforms with vtkRenderWindow::SetOffScreenRendering() method. While it works properly on Windows, the blank rendering window is surprisingly displayed on Linux. Here is my sample code: ========================================================================== vtkSmartPointer<vtkRenderWindow> aRenderWindow = vtkSmartPointer<vtkRenderWindow>::New(); vtkSmartPointer<vtkRenderer> aRenderer = vtkSmartPointer<vtkRenderer>::New(); aRenderWindow->AddRenderer(aRenderer); aRenderWindow->SetOffScreenRendering(1); aRenderWindow->SetSize(600, 600); vtkSmartPointer<vtkCamera> aCamera = aRenderer->GetActiveCamera(); aCamera->ParallelProjectionOn(); aCamera->SetPosition(1.0, 1.0, 1.0); aRenderer->ResetCamera(); vtkSmartPointer<vtkActor> anActor = vtkSmartPointer<vtkActor>::New(); vtkSmartPointer<vtkPolyDataMapper> aMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); vtkSmartPointer<vtkSphereSource> aSphereSource = vtkSmartPointer<vtkSphereSource>::New(); aMapper->SetInput( aSphereSource->GetOutput() ); anActor->SetMapper(aMapper); aRenderer->AddActor(anActor); vtkSmartPointer<vtkPNGWriter> aPNGWriter = vtkSmartPointer<vtkPNGWriter>::New(); vtkSmartPointer<vtkWindowToImageFilter> aWinToImageFilter = vtkSmartPointer<vtkWindowToImageFilter>::New(); aWinToImageFilter->SetInput(aRenderWindow); aWinToImageFilter->SetInputBufferTypeToRGB(); aWinToImageFilter->SetMagnification(1); aWinToImageFilter->ShouldRerenderOn(); aWinToImageFilter->Update(); aPNGWriter->SetInput( aWinToImageFilter->GetOutput() ); aPNGWriter->SetFileName("sphere_output.png"); aPNGWriter->Write(); ========================================================================== It seems like there is a problem in vtkXOpenGLRenderWindow, line 0000643: ================================================= if(this->OwnWindow) { ... XMapWindow(this->DisplayId, this->WindowId); ... ================================================= This code is executed even in the off-screen rendering mode. I've used the following patch to prevent the window from mapping: ================================================= if(this->OwnWindow !this->OffScreenRendering) { ... XMapWindow(this->DisplayId, this->WindowId); ... ================================================= I resolves the problem with the blank window. Do you think it is possible to apply that patch on future versions of VTK? | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2011-03-01 08:11 | Sergey Slyadnev | New Issue | ||||||||
2013-06-05 16:08 | Jean-Christophe Fillion-Robin | Relationship added | related to 0011911 | |||||||
2013-06-05 16:09 | Jean-Christophe Fillion-Robin | Assigned To | => Jean-Christophe Fillion-Robin | |||||||
2013-06-05 16:09 | Jean-Christophe Fillion-Robin | Status | backlog => tabled | |||||||
2013-06-05 16:09 | Jean-Christophe Fillion-Robin | Note Added: 0030919 | ||||||||
2013-06-05 16:10 | Jean-Christophe Fillion-Robin | Note Added: 0030920 | ||||||||
2013-06-05 16:10 | Jean-Christophe Fillion-Robin | Status | tabled => closed | |||||||
2013-06-05 16:10 | Jean-Christophe Fillion-Robin | Resolution | open => fixed | |||||||
2013-06-05 16:10 | Jean-Christophe Fillion-Robin | Fixed in Version | => 5.10.1 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|