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 2407

Summary: Support for OpenGL ES 3 contexts on iOS
Product: SDL Reporter: Alex Szpakowski <amaranth72>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: gabomdq
Version: HG 2.1   
Hardware: iPhone/iPod touch   
OS: iOS (All)   
Attachments: Patch to add support for OpenGL ES 3 on iOS

Description Alex Szpakowski 2014-02-19 21:59:15 UTC
Created attachment 1564 [details]
Patch to add support for OpenGL ES 3 on iOS

Currently the UIKit/EAGL backend for SDL's OpenGL context creation API doesn't support OpenGL ES 3, despite iOS 7+ being capable (on devices with the necessary hardware.)

I have attached a patch to add support. It's also slightly more future-proof, so eventual OpenGL ES 4+ capability on iOS should hopefully work without requiring changes to SDL's UIKit/EAGL backend.
Comment 1 Gabriel Jacobo 2014-02-20 14:04:06 UTC
Looks good to me. As a suggestion, it may be better to move the initialization entirely to the switch statement and error out in the "default" case (in which case the "case 3" should be entirely guarded by #ifdef __IPHONE_7_0)
Comment 2 Sam Lantinga 2014-02-22 23:23:49 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/ffece8ab18a6