From 4b07c93946e88476f4934f669202268812e52bc5 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Mon, 23 Jul 2012 16:19:50 -0500 Subject: [PATCH] Fixup: glewinfo on Mac needs to call RegalMakeCurrent manually. --- auto/src/glewinfo_head.c | 4 ++++ auto/src/glewinfo_tail.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/auto/src/glewinfo_head.c b/auto/src/glewinfo_head.c index e1070c5..95a36a7 100644 --- a/auto/src/glewinfo_head.c +++ b/auto/src/glewinfo_head.c @@ -8,6 +8,10 @@ #include #endif +#ifdef GLEW_REGAL +#include +#endif + static FILE* f; #ifdef GLEW_MX diff --git a/auto/src/glewinfo_tail.c b/auto/src/glewinfo_tail.c index f778e71..4fe17ae 100644 --- a/auto/src/glewinfo_tail.c +++ b/auto/src/glewinfo_tail.c @@ -200,6 +200,10 @@ GLboolean glewCreateContext () /*aglSetDrawable(ctx, GetWindowPort(wnd));*/ octx = aglGetCurrentContext(); if (GL_FALSE == aglSetCurrentContext(ctx)) return GL_TRUE; + /* Needed for Regal on the Mac */ + #if defined(GLEW_REGAL) && defined(__APPLE__) + RegalMakeCurrent(octx); + #endif return GL_FALSE; }