diff src/render/opengles/SDL_render_gles.c @ 5212:115fff0641ee

Prefer the OpenGL ES 2.0 context when it's available, make it possible to create an OpenGL 2.0 context on iPhoneOS
author Sam Lantinga <slouken@libsdl.org>
date Sun, 06 Feb 2011 10:22:25 -0800
parents daa5463466c5
children 2178ffe17222
line wrap: on
line diff
--- a/src/render/opengles/SDL_render_gles.c	Sun Feb 06 09:02:10 2011 -0800
+++ b/src/render/opengles/SDL_render_gles.c	Sun Feb 06 10:22:25 2011 -0800
@@ -184,6 +184,9 @@
 
     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);