X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..59678f3fae7d537003fe1dbd0d0049694ec946c1:/samples/opengl/isosurf/isosurf.cpp diff --git a/samples/opengl/isosurf/isosurf.cpp b/samples/opengl/isosurf/isosurf.cpp index 8e5aec6357..00ab92808d 100644 --- a/samples/opengl/isosurf/isosurf.cpp +++ b/samples/opengl/isosurf/isosurf.cpp @@ -246,15 +246,15 @@ IMPLEMENT_APP(MyApp) // `Main program' equivalent, creating windows and returning main app frame bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + Args(argc, argv); // Create the main frame window frame = new MyFrame(NULL, wxT("wxWidgets OpenGL Isosurf Sample"), wxDefaultPosition, wxDefaultSize); - // Give it an icon - frame->SetIcon(wxIcon(_T("mondrian"))); - // Make a menubar wxMenu *fileMenu = new wxMenu; @@ -272,7 +272,7 @@ bool MyApp::OnInit() int gl_attrib[20] = { WX_GL_RGBA, WX_GL_MIN_RED, 1, WX_GL_MIN_GREEN, 1, WX_GL_MIN_BLUE, 1, WX_GL_DEPTH_SIZE, 1, WX_GL_DOUBLEBUFFER, -# ifdef __WXMAC__ +# if defined(__WXMAC__) || defined(__WXCOCOA__) GL_NONE }; # else None }; @@ -312,7 +312,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, : wxFrame(frame, wxID_ANY, title, pos, size, style) { m_canvas = NULL; - SetIcon(wxIcon(sample_xpm)); + SetIcon(wxICON(sample)); } MyFrame::~MyFrame()