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:
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include "wx/osx/private.h"
|
#include "wx/osx/private.h"
|
||||||
|
|
||||||
|
#include <AGL/agl.h>
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxGLCanvas
|
// wxGLCanvas
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -162,8 +164,12 @@ bool wxGLCanvasBase::IsExtensionSupported(const char *extension)
|
|||||||
if ( !ctx )
|
if ( !ctx )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
WXGLContext ctxOld = aglGetCurrentContext();
|
||||||
|
aglSetCurrentContext(ctx);
|
||||||
|
|
||||||
wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS));
|
wxString extensions = wxString::FromAscii(glGetString(GL_EXTENSIONS));
|
||||||
|
|
||||||
|
aglSetCurrentContext(ctxOld);
|
||||||
WXGLDestroyPixelFormat(fmt);
|
WXGLDestroyPixelFormat(fmt);
|
||||||
WXGLDestroyContext(ctx);
|
WXGLDestroyContext(ctx);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user