Disable desktop OpenGL for EGL under Android
authorGabriel Jacobo <gabomdq@gmail.com>
Sat, 28 Jun 2014 12:48:29 -0300
changeset 8964 d9ac759bb62a
parent 8963 f94215b55583
child 8965 8eceea447276
Disable desktop OpenGL for EGL under Android
src/video/SDL_egl.c
--- a/src/video/SDL_egl.c	Sat Jun 28 12:36:44 2014 -0300
+++ b/src/video/SDL_egl.c	Sat Jun 28 12:48:29 2014 -0300
@@ -416,7 +416,9 @@
     }
     
     /* Bind the API */
+#if !__ANDROID__ /* No support for desktop OpenGL on Android */
     if(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
+#endif /* !__ANDROID__ */        
         _this->egl_data->eglBindAPI(EGL_OPENGL_ES_API);
         if (_this->gl_config.major_version) {
             context_attrib_list[1] = _this->gl_config.major_version;
@@ -425,6 +427,8 @@
         egl_context = _this->egl_data->eglCreateContext(_this->egl_data->egl_display,
                                           _this->egl_data->egl_config,
                                           share_context, context_attrib_list);
+
+#if !__ANDROID__
     }
     else {
         _this->egl_data->eglBindAPI(EGL_OPENGL_API);
@@ -452,6 +456,7 @@
                                           _this->egl_data->egl_config,
                                           share_context, context_attrib_list);
     }
+#endif /* !__ANDROID__ */
     
     if (egl_context == EGL_NO_CONTEXT) {
         SDL_SetError("Could not create EGL context");