]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/glcanvas_osx.cpp
Made wxLogXXX() functions thread-safe.
[wxWidgets.git] / src / osx / glcanvas_osx.cpp
index 5d2c0cd9ed1c2766b838c540553dbd00326cf187..465e0d06dbd2831daa4b6be6584327c8ce8cd446 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "wx/osx/private.h"
 
+#include <AGL/agl.h>
+
 // ----------------------------------------------------------------------------
 // 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);