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
This commit is contained in:
Vadim Zeitlin
2009-07-01 09:34:54 +00:00
parent 3dd63e0241
commit 880a2b69fb

View 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);