@ -1584,6 +1584,14 @@ void registerGlExtensions(CGlExtensions &ext)
{
H_AUTO_OGL(registerGlExtensions);
#ifdef NL_OS_MAC
CGLContextObj ctx = CGLGetCurrentContext();
if (ctx == NULL)
nlerror("No OpenGL context set");
}
#endif
// OpenGL 1.2 ??
const char *nglVersion = (const char *)glGetString (GL_VERSION);
@ -1072,6 +1072,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
[_ctx flushBuffer];
[_glView display];
// Set context as thread context
CGLSetCurrentContext((CGLContextObj)[_ctx CGLContextObj]);
_EventEmitter.init(this, _glView, _DestroyWindow);
#elif defined(NL_OS_UNIX)