From aa45af7fcb14923db0e0ef07fbe89eb334cdc9be Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Fri, 28 Jun 2019 16:05:20 +0200 Subject: [PATCH] Android: explicitly expand Android_GLES_MakeCurrent/Android_GLES_CreateContext from SDL_egl_c.h --- src/video/android/SDL_androidgl.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/video/android/SDL_androidgl.c b/src/video/android/SDL_androidgl.c index e5d1770d21132..d71cd9b337db6 100644 --- a/src/video/android/SDL_androidgl.c +++ b/src/video/android/SDL_androidgl.c @@ -36,8 +36,21 @@ #include -SDL_EGL_CreateContext_impl(Android) -SDL_EGL_MakeCurrent_impl(Android) +int +Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +{ + if (window && context) { + return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context); + } else { + return SDL_EGL_MakeCurrent(_this, NULL, NULL); + } +} + +SDL_GLContext +Android_GLES_CreateContext(_THIS, SDL_Window * window) +{ + return SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); +} int Android_GLES_SwapWindow(_THIS, SDL_Window * window)