diff --git a/src/osx/glcanvas_osx.cpp b/src/osx/glcanvas_osx.cpp index 5d2c0cd9ed..11e4d99bbe 100644 --- a/src/osx/glcanvas_osx.cpp +++ b/src/osx/glcanvas_osx.cpp @@ -35,6 +35,8 @@ #include "wx/osx/private.h" +#include + // ---------------------------------------------------------------------------- // wxGLCanvas // ---------------------------------------------------------------------------- @@ -162,8 +164,12 @@ bool wxGLCanvasBase::IsExtensionSupported(const char *extension) if ( !ctx ) return false; + WXGLContext ctxOld = aglGetCurrentContext(); + aglSetCurrentContext(ctx); + wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS)); + aglSetCurrentContext(ctxOld); WXGLDestroyPixelFormat(fmt); WXGLDestroyContext(ctx);