+bool MyApp::OnInit()
+{
+ if ( !wxApp::OnInit() )
+ return false;
+
+ Args(argc, argv);
+
+ // Create the main frame window
+ new MyFrame(NULL, wxT("wxWidgets OpenGL Isosurf Sample"),
+ wxDefaultPosition, wxDefaultSize);
+
+ read_surface("isosurf.dat");
+
+ Init();
+
+ return true;
+}
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_MENU(wxID_EXIT, MyFrame::OnExit)
+END_EVENT_TABLE()
+
+// My frame constructor
+MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
+ const wxSize& size, long style)
+ : wxFrame(frame, wxID_ANY, title, pos, size, style),
+ m_canvas(NULL)