From f27eca113ebe9e3d764482264f5c2588993953b7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 2 May 2013 22:41:09 +0200 Subject: [PATCH] Moved OpenGL framework loading to NSGL module. --- src/cocoa_init.m | 9 --------- src/nsgl_context.m | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 508de05f..6c9eeb0a 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -80,15 +80,6 @@ int _glfwPlatformInit(void) { _glfw.ns.autoreleasePool = [[NSAutoreleasePool alloc] init]; - _glfw.nsgl.framework = - CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); - if (_glfw.nsgl.framework == NULL) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "NSGL: Failed to locate OpenGL framework"); - return GL_FALSE; - } - #if defined(_GLFW_USE_CHDIR) changeToResourcesDirectory(); #endif diff --git a/src/nsgl_context.m b/src/nsgl_context.m index 271b8ae7..7de5fa5d 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -47,6 +47,15 @@ int _glfwInitContextAPI(void) return GL_FALSE; } + _glfw.nsgl.framework = + CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); + if (_glfw.nsgl.framework == NULL) + { + _glfwInputError(GLFW_PLATFORM_ERROR, + "NSGL: Failed to locate OpenGL framework"); + return GL_FALSE; + } + return GL_TRUE; }