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 1342

Summary: SDL_CreateRenderer creates OpenGL ES 2.0 renderer in iPhone 3G using default index (-1)
Product: SDL Reporter: Rodrigo Cardoso <rodrigo.alfenas>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2    
Version: HG 2.0   
Hardware: iPhone/iPod touch   
OS: iOS (All)   

Description Rodrigo Cardoso 2011-12-14 15:28:59 UTC
SDL should not list OpenGL ES 2.0 renderer as supported when running on these iOS devices:

- iPhone 1st gen
- iPhone 3G
- iPod Touch 1st gen
- iPod Touch 2nd gen

And, in fact, it does, and using the default index option (-1) it tries to create a GLES2 context and Crashes.
Tested on a iPhone 3G with iOS 4.2.1

SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

A temporary workaround is setting the index to 1.



Sorry about my bad english.
Comment 1 Sam Lantinga 2012-01-07 19:37:26 UTC
The renderer is still in the list (being in the list just means it's compiled into SDL, not that it'll work on your current system) but it now correctly detects that it's not supported and falls back to OpenGL ES 1.
http://hg.libsdl.org/SDL/rev/a83eb92704f3

Thanks!