]> git.saurik.com Git - wxWidgets.git/commitdiff
set the context we create in IsExtensionSupported() (see #10545)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 1 Jul 2009 09:34:54 +0000 (09:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 1 Jul 2009 09:34:54 +0000 (09:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/glcanvas_osx.cpp

index 5d2c0cd9ed1c2766b838c540553dbd00326cf187..11e4d99bbeca28bb131730167e9bdf22f699877a 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 = aglGetCurrentContext();
+    aglSetCurrentContext(ctx);
+
     wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS));
 
+    aglSetCurrentContext(ctxOld);
     WXGLDestroyPixelFormat(fmt);
     WXGLDestroyContext(ctx);