[vtkusers] the problem of vtkRenderWindow
Franks
masterwangzx at gmail.com
Tue Nov 6 06:05:01 EST 2018
Hi list
When I execute the following code on Manjora(based on Arch Linux), it
display two windows. One can interact with mouse, the other can not. But I
execute the same code on win10, it display one window as I wish.
I solve this problem by put /renWin->Render();/ behind the
/interactor->SetRenderWindow(renWin);/. But I want to know why.
the following code display two windows on linux
auto renWin = vtkSmartPointer<vtkRenderWindow>::New();
renWin->AddRenderer(renderer);
renWin->Render();
auto interactor = vtkSmartPointer<vtkRenderWindowInteractor>::New();
interactor->SetRenderWindow(renWin);
auto style = vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New();
interactor->SetInteractorStyle(style);
interactor->Initialize();
interactor->Start();
<http://vtk.1045678.n5.nabble.com/file/t342588/Screenshot_20181106_091229.png>
the following code display one window
auto renWin = vtkSmartPointer<vtkRenderWindow>::New();
renWin->AddRenderer(renderer);
auto interactor = vtkSmartPointer<vtkRenderWindowInteractor>::New();
interactor->SetRenderWindow(renWin);
auto style = vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New();
interactor->SetInteractorStyle(style);
renWin->Render();
interactor->Initialize();
interactor->Start();
Best regards
Frank
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list