2 #include <wx/glcanvas.h>
9 GLCanvas (wxFrame* parent)
11 _canvas = new wxGLCanvas(parent);
12 Bind(wxEVT_PAINT, bind(&GLCanvas::paint, this);
32 class MyApp : public wxApp
37 auto sizer = new wxBoxSizer(wxHORIZONTAL);
38 _frame = new wxFrame(nullptr, wxID_ANY, wxT("Hello world"));
39 _canvas = new GLCanvas(_frame);
40 sizer->Add(_canvas->get(), 1, wxEXPAND);
41 _frame->SetSizerAndFit(sizer);