]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/glcanvas_osx.cpp
Compilation fix for ANSI build after r61898.
[wxWidgets.git] / src / osx / glcanvas_osx.cpp
index 5d2c0cd9ed1c2766b838c540553dbd00326cf187..56f74a7f4139ec433a2509a5f8651c23a151a714 100644 (file)
@@ -145,15 +145,6 @@ bool wxGLCanvasBase::IsDisplaySupported(const int *attribList)
     return true;
 }
 
-bool wxGLCanvas::SwapBuffers()
-{
-    WXGLContext context = WXGLGetCurrentContext();
-    wxCHECK_MSG(context, false, _T("should have current context"));
-
-    WXGLSwapBuffers(context);
-    return true;
-}
-
 bool wxGLCanvasBase::IsExtensionSupported(const char *extension)
 {
     // we need a valid context to query for extensions.
@@ -162,8 +153,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);