From c8b01f61d6b29c025dd5b76fd439c75a253cf486 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 10 Jul 2013 15:03:14 +0200 Subject: [PATCH] Enabled OpenGL 3.x and 4.x context on OS X 10.9. --- README.md | 2 ++ src/nsgl_context.m | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9a57f058..dcaff54a 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ See the [GLFW 3.0 documentation](http://www.glfw.org/docs/3.0/). returned by `glfwGetProcAddress` - [Win32] Bugfix: The user32 and dwmapi module handles were not freed on library termination + - [Cocoa] Enabled explicit creation of OpenGL 3.x and 4.x contexts as supported + by OS X 10.9 - [Cocoa] Bugfix: The clipboard string was not freed on terminate - [Cocoa] Bugfix: Selectors were used that are not declared by the 10.6 SDK - [Cocoa] Bugfix: The position set by `glfwSetWindowPos` was incorrect diff --git a/src/nsgl_context.m b/src/nsgl_context.m index 7de5fa5d..1bd27949 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -90,12 +90,11 @@ int _glfwCreateContext(_GLFWwindow* window, #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 // Fail if any OpenGL version above 2.1 other than 3.2 was requested - if (wndconfig->glMajor > 3 || - (wndconfig->glMajor == 3 && wndconfig->glMinor != 2)) + if (wndconfig->glMajor == 3 && wndconfig->glMinor < 2) { _glfwInputError(GLFW_VERSION_UNAVAILABLE, "NSOpenGL: The targeted version of Mac OS X does not " - "support any OpenGL version above 2.1 except 3.2"); + "support OpenGL 3.0 or 3.1"); return GL_FALSE; } @@ -105,8 +104,8 @@ int _glfwCreateContext(_GLFWwindow* window, { _glfwInputError(GLFW_VERSION_UNAVAILABLE, "NSOpenGL: The targeted version of Mac OS X only " - "supports OpenGL 3.2 contexts if they are " - "forward-compatible"); + "supports OpenGL 3.2 and later versions if they " + "are forward-compatible"); return GL_FALSE; } @@ -114,8 +113,8 @@ int _glfwCreateContext(_GLFWwindow* window, { _glfwInputError(GLFW_VERSION_UNAVAILABLE, "NSOpenGL: The targeted version of Mac OS X only " - "supports OpenGL 3.2 contexts if they use the " - "core profile"); + "supports OpenGL 3.2 and later versions if they " + "use the core profile"); return GL_FALSE; } }