Skip to content

Commit

Permalink
[macos] select compatibility profile if gl version is low
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Jan 8, 2018
1 parent bda8dbe commit 1e36acb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glutin"
version = "0.12.0"
version = "0.12.1"
authors = ["The glutin contributors, Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "Cross-platform OpenGL context provider."
keywords = ["windowing", "opengl"]
Expand Down
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 1e36acb

Please sign in to comment.