Copied Cocoa entry point bugfix from 2.7.2.

This commit is contained in:
Camilla Berglund 2011-07-27 18:40:41 +02:00
parent 95cddf85e1
commit d24acb7f64
2 changed files with 10 additions and 0 deletions

View File

@ -305,6 +305,7 @@ version of GLFW.</p>
<li>Bugfix: The FSAA test did not check for the availability of <code>GL_ARB_multisample</code></li>
<li>[Cocoa] Added support for OpenGL 3.2 core profile in 10.7 Lion and above</li>
<li>[Cocoa] Bugfix: The loop condition for saving video modes used the wrong index variable</li>
<li>[Cocoa] Bugfix: The OpenGL framework was not retrieved, making glfwGetProcAddress crash</li>
<li>[X11] Added support for the <code>GLX_EXT_swap_control</code> extension as an alternative to <code>GLX_SGI_swap_control</code></li>
<li>[X11] Bugfix: Calling <code>glXCreateContextAttribsARB</code> with an unavailable OpenGL version caused the application to terminate with a <code>BadMatch</code> Xlib error</li>
<li>[Win32] Removed explicit support for versions of Windows older than Windows XP</li>

View File

@ -201,6 +201,15 @@ int _glfwPlatformInit(void)
// Implicitly create shared NSApplication instance
[GLFWApplication sharedApplication];
_glfwLibrary.NS.OpenGLFramework =
CFBundleGetBundleWithIdentifier( CFSTR( "com.apple.opengl" ) );
if (_glfwLibrary.NS.OpenGLFramework == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"glfwInit: Failed to locate OpenGL framework");
return GL_FALSE;
}
NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
if (access([resourcePath cStringUsingEncoding:NSUTF8StringEncoding], R_OK) == 0)