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 1572

Summary: Earlier iphone versions dont support opengles2
Product: SDL Reporter: onaips
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 Keywords: target-2.0.0
Version: HG 2.0   
Hardware: iPhone/iPod touch   
OS: iOS 4   
Attachments: bugfix diff

Description onaips 2012-08-16 16:45:25 UTC
I ran into an error when using SDL2.0 (latest hg) on iOS, specifically on iPhone3G with 4.2.1 version.

The fact is that this device does not support OGL_ES2, which is causing the CreateRenderer function with no specific renderer to try to create a opengles2 context. Despite the fact that this is actually predicted, the CreateRenderer function instantiates view classes that create touch drivers, thus duplicating them on the "touch" subsystem and making them unusable.

From http://pt.wikipedia.org/wiki/IPhone, one can see that iPhone and iPhone3G are the only armv6 devices of the iOS family, which also do not support OGL_ES2, furthermore we can fix this by macro checking for armv6 devices. Another fix would be to restrict the touch device creation to the supported video driver (modifying video/uikit specific source files).

Suggested patch in attachement
Comment 1 onaips 2012-08-16 16:46:03 UTC
Created attachment 928 [details]
bugfix diff
Comment 2 Ryan C. Gordon 2013-07-12 22:15:22 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 2.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 3 Sam Lantinga 2013-07-13 02:31:42 UTC
I tested this on iOS 5.1 by forcing the OpenGL ES 2 context creation to fail, and an OpenGL ES 1 context was created and worked with no problems.  Touch was fine, and looking at the code there's no reason why initializing the touch device twice would cause problems.

I don't have a way to test on older iOS hardware, and the official SDL release will support iOS 5.1.1 and newer, so I'm going to leave this as-is for now.

It may be that this has been fixed since the bug was reported. Feel free to reopen this bug if it's still happening and you find out more information about why the fallback is failing for you.

Cheers!