From 0321bec232ef0fb49ce44671355b1e73da24161e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 8 Jun 2017 15:44:07 +0200 Subject: [PATCH] Documentation work [ci skip] --- docs/compat.dox | 12 ++++++------ docs/window.dox | 8 -------- src/nsgl_context.m | 10 ++++++++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/compat.dox b/docs/compat.dox index 32618e81..cabe18c3 100644 --- a/docs/compat.dox +++ b/docs/compat.dox @@ -164,21 +164,21 @@ extensions to provide support for sRGB framebuffers. Where both of these extension are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect. -@section compat_osx OpenGL 3.2 and later on macOS +@section compat_osx OpenGL on macOS Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then only forward-compatible, core profile contexts are supported. Support for OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible, core profile contexts. There is also still no mechanism for requesting debug -contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL -version 2.1. +contexts or no-error contexts. Versions of Mac OS X earlier than 10.7 support +at most OpenGL version 2.1. Because of this, on OS X 10.7 and later, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` hints will cause @ref glfwCreateWindow to fail if -given version 3.0 or 3.1, the `GLFW_OPENGL_FORWARD_COMPAT` hint must be set to +given version 3.0 or 3.1. The `GLFW_OPENGL_FORWARD_COMPAT` hint must be set to `GLFW_TRUE` and the `GLFW_OPENGL_PROFILE` hint must be set to -`GLFW_OPENGL_CORE_PROFILE` when creating OpenGL 3.2 and later contexts and the -`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored. +`GLFW_OPENGL_CORE_PROFILE` when creating OpenGL 3.2 and later contexts. The +`GLFW_OPENGL_DEBUG_CONTEXT` and `GLFW_CONTEXT_NO_ERROR` hints are ignored. Also, on Mac OS X 10.6 and below, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` hints will fail if given a version above 2.1, diff --git a/docs/window.dox b/docs/window.dox index 8bd87e13..7d187d65 100644 --- a/docs/window.dox +++ b/docs/window.dox @@ -426,14 +426,6 @@ The no error mode for OpenGL and OpenGL ES is described in detail by the [GL_KHR_no_error](https://www.opengl.org/registry/specs/KHR/no_error.txt) extension. -@note This hint is experimental in its current state. There are currently -(October 2015) no corresponding WGL or GLX extensions. That makes this hint -a [hard constraint](@ref window_hints_hard) for those backends, as creation will -fail if unsupported context flags are requested. Once the extensions are -available, they will be required and creation of `GL_KHR_no_error` contexts may -fail on early drivers where this flag is supported without those extensions -being listed. - @subsubsection window_hints_osx macOS specific hints diff --git a/src/nsgl_context.m b/src/nsgl_context.m index cc2615fa..2aebed45 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -145,11 +145,17 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, } } - // Context robustness modes (GL_KHR_robustness) are not yet supported on + // Context robustness modes (GL_KHR_robustness) are not yet supported by // macOS but are not a hard constraint, so ignore and continue // Context release behaviors (GL_KHR_context_flush_control) are not yet - // supported on macOS but are not a hard constraint, so ignore and continue + // supported by macOS but are not a hard constraint, so ignore and continue + + // Debug contexts (GL_KHR_debug) are not yet supported by macOS but are not + // a hard constraint, so ignore and continue + + // No-error contexts (GL_KHR_no_error) are not yet supported by macOS but + // are not a hard constraint, so ignore and continue #define ADD_ATTR(x) { attributes[attributeCount++] = x; } #define ADD_ATTR2(x, y) { ADD_ATTR(x); ADD_ATTR(y); }