diff --git a/README.md b/README.md index 8d461b36..37f55e11 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ GLFW bundles a number of dependencies in the `deps/` directory. bit field was unchanged - [Cocoa] Bugfix: Joystick enumeration took hundreds of ms on some systems - [Cocoa] Bugfix: The cursor was hidden when the user resized a GLFW window + - [Cocoa] Bugfix: The 10.10 Yosemite OpenGL 4.1 profile token was not used - [Win32] Enabled generation of pkg-config file for MinGW - [Win32] Removed option to require explicitly linking against `winmm.dll` - [Win32] Bugfix: Failure to load winmm or its functions was not reported to diff --git a/src/nsgl_context.m b/src/nsgl_context.m index 406685b4..fb84ec31 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -127,12 +127,20 @@ int _glfwCreateContext(_GLFWwindow* window, ADD_ATTR(NSOpenGLPFAClosestPolicy); #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if (ctxconfig->major > 2) +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 + if (ctxconfig->major >= 4) { - ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); + ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core); } else #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ + if (ctxconfig->major >= 3) + { + ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); + } +#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ + + if (ctxconfig->major <= 2) { if (fbconfig->auxBuffers != GLFW_DONT_CARE) ADD_ATTR2(NSOpenGLPFAAuxBuffers, fbconfig->auxBuffers);