Added use of OpenGL 4.1 profile token on OS X.

Fixes #395.
This commit is contained in:
Camilla Berglund 2014-12-27 22:28:13 +01:00
parent 01c0c3ca1f
commit e0132c3099
2 changed files with 11 additions and 2 deletions

View File

@ -107,6 +107,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
bit field was unchanged bit field was unchanged
- [Cocoa] Bugfix: Joystick enumeration took hundreds of ms on some systems - [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 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] Enabled generation of pkg-config file for MinGW
- [Win32] Removed option to require explicitly linking against `winmm.dll` - [Win32] Removed option to require explicitly linking against `winmm.dll`
- [Win32] Bugfix: Failure to load winmm or its functions was not reported to - [Win32] Bugfix: Failure to load winmm or its functions was not reported to

View File

@ -127,12 +127,20 @@ int _glfwCreateContext(_GLFWwindow* window,
ADD_ATTR(NSOpenGLPFAClosestPolicy); ADD_ATTR(NSOpenGLPFAClosestPolicy);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 #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 else
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ #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) if (fbconfig->auxBuffers != GLFW_DONT_CARE)
ADD_ATTR2(NSOpenGLPFAAuxBuffers, fbconfig->auxBuffers); ADD_ATTR2(NSOpenGLPFAAuxBuffers, fbconfig->auxBuffers);