Prefer the OpenGL ES 2.0 context when it's available, make it possible to create an OpenGL 2.0 context on iPhoneOS

This commit is contained in:
Sam Lantinga 2011-02-06 10:22:25 -08:00
parent ccdb593a0b
commit b1c0c48f03
8 changed files with 99 additions and 72 deletions

View file

@ -184,6 +184,9 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->info.flags = SDL_RENDERER_ACCELERATED;
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
data->context = SDL_GL_CreateContext(window);
if (!data->context) {
GLES_DestroyRenderer(renderer);