#include <wx/app.h>
#include <wx/sysopt.h>
-
#include "vtkOutputWindow.h"
+#include "vtkRenderWindow.h"
class vtkOutputWindowbbGEditor : public vtkOutputWindow
{
}
-
-
// ----------------------------------------------------------------------------
// 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);
// 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 ??";