#include "wx/osx/private.h"
+#include <AGL/agl.h>
+
// ----------------------------------------------------------------------------
// wxGLCanvas
// ----------------------------------------------------------------------------
if ( !ctx )
return false;
+ WXGLContext ctxOld = WXGLGetCurrentContext();
+ WXGLSetCurrentContext(ctx);
+
wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS));
+ WXGLSetCurrentContext(ctxOld);
WXGLDestroyPixelFormat(fmt);
WXGLDestroyContext(ctx);
- return IsExtensionInList(extensions, extension);
+ return IsExtensionInList(extensions.ToAscii(), extension);
}
// ----------------------------------------------------------------------------