]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/glcanvas_osx.cpp
Use the app name, not display name, as debug report name,
[wxWidgets.git] / src / osx / glcanvas_osx.cpp
index 5d2c0cd9ed1c2766b838c540553dbd00326cf187..d5710897097508a56b1f84253a6a6f6ee0b15431 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "wx/osx/private.h"
 
+#include <AGL/agl.h>
+
 // ----------------------------------------------------------------------------
 // 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);