src/video/android/SDL_androidgl.c
changeset 12908 ec53745bdb23
parent 12503 806492103856
child 12910 dd9169424181
     1.1 --- a/src/video/android/SDL_androidgl.c	Wed Jun 26 13:21:43 2019 -0400
     1.2 +++ b/src/video/android/SDL_androidgl.c	Fri Jun 28 16:05:20 2019 +0200
     1.3 @@ -36,8 +36,21 @@
     1.4  
     1.5  #include <dlfcn.h>
     1.6  
     1.7 -SDL_EGL_CreateContext_impl(Android)
     1.8 -SDL_EGL_MakeCurrent_impl(Android)
     1.9 +int
    1.10 +Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
    1.11 +{
    1.12 +    if (window && context) {
    1.13 +        return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context);
    1.14 +    } else {
    1.15 +        return SDL_EGL_MakeCurrent(_this, NULL, NULL);
    1.16 +    }
    1.17 +}
    1.18 +
    1.19 +SDL_GLContext
    1.20 +Android_GLES_CreateContext(_THIS, SDL_Window * window)
    1.21 +{
    1.22 +    return SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
    1.23 +}
    1.24  
    1.25  int
    1.26  Android_GLES_SwapWindow(_THIS, SDL_Window * window)