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 - SDL_CreateRenderer creates OpenGL ES 2.0 renderer in iPhone 3G using default index (-1)
Summary: SDL_CreateRenderer creates OpenGL ES 2.0 renderer in iPhone 3G using default ...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: iPhone/iPod touch iOS (All)
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 15:28 UTC by Rodrigo Cardoso
Modified: 2012-01-07 19:37 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 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!