Change Tizen_GLES_MakeCurrent to using SDL_EGL_MakeCurrent_impl 06/276406/1 accepted/tizen/unified/20220707.133427 submit/tizen/20220706.055157
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Thu, 16 Jun 2022 01:54:25 +0000 (10:54 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Thu, 16 Jun 2022 05:17:18 +0000 (14:17 +0900)
Tizen_GLES_MakeCurrent doesn't have to be implemented.
I believe that the function was copied from Wayland_GLES_MakeCurrent.

The Wayland's function has been implemented before SDL supports surfaceless_context.
It doesn't still support surfaceless_context.
To support it, the Tizen port can just use SDL_EGL_MakeCurrent_impl.

Change-Id: I7c289afc0f3dd8b1bb525833601185b58b0fc8cb

src/video/tizen/SDL_tizenopengles.c

index 6fad59e..5ec1c76 100755 (executable)
@@ -89,23 +89,8 @@ Tizen_GLES_SwapWindow(_THIS, SDL_Window *window)
     return ret;
 }
 
-int
-Tizen_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
-{
-    int ret;
+SDL_EGL_MakeCurrent_impl(Tizen)
 
-    if (window && context) {
-        ret = SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context);
-    }
-    else if(!window && context) {
-        ret = SDL_EGL_MakeCurrent(_this, NULL, context);
-    }
-    else {
-        ret = SDL_EGL_MakeCurrent(_this, NULL, NULL);
-    }
-
-    return ret;
-}
 
 void
 Tizen_GLES_DeleteContext(_THIS, SDL_GLContext context)