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 2193

Summary: Asking for an OpenGL version greater than 3.2 gives you nothing in OSX
Product: SDL Reporter: Thomas Hiatt <thomashiatt>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 2.0.1   
Hardware: x86   
OS: Other   

Description Thomas Hiatt 2013-10-28 18:21:30 UTC
If you ask for an OpenGL version greater than 3.2 you get nothing. As of OSX 10.9 OpenGL 4.1 is supported. 

    /* Sadly, we'll have to update this as life progresses, since we need to
       set an enum for context profiles, not a context version number */
    if (wantver > 0x0302) {
        SDL_SetError ("OpenGL > 3.2 is not supported on this platform");
        return NULL;
    }

    pool = [[NSAutoreleasePool alloc] init];

    /* specify a profile if we're on Lion (10.7) or later. */
    if (data->osversion >= 0x1070) {
        NSOpenGLPixelFormatAttribute profile = kCGLOGLPVersion_Legacy;
        if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_CORE) {
            if (wantver == 0x0302) {
                profile = kCGLOGLPVersion_3_2_Core;
            }
        }
        attr[i++] = kCGLPFAOpenGLProfile;
        attr[i++] = profile;
    }

It should be changed to ask for a 3.2 core profile if the want version is greater than 3.2 rather than return nothing.
Comment 1 Thomas Hiatt 2013-10-28 18:34:15 UTC
I found a duplicate of this after more searching.

*** This bug has been marked as a duplicate of bug 1942 ***