MantisBT - VTK | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0011911 | VTK | (No Category) | public | 2011-03-01 08:08 | 2016-08-12 09:55 | |||||
Reporter | Sergey Slyadnev | |||||||||
Assigned To | Jean-Christophe Fillion-Robin | |||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||
Status | closed | Resolution | moved | |||||||
Platform | OS | OS Version | ||||||||
Product Version | ||||||||||
Target Version | Fixed in Version | |||||||||
Project | ||||||||||
Type | ||||||||||
Summary | 0011911: vtkXOpenGLRenderWindow: 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:08 | Sergey Slyadnev | New Issue | ||||||||
2013-06-05 15:56 | Jean-Christophe Fillion-Robin | Note Added: 0030917 | ||||||||
2013-06-05 15:56 | Jean-Christophe Fillion-Robin | Assigned To | => Jean-Christophe Fillion-Robin | |||||||
2013-06-05 15:56 | Jean-Christophe Fillion-Robin | Status | backlog => tabled | |||||||
2013-06-05 15:59 | Jean-Christophe Fillion-Robin | Note Added: 0030918 | ||||||||
2013-06-05 15:59 | Jean-Christophe Fillion-Robin | Status | tabled => closed | |||||||
2013-06-05 15:59 | Jean-Christophe Fillion-Robin | Resolution | open => fixed | |||||||
2013-06-05 15:59 | Jean-Christophe Fillion-Robin | Fixed in Version | => 5.10.1 | |||||||
2013-06-05 16:00 | Jean-Christophe Fillion-Robin | Note Edited: 0030918 | bug_revision_view_page.php?bugnote_id=30918#r614 | |||||||
2013-06-05 16:08 | Jean-Christophe Fillion-Robin | Relationship added | related to 0011912 | |||||||
2015-03-16 11:50 | Clinton Stimpson | Note Added: 0034309 | ||||||||
2015-03-16 11:50 | Clinton Stimpson | Status | closed => backlog | |||||||
2015-03-16 11:50 | Clinton Stimpson | Resolution | fixed => reopened | |||||||
2015-03-16 11:51 | Clinton Stimpson | Note Added: 0034310 | ||||||||
2016-07-06 16:47 | Berk Geveci | Status | backlog => expired | |||||||
2016-08-12 09:55 | Kitware Robot | Note Added: 0037222 | ||||||||
2016-08-12 09:55 | Kitware Robot | Status | expired => closed | |||||||
2016-08-12 09:55 | Kitware Robot | Fixed in Version | 5.10.1 => | |||||||
2016-08-12 09:55 | Kitware Robot | Resolution | reopened => moved |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|