Bläddra i källkod

Enabled OpenGL 3.x and 4.x context on OS X 10.9.

Camilla Berglund 12 år sedan
förälder
incheckning
c8b01f61d6
2 ändrade filer med 8 tillägg och 7 borttagningar
  1. 2 0
      README.md
  2. 6 7
      src/nsgl_context.m

+ 2 - 0
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

+ 6 - 7
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;
         }
     }