Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Disable desktop OpenGL for EGL under Android
  • Loading branch information
gabomdq committed Jun 28, 2014
1 parent 1ed1f7f commit a9bb889
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/video/SDL_egl.c
Expand Up @@ -416,7 +416,9 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
}

/* 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;
Expand All @@ -425,6 +427,8 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
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);
Expand Down Expand Up @@ -452,6 +456,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
_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");
Expand Down

0 comments on commit a9bb889

Please sign in to comment.