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 2283 - Cannot create 3.3 or 4.1 context on Mac OS X 10.9
Summary: Cannot create 3.3 or 4.1 context on Mac OS X 10.9
Status: RESOLVED DUPLICATE of bug 1942
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.1
Hardware: x86 Mac OS X (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-03 06:54 UTC by BurnSpamAddress
Modified: 2013-12-03 09:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BurnSpamAddress 2013-12-03 06:54:49 UTC
Mac OS X 10.9 adds support for OpenGL 3.3 and 4.1 [1]. However, SDL refuses to create any context with version > 3.2 with the message "OpenGL > 3.2 is not supported on this platform".

If I create a 3.2 context, I get version 4.1. However, the error message is incorrect and misleading.

SDL should probably try to create the context and only report a failure if that fails.


[1] https://developer.apple.com/graphicsimaging/opengl/capabilities/
Comment 1 Sam Lantinga 2013-12-03 07:51:29 UTC
Hey Ryan, didn't you already fix this?
Comment 2 Ryan C. Gordon 2013-12-03 08:54:54 UTC
(In reply to Sam Lantinga from comment #1)
> Hey Ryan, didn't you already fix this?

I did, it's in Bug #1942.

(In reply to BurnSpamAddress from comment #0)
> SDL should probably try to create the context and only report a failure if
> that fails.

OS X doesn't offer a way to ask for an arbitrary version: just explicitly 3.2, and now with Mavericks, 4.1. The numbers happens to match up somewhat (0x0302 and 0x0401, I think), but we can't safely plug arbitrary numbers in there and expect it to work, so we have to update our list of available versions every time a new OS X comes out.

--ryan.

*** This bug has been marked as a duplicate of bug 1942 ***
Comment 3 Alex Szpakowski 2013-12-03 09:06:13 UTC
Actually, SDL's code for requesting a 4.1 context on OS X always gives back the software renderer for me, despite the fact that I can create a 4.1 context by requesting 3.2.
The value SDL uses as an NSOpenGLPixelFormatAttribute when requesting 4.1 isn't actually officially supported, apparently.

I have more description and a patch here: https://bugzilla.libsdl.org/show_bug.cgi?id=2197#c2