-// ----------------------------------------------------------------------------
-// wxGLCanvas
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_CLASS(wxGLCanvas, wxWindow)
-
-BEGIN_EVENT_TABLE(wxGLCanvas, wxWindow)
- EVT_SIZE(wxGLCanvas::OnSize)
-END_EVENT_TABLE()
-
-wxGLCanvas::wxGLCanvas(wxWindow *parent,
- wxWindowID id,
- const int *attribList,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name,
- const wxPalette& palette)
-{
- Create(parent, id, pos, size, style, name, attribList, palette);
-}
-
-#if WXWIN_COMPATIBILITY_2_8
-
-wxGLCanvas::wxGLCanvas(wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name,
- const int *attribList,
- const wxPalette& palette)
-{
- if ( Create(parent, id, pos, size, style, name, attribList, palette) )
- m_glContext = new wxGLContext(this);
-}
-
-wxGLCanvas::wxGLCanvas(wxWindow *parent,
- const wxGLContext *shared,
- wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name,
- const int *attribList,
- const wxPalette& palette)
-{
- if ( Create(parent, id, pos, size, style, name, attribList, palette) )
- m_glContext = new wxGLContext(this, shared);
-}
-
-wxGLCanvas::wxGLCanvas(wxWindow *parent,
- const wxGLCanvas *shared,
- wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name,
- const int *attribList,
- const wxPalette& palette)
-{
- if ( Create(parent, id, pos, size, style, name, attribList, palette) )
- m_glContext = new wxGLContext(this, shared ? shared->m_glContext : NULL);
-}
-
-#endif // WXWIN_COMPATIBILITY_2_8
-
-/* static */
-bool wxGLCanvasBase::IsExtensionSupported(const char *extension)
-{
- // we need a valid context to query for extensions.
- const GLint defaultAttribs[] = { AGL_RGBA, AGL_DOUBLEBUFFER, AGL_NONE };
- AGLPixelFormat fmt = aglChoosePixelFormat(NULL, 0, defaultAttribs);
- AGLContext ctx = aglCreateContext(fmt, NULL);
- if ( !ctx )
- return false;
-
- wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS));
-
- aglDestroyPixelFormat(fmt);
- aglDestroyContext(ctx);
-
- return IsExtensionInList(extensions, extension);
-}
-
-/* static */
-bool wxGLCanvas::IsAGLMultiSampleAvailable()