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 - Asking for an OpenGL version greater than 3.2 gives you nothing in OSX
Summary: Asking for an OpenGL version greater than 3.2 gives you nothing in OSX
Status: RESOLVED DUPLICATE of bug 1942
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.1
Hardware: x86 Other
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-28 18:21 UTC by Thomas Hiatt
Modified: 2013-10-28 18:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***