From 880a2b69fb1d9e64fd22b9cc950246a97d6f7d16 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 1 Jul 2009 09:34:54 +0000 Subject: [PATCH] set the context we create in IsExtensionSupported() (see #10545) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/glcanvas_osx.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osx/glcanvas_osx.cpp b/src/osx/glcanvas_osx.cpp index 5d2c0cd9ed..11e4d99bbe 100644 --- a/src/osx/glcanvas_osx.cpp +++ b/src/osx/glcanvas_osx.cpp @@ -35,6 +35,8 @@ #include "wx/osx/private.h" +#include + // ---------------------------------------------------------------------------- // 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); -- 2.45.2