From f8ccc115ef3f593b4b44f5efbc7c79a276e8619d Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Sun, 2 Feb 2014 22:08:18 +0400 Subject: [PATCH] proper render call order (fixes some issues with VTK6.1) --- modules/viz/src/interactor_style.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/viz/src/interactor_style.cpp b/modules/viz/src/interactor_style.cpp index 75003a2b6..7fa671448 100644 --- a/modules/viz/src/interactor_style.cpp +++ b/modules/viz/src/interactor_style.cpp @@ -366,7 +366,6 @@ void cv::viz::InteractorStyle::OnKeyDown() { Interactor->GetRenderWindow()->SetSize(win_size_.val); Interactor->GetRenderWindow()->SetPosition(win_pos_.val); - Interactor->GetRenderWindow()->Render(); Interactor->Render(); } // Set to max @@ -376,7 +375,6 @@ void cv::viz::InteractorStyle::OnKeyDown() win_size_ = win_size; Interactor->GetRenderWindow()->SetSize(screen_size.val); - Interactor->GetRenderWindow()->Render(); Interactor->Render(); max_win_size_ = Vec2i(Interactor->GetRenderWindow()->GetSize()); } @@ -417,7 +415,7 @@ void cv::viz::InteractorStyle::OnKeyDown() { vtkSmartPointer cam = CurrentRenderer->GetActiveCamera(); cam->SetParallelProjection(!cam->GetParallelProjection()); - CurrentRenderer->Render(); + Interactor->Render(); break; } @@ -468,7 +466,7 @@ void cv::viz::InteractorStyle::OnKeyDown() CurrentRenderer->SetActiveCamera(cam); CurrentRenderer->ResetCameraClippingRange(); - CurrentRenderer->Render(); + Interactor->Render(); break; } @@ -594,7 +592,6 @@ void cv::viz::InteractorStyle::OnMouseWheelForward() cam->Modified(); CurrentRenderer->ResetCameraClippingRange(); CurrentRenderer->Modified(); - CurrentRenderer->Render(); Interactor->Render(); } else @@ -624,7 +621,6 @@ void cv::viz::InteractorStyle::OnMouseWheelBackward() cam->Modified(); CurrentRenderer->ResetCameraClippingRange(); CurrentRenderer->Modified(); - CurrentRenderer->Render(); Interactor->Render(); } else