]> Creatis software - creaMaracasVisu.git/commitdiff
#3488 Bug with segmentation fault with VTK 9.2 ( SupportsOpenGL )
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 28 Jul 2022 09:55:06 +0000 (11:55 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 28 Jul 2022 09:55:06 +0000 (11:55 +0200)
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx

index 941b3ef3ae0d5f7c1e9e1d190d80e4bf3bbe33fa..61ad9f6f7c43b32ab47089153e638e31ee198ea4 100644 (file)
@@ -289,6 +289,7 @@ void wxVtk2DBaseView::Configure(bool okimage)
 
                } // okimage
        } // imageData
+    
 }
 
 //-------------------------------------------------------------------
index 05ccfb1c79086846c5784fd04228f413df3fa4c4..280f791f489aa7b284c70771d2380a3a52a7583c 100644 (file)
@@ -150,32 +150,34 @@ void wxVtk3DBaseView::Configure()
                //wxVtkBaseView::Configure();
                _aRenderer      = vtkRenderer::New();
                _renWin         = vtkRenderWindow::New();
-
-
-               int supportopengl=_renWin->SupportsOpenGL();
-               printf("EED wxVtk3DBaseView::Configure >>>>> vtkRenderWindow SupportsOpenGL %d\n", supportopengl );
-               printf("EED wxVtk3DBaseView::Configure >>>>> vtkRenderWindow IsDirect       %d\n", _renWin->IsDirect() );
-               if (supportopengl==0)
-               {
+        
+        
+        printf("EED wxVtk3DBaseView::Configure >>>>> vtkRenderWindow IsDirect       %d\n", _renWin->IsDirect() );
+        
+        /* EED 2022-07-26  Segmentation fault with VTK9.2 Macos
+        int supportopengl=_renWin->SupportsOpenGL();
+        printf("EED wxVtk3DBaseView::Configure >>>>> vtkRenderWindow SupportsOpenGL %d\n", supportopengl );
+        if (supportopengl==0)
+        {
 #if defined(_WIN32)
-                       printf("   OpenGL 3 not detected.\n    Try to install opengl drivers or use de opengl-mesa version.\n    Copy from <ProgramsFiles>\\CreaTools\\crea_TPdlls-4.0.0\\bin\\opengl-mesa\n    the file: opengl32.dll\n to    <ProgramsFiles>\\CreaTools\\CreaTools-3.0.0\\bin \n");
+            printf("   OpenGL 3 not detected.\n    Try to install opengl drivers or use de opengl-mesa version.\n    Copy from <ProgramsFiles>\\CreaTools\\crea_TPdlls-4.0.0\\bin\\opengl-mesa\n    the file: opengl32.dll\n to    <ProgramsFiles>\\CreaTools\\CreaTools-3.0.0\\bin \n");
 #else
-                       printf("   OpenGL 3 not detected.\n    Try to install opengl drivers or use de opengl-mesa version.\n");
+            printf("   OpenGL 3 not detected.\n    Try to install opengl drivers or use de opengl-mesa version.\n");
 #endif
-                       exit(0);
-               }
-               
+            exit(0);
+        }
+        */
+
+        
+        
                _renWin->AddRenderer(_aRenderer);
 
                _aRenderer->GradientBackgroundOn();
                _aRenderer->SetBackground( 0.33 , 0.33 , 0.33 );
                _aRenderer->SetBackground2( 0.66 , 0.66 , 0.66 );
 
-
-
 //             _aRenderer->GradientBackgroundOff();
 //             _aRenderer->SetBackground(0,0,0 );
-
                
                SetStereo(0);
                
@@ -231,7 +233,9 @@ void wxVtk3DBaseView::Configure()
 //          this->Peel();
 //        }
 // Or CurrentPeel >= MaximumNumberOfPeels || TranslucentWrittenPixels <= OcclusionThreshold not coherent. Why ??
-        _aRenderer->UseDepthPeelingOff();
+
+ //EED 2021-07-25
+//        _aRenderer->UseDepthPeelingOff();
 
         
 /*
@@ -242,6 +246,7 @@ _renWin -> SetStereoTypeToSplitViewportHorizontal();
         
         
        } // if _configure
+    
 }
 
 //-------------------------------------------------------------------