From 040cc3f38e56b1929504ab220b1093674886d714 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Wed, 7 Dec 2016 14:36:21 +0900 Subject: [PATCH] [SDL_Tizen] Blcok partial update extension + Add glViewport() in drawIndicator. Change-Id: I0871ca29d1e3280e92592366a7a639aca6975f65 Signed-off-by: huiyu.eun --- src/video/SDL_egl.c | 18 +++++++++++++++++- src/video/SDL_video.c | 12 ++++++++++++ src/video/tizen/SDL_tizenopengles.c | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c index 48c0267..c1a2dd0 100755 --- a/src/video/SDL_egl.c +++ b/src/video/SDL_egl.c @@ -124,7 +124,23 @@ SDL_EGL_GetProcAddress(_THIS, const char *proc) } } #endif - + +#ifdef __TIZEN__ + char *Tizen_Not_Support_API[4] = { + "eglSetDamageRegionKHR", + "eglSwapBuffersWithDamageEXT", + "eglSwapBuffersWithDamageINTEL", + "eglSwapBuffersWithDamage" + }; + + int i; + for(i=0; i<4; i++) + { + if(!SDL_strcmp(proc, Tizen_Not_Support_API[i])) + return NULL; + } +#endif + retval = SDL_LoadFunction(_this->egl_data->egl_dll_handle, proc); if (!retval && SDL_strlen(proc) <= 1022) { procname[0] = '_'; diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 74ce080..9acabb3 100755 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2785,6 +2785,18 @@ SDL_GL_ExtensionSupported(const char *extension) const char *exts; const char *ext_word; + char *Tizen_Not_Support_API[3] = { + "EGL_EXT_buffer_age", + "EGL_KHR_partial_update", + "EGL_EXT_swap_buffers_with_damage" + }; + + for(i=0; i<3; i++) + { + if(!SDL_strcmp(extension, Tizen_Not_Support_API[i])) + return SDL_FALSE; + } + ext_len = SDL_strlen(extension); exts = _this->egl_data->eglQueryString(_this->egl_data->egl_display, EGL_EXTENSIONS); diff --git a/src/video/tizen/SDL_tizenopengles.c b/src/video/tizen/SDL_tizenopengles.c index 853597f..fd10301 100755 --- a/src/video/tizen/SDL_tizenopengles.c +++ b/src/video/tizen/SDL_tizenopengles.c @@ -368,6 +368,7 @@ void Tizen_DrawIndicator(SDL_Window *window) { GLES2_Context Mainctx; LoadContext(&Mainctx); + Mainctx.glViewport(0, 0, window->w, window->h); Mainctx.glUseProgram(programObject); Mainctx.glBindBuffer(GL_ARRAY_BUFFER, 0); -- 2.7.4