Skip to content

Commit

Permalink
[macos] select compatibility profile if gl version is low (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark authored and tomaka committed Jan 8, 2018
1 parent bda8dbe commit e5f37ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Unreleased
- Add support for winapi 0.3

- Add support for winapi 0.3 ([#975](https://github.com/tomaka/glutin/pull/975))
- Fix MacOS to return compatibility profile if applicable (#[977](https://github.com/tomaka/glutin/pull/977))
6 changes: 5 additions & 1 deletion src/platform/macos/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ pub fn get_gl_profile<T>(
} else if let Some(v) = version {
// second, process exact requested version, if any
if v < (3, 2) {
Err(CreationError::OpenGlVersionNotSupported)
if opengl.profile.is_none() && v <= (2, 1) {
Ok(NSOpenGLProfileVersionLegacy)
} else {
Err(CreationError::OpenGlVersionNotSupported)
}
} else if v == (3, 2) {
Ok(NSOpenGLProfileVersion3_2Core)
} else {
Expand Down

0 comments on commit e5f37ae

Please sign in to comment.