From 9a930edc2aededb9cf4167da0b34fab66345929a Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 5 Nov 2021 08:10:04 +0100 Subject: [PATCH] #3473 Stuck Render macOS --- .../widgets/vtkInteractorStyleBaseView.cxx | 21 ------------------- .../wxWindows/widgets/wxVtk3DBaseView.cxx | 14 +++++++++++-- .../wxWindows/widgets/wxVtkBaseView.cxx | 3 --- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx index c8cedd0..b40c577 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx @@ -147,21 +147,10 @@ void vtkInteractorStyleBaseView::InsertInteractorStyleMaracas(int pos, Interacto //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(int type) { -printf("EED vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas Start \n "); InteractorStyleMaracas *intStyMar; int i,size=_lstInteractorStyleMaracas.size(); -//EED Borrame -//FILE *ff = fopen("c:/temp/wxVtkBaseView_SceneManagerStadistics.txt","a+"); -//fprintf(ff,"EED vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas \n" ); -//for (i=0;i_wxvtkbaseview->Refresh(); - printf("EED vtkInteractorStyleBaseView::EvaluateToRefresh 1.1 \n "); } if (_parent_refresh_waiting==true) { @@ -384,22 +368,17 @@ printf("EED vtkInteractorStyleBaseView::EvaluateToRefresh Start \n "); #if wxMAJOR_VERSION <= 2 this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1); #else - printf("EED vtkInteractorStyleBaseView::EvaluateToRefresh 2.0 \n "); this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1); - printf("EED vtkInteractorStyleBaseView::EvaluateToRefresh 2.1 \n "); #endif int i; int size = _lstParentToReport.size(); for(i = 0; iProcessEvent(newevent1); - printf("EED vtkInteractorStyleBaseView::EvaluateToRefresh 3.1 \n "); }//for }//if }//if _blockRefresh -printf("EED vtkInteractorStyleBaseView::EvaluateToRefresh End\n"); } //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::BlockRefresh() diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx index b27f41d..e1e80e3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx @@ -71,11 +71,9 @@ vtkRenderWindow* wxVtk3DBaseView::GetRenWin() // virtual //------------------------------------------------------------------- void wxVtk3DBaseView::Refresh() { -printf("EED wxVtk3DBaseView::Refresh Start\n"); // _renWin->Render(); vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); vri->vtkRenderWindowInteractor::Render(); -printf("EED wxVtk3DBaseView::Refresh End\n"); } //------------------------------------------------------------------- @@ -217,6 +215,18 @@ void wxVtk3DBaseView::Configure() _aRenderer->SetMaximumNumberOfPeels(100); _renWin->SetMultiSamples(0); _renWin->SetAlphaBitPlanes(1); + +//EED 2021-11-3 +// The Depth Peeling method have a bug in MacOs +// In vtkDualDepthPeelingPass::Peel() TranslucentWrittenPixels are incoherent TOO BIG some times. Why ?? +// So the comparition in vtkDualDepthPeelingPass::PeelingDone() is not coherent. +// while (!this->PeelingDone()) +// { +// this->Peel(); +// } +// Or CurrentPeel >= MaximumNumberOfPeels || TranslucentWrittenPixels <= OcclusionThreshold not coherent. Why ?? + _aRenderer->UseDepthPeelingOff(); + } // if _configure } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 88a5cff..6c58988 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -80,8 +80,6 @@ void wxVtkBaseView::Configure() // virtual //------------------------------------------------------------------- void wxVtkBaseView::Refresh() // virtual { -printf("EED wxVtkBaseView::Refresh Start \n "); - // EED 10 Oct 2007 #if defined(WIN32) _iren->Refresh(true); @@ -95,7 +93,6 @@ printf("EED wxVtkBaseView::Refresh Start \n "); vri->vtkRenderWindowInteractor::Render(); //_iren->Refresh(); #endif -printf("EED wxVtkBaseView::Refresh End\n"); } //------------------------------------------------------------------- void wxVtkBaseView::RefreshView() // virtual -- 2.47.1