]> Creatis software - bbtkGEditor.git/commitdiff
#3213 bbGEditor Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 9 Aug 2018 13:51:26 +0000 (15:51 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 9 Aug 2018 13:51:26 +0000 (15:51 +0200)
appli/bbEditor/bbEditor.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx

index 8b3ee65c883da77341d6e8fd7ccb7688f6322f5d..4bbc842b47e5b3312c4194f1fbbc0dde9dcb3708 100644 (file)
@@ -35,8 +35,8 @@
 #include <wx/app.h>
 #include <wx/sysopt.h>
 
-
 #include "vtkOutputWindow.h"
+#include "vtkRenderWindow.h"
 
 class vtkOutputWindowbbGEditor : public vtkOutputWindow
 {
@@ -123,18 +123,36 @@ bool wxBBEditorApp::OnCmdLineParsed(wxCmdLineParser& parser)
 }
 
 
-
-
 // ----------------------------------------------------------------------------
 // The `main program' equivalent, creating the windows and returning the
 // main frame
+
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MINOR_VERSION 0x821C
 bool wxBBEditorApp::OnInit( )
-{
+{      
+
+       vtkRenderWindow *renWin = vtkRenderWindow::New();
+       int supportopengl=renWin->SupportsOpenGL();
+       printf("EED wxBBEditorApp::OnInit >>>>> vtkRenderWindow SupportsOpenGL %d\n", supportopengl );
+       printf("EED wxBBEditorApp::OnInit >>>>> vtkRenderWindow IsDirect       %d\n", renWin->IsDirect() );
+       renWin->Delete();
+       if (supportopengl==0)
+       {
+#if defined(_WIN32)
+               wxString message=wxT("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 the file: opengl32.dll\n to\n <ProgramsFiles>\\CreaTools\\CreaTools-3.0.0\\bin ");
+#else
+               wxString message=wxT("OpenGL 3>= not detected.\n Try to install opengl drivers or use de opengl-mesa version.\n ");     
+#endif
+               wxMessageBox(message);
+               exit(0);
+       }
+
+       
        vtkOutputWindowbbGEditor *vtkoutputwindowbbgeditor= vtkOutputWindowbbGEditor::New();
        vtkOutputWindow::SetInstance( vtkoutputwindowbbgeditor );
        vtkoutputwindowbbgeditor->Delete();
 
-
 #ifdef MACOSX
        /* assume this is OSX */
        wxSystemOptions::SetOption("mac.listctrl.always_use_generic", 1);
index da3ade5f481a8fdeb5ef20030b390c7f6619f007..8b61e58568e46a88bb38404ac7cfedff296e598b 100644 (file)
@@ -71,8 +71,11 @@ namespace bbtk {
        
 // EED 15 oct 2012  wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager,Factory::Pointer bbtkfactory) 
        
+       
 wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager,Factory::Pointer bbtkfactory) 
 {
+       
+       
        _cbName                                 = "ComplexBoxName";
        _cbPackageName                  = "PackageName";
        _Author                                 = "Author ??";