X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6ba38871f6cc5c02391c04e37e481d0428cef3f..7735b2ea691f41d7a7f007befbe969386873b86e:/src/osx/glcanvas_osx.cpp diff --git a/src/osx/glcanvas_osx.cpp b/src/osx/glcanvas_osx.cpp index 5d2c0cd9ed..d571089709 100644 --- a/src/osx/glcanvas_osx.cpp +++ b/src/osx/glcanvas_osx.cpp @@ -35,6 +35,8 @@ #include "wx/osx/private.h" +#include + // ---------------------------------------------------------------------------- // wxGLCanvas // ---------------------------------------------------------------------------- @@ -148,7 +150,7 @@ bool wxGLCanvasBase::IsDisplaySupported(const int *attribList) bool wxGLCanvas::SwapBuffers() { WXGLContext context = WXGLGetCurrentContext(); - wxCHECK_MSG(context, false, _T("should have current context")); + wxCHECK_MSG(context, false, wxT("should have current context")); WXGLSwapBuffers(context); return true; @@ -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);