We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1942

Summary: Mac: OpenGL 4.1 contexts in OS 10.9 not supported intuitively
Product: SDL Reporter: Alex Szpakowski <amaranth72>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: BurnSpamAddress, thomashiatt
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.8   

Description Alex Szpakowski 2013-07-04 01:02:54 UTC
The way SDL_GL_CreateContext is currently implemented in OS X, if a core OpenGL 4.1 context is wanted in Mac OS 10.9, you need to make it think you want version 3.2.
This is because the version request for NSGL/CGL contexts is an enum rather than version numbers, and in OS 10.9 the core GL 3.2 enum (kCGLOGLPVersion_3_2_Core) will create a core GL 4.1 context when the system supports it.
SDL's code currently sets an error if the requested version is greater than 3.2 in OS X, instead of using the kCGLOGLPVersion_3_2_Core enum for requested versions <= 4.1 in Mavericks.
Comment 1 Ryan C. Gordon 2013-07-05 21:32:18 UTC
So to be clear, asking for a 3.2 context in Mavericks gets you a 4.1 context, and there's no new 4.1 enum?

--ryan.
Comment 2 Alex Szpakowski 2013-07-06 18:36:34 UTC
Full disclosure: I'm not actually using 10.9 - just going off what I've seen from the WWDC videos and the API diffs in the Apple Developer Documentation, and SDL's code (and what I've heard from other people.) :)

But yes, asking for a 3.2 core profile (via Apple's 3_2Core enum, which is the only way, so it's the way SDL uses) will get you a 4.1 profile in Mavericks according to what Apple is saying, and from what I can tell is the only way to get that 4.1 core profile.
Comment 3 Thomas Hiatt 2013-10-28 18:34:15 UTC
*** Bug 2193 has been marked as a duplicate of this bug. ***
Comment 4 Ryan C. Gordon 2013-10-29 02:47:24 UTC
This change...

    http://hg.libsdl.org/SDL/rev/bb624b1348da

...adds OpenGL 4.1 Core Profile support for 10.9 users.

--ryan.
Comment 5 Ryan C. Gordon 2013-12-03 08:54:54 UTC
*** Bug 2283 has been marked as a duplicate of this bug. ***