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 1274

Summary: opengles consistency between SDL_GL_CreateContext and SDL_CreateRenderer
Product: SDL Reporter: Vittorio Giovara <vitto.giova>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: xzl_sz
Version: HG 2.0   
Hardware: iPhone/iPod touch   
OS: iOS (All)   

Description Vittorio Giovara 2011-08-14 15:16:20 UTC
On iOS SDL_GL_CreateContext creates by default an opengles 1.1 context, and in case you want an opengles 2.0 you have to explicitly say so with SLG_GL_SetAttribute().
However when you create a renderer, you don't get the same context, and to achieve an opengles 1.1 compatible context you have to set SDL_SetHint('SDL_RENDER_DRIVER','opengles').

Would it be possible to have a similar behavior for both mechanisms? The gles 1.1 context should be the one enabled by default in any situation for compatibility.
Comment 1 Sam Lantinga 2012-01-07 22:18:24 UTC
The OpenGL ES 2.0 renderer is faster and more fully featured, so it's the default on iOS.  When you use the render API you're not intended to mix it with native OpenGL calls and you're not intended to know or care what the underlying systems are.

If the underlying renderer is important to you, you should initialize the renderer you want, and this is not an issue anyway.

There was a bug where SDL would crash trying to create an OpenGL ES 2.0 context on old hardware, which is now fixed.