1.1 --- a/src/video/SDL_egl.c Thu Dec 12 14:55:33 2013 -0300
1.2 +++ b/src/video/SDL_egl.c Fri Dec 13 09:48:12 2013 -0300
1.3 @@ -340,7 +340,7 @@
1.4 EGL_NONE
1.5 };
1.6
1.7 - EGLContext egl_context;
1.8 + EGLContext egl_context, share_context = EGL_NO_CONTEXT;
1.9
1.10 if (!_this->egl_data) {
1.11 /* The EGL library wasn't loaded, SDL_GetError() should have info */
1.12 @@ -350,11 +350,15 @@
1.13 if (_this->gl_config.major_version) {
1.14 context_attrib_list[1] = _this->gl_config.major_version;
1.15 }
1.16 +
1.17 + if (_this->gl_config.share_with_current_context) {
1.18 + share_context = (EGLContext)SDL_GL_GetCurrentContext();
1.19 + }
1.20
1.21 egl_context =
1.22 _this->egl_data->eglCreateContext(_this->egl_data->egl_display,
1.23 _this->egl_data->egl_config,
1.24 - EGL_NO_CONTEXT, context_attrib_list);
1.25 + share_context, context_attrib_list);
1.26
1.27 if (egl_context == EGL_NO_CONTEXT) {
1.28 SDL_SetError("Could not create EGL context");