Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glfw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pirvi-public
glfw
Commits
dfebad78
Commit
dfebad78
authored
1 year ago
by
Camilla Löwy
Browse files
Options
Downloads
Patches
Plain Diff
Update macOS OpenGL compatibility notes
parent
97892c60
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/compat.md
+21
-18
21 additions, 18 deletions
docs/compat.md
src/nsgl_context.m
+4
-4
4 additions, 4 deletions
src/nsgl_context.m
with
25 additions
and
22 deletions
docs/compat.md
+
21
−
18
View file @
dfebad78
...
...
@@ -242,24 +242,27 @@ extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
## OpenGL on macOS {#compat_osx}
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 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_PROFILE`
hint must be set to
`GLFW_OPENGL_CORE_PROFILE`
when creating OpenGL 3.2 and later contexts. The
`GLFW_CONTEXT_DEBUG`
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,
setting the
`GLFW_OPENGL_PROFILE`
or
`GLFW_OPENGL_FORWARD_COMPAT`
hints to
a non-default value will cause @ref glfwCreateWindow to fail and the
`GLFW_CONTEXT_DEBUG`
hint is ignored.
macOS (as of version 14) still provides OpenGL but it has been deprecated by
Apple. While the API is still available, it is poorly maintained and frequently
develops new issues. On modern systems, OpenGL is implemented on top of Metal
and is not fully thread-safe.
macOS does not support OpenGL stereo rendering. If the
`GLFW_STEREO`
hint is
set to true, OpenGL context creation will always fail.
macOS only supports OpenGL core profile contexts that are forward-compatible,
but the
`GLFW_OPENGL_FORWARD_COMPAT`
hint is ignored since GLFW 3.4. Even if
this hint is set to false (the default), a forward-compatible context will be
returned if available.
macOS does not support OpenGL debug contexts, no-error contexts or robustness.
The
`GLFW_CONTEXT_DEBUG`
,
`GLFW_CONTEXT_NO_ERROR`
and
`GLFW_CONTEXT_ROBUSTNESS`
hints will be ignored and a context without these features will be returned.
macOS does not flush OpenGL contexts when they are made non-current. The
`GLFW_CONTEXT_RELEASE_BEHAVIOR`
hint is ignored and the release behavior will
always be the equivalent of
`GLFW_RELEASE_BEHAVIOR_NONE`
. If you need a context
to be flushed, call
`glFlush`
before making it non-current.
## Vulkan loader and API {#compat_vulkan}
...
...
This diff is collapsed.
Click to expand it.
src/nsgl_context.m
+
4
−
4
View file @
dfebad78
...
...
@@ -183,16 +183,16 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
return GLFW_FALSE;
}
// Context robustness modes (GL_KHR_robustness) are not
yet
supported by
// Context robustness modes (GL_KHR_robustness) are not supported by
// macOS but are not a hard constraint, so ignore and continue
// Context release behaviors (GL_KHR_context_flush_control) are not
yet
// Context release behaviors (GL_KHR_context_flush_control) are not
// 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
// Debug contexts (GL_KHR_debug) are not 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
// No-error contexts (GL_KHR_no_error) are not supported by macOS but
// are not a hard constraint, so ignore and continue
#define ADD_ATTRIB(a) \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment