From: Eduardo DAVILA Date: Thu, 9 Aug 2018 13:51:26 +0000 (+0200) Subject: #3213 bbGEditor Feature New Normal - vtk8itk4wx3-mingw64 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b7a2b34294c468696201b94c7020563e70440a80;p=bbtkGEditor.git #3213 bbGEditor Feature New Normal - vtk8itk4wx3-mingw64 --- diff --git a/appli/bbEditor/bbEditor.cxx b/appli/bbEditor/bbEditor.cxx index 8b3ee65..4bbc842 100644 --- a/appli/bbEditor/bbEditor.cxx +++ b/appli/bbEditor/bbEditor.cxx @@ -35,8 +35,8 @@ #include #include - #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: \\CreaTools\\crea_TPdlls-4.0.0\\bin\\opengl-mesa the file: opengl32.dll\n to\n \\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); diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index da3ade5..8b61e58 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -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 ??";