X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6ba38871f6cc5c02391c04e37e481d0428cef3f..c9cc9a2f3e41341a4c04c67137b58faaeaa55366:/src/osx/glcanvas_osx.cpp diff --git a/src/osx/glcanvas_osx.cpp b/src/osx/glcanvas_osx.cpp index 5d2c0cd9ed..465e0d06db 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 = WXGLGetCurrentContext(); + WXGLSetCurrentContext(ctx); + wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS)); + WXGLSetCurrentContext(ctxOld); WXGLDestroyPixelFormat(fmt); WXGLDestroyContext(ctx);