Switch the OpenGL ES renderers to request EGL OpenGL contexts
authorSam Lantinga <slouken@libsdl.org>
Wed, 18 Jul 2012 15:20:32 -0700
changeset 6371 a6b1a0c31880
parent 6370 93187f7f7d5d
child 6372 76d0f2cf2ca6
Switch the OpenGL ES renderers to request EGL OpenGL contexts
src/render/opengles/SDL_render_gles.c
src/render/opengles2/SDL_render_gles2.c
--- a/src/render/opengles/SDL_render_gles.c	Wed Jul 18 15:17:27 2012 -0700
+++ b/src/render/opengles/SDL_render_gles.c	Wed Jul 18 15:20:32 2012 -0700
@@ -269,6 +269,7 @@
     GLint value;
     Uint32 windowFlags;
     
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_EGL, 1);
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
     
--- a/src/render/opengles2/SDL_render_gles2.c	Wed Jul 18 15:17:27 2012 -0700
+++ b/src/render/opengles2/SDL_render_gles2.c	Wed Jul 18 15:20:32 2012 -0700
@@ -1600,6 +1600,7 @@
     Uint32 windowFlags;
     GLint window_framebuffer;
 
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_EGL, 1);
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
     SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);