jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9be96f4b96f7f500c8047ca41f0c8b8aa6014e8e

commit 9be96f4b96f7f500c8047ca41f0c8b8aa6014e8e
Author: Jean-Philippe Andre <[email protected]>
Date:   Thu Nov 27 20:08:10 2014 +0900

    Evas GL: Advertise support for npot on desktop
    
    The extension name is GL_ARB_texture_non_power_of_two
    for desktop GL, but GL_OES_texture_npot for GLES.
    
    We will consider the extensions compatible, I believe
    the GLES version is a subset of the desktop one. Not sure
    if that's 100% true.
---
 src/modules/evas/engines/gl_common/evas_gl_api_ext.c     | 14 ++++++++++++++
 src/modules/evas/engines/gl_common/evas_gl_api_ext.h     |  4 ++++
 src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h | 10 ++++------
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c 
b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
index 5aaa085..a79efdd 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
@@ -23,6 +23,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 
0 };
 #define _EVASGL_EXT_BEGIN(name)
 #define _EVASGL_EXT_END()
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) ret (*glextsym_##name) 
param = NULL;
 #define _EVASGL_EXT_FUNCTION_END()
 #define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -35,6 +36,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 
0 };
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -49,6 +51,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 
0 };
 #define _EVASGL_EXT_BEGIN(name) int _gl_ext_support_##name = 0;
 #define _EVASGL_EXT_END()
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param)
 #define _EVASGL_EXT_FUNCTION_END()
 #define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -61,6 +64,7 @@ char _gl_ext_string_official[MAX_EXTENSION_STRING_BUFFER] = { 
0 };
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -316,6 +320,9 @@ re->info->info.screen);
 #define _EVASGL_EXT_DRVNAME(name) \
    if (_EVASGL_EXT_CHECK_SUPPORT(#name)) *ext_support = 1;
 
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname) \
+   if (_EVASGL_EXT_CHECK_SUPPORT(deskname)) *ext_support = 1;
+
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
      { \
         ret (**drvfunc)param = &glextsym_##name;
@@ -350,6 +357,7 @@ re->info->info.screen);
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -373,6 +381,7 @@ re->info->info.screen);
       strcat(_gl_ext_string, #name" "); \
       strcat(_gl_ext_string_official, #name" "); \
    }
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param)
 #define _EVASGL_EXT_FUNCTION_END()
 #define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -385,6 +394,7 @@ re->info->info.screen);
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -417,6 +427,7 @@ evgl_api_ext_get(Evas_GL_API *gl_funcs)
 #define _EVASGL_EXT_END() \
      }
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
    ORD(name);
 #define _EVASGL_EXT_FUNCTION_END()
@@ -436,6 +447,7 @@ evgl_api_ext_get(Evas_GL_API *gl_funcs)
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN
@@ -469,6 +481,7 @@ evgl_api_gles1_ext_get(Evas_GL_API *gl_funcs)
 #define _EVASGL_EXT_END() \
      }
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
    ORD(name);
 #define _EVASGL_EXT_FUNCTION_END()
@@ -487,6 +500,7 @@ evgl_api_gles1_ext_get(Evas_GL_API *gl_funcs)
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.h 
b/src/modules/evas/engines/gl_common/evas_gl_api_ext.h
index 91c2358..357edc9 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.h
@@ -24,6 +24,7 @@
 #define _EVASGL_EXT_BEGIN(name)
 #define _EVASGL_EXT_END()
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) extern ret 
(*glextsym_##name) param;
 #define _EVASGL_EXT_FUNCTION_END()
 #define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -36,6 +37,7 @@
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_DRVFUNC
@@ -52,6 +54,7 @@
 #define _EVASGL_EXT_BEGIN(name) extern int _gl_ext_support_##name;
 #define _EVASGL_EXT_END()
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param)
 #define _EVASGL_EXT_FUNCTION_END()
 #define _EVASGL_EXT_FUNCTION_DRVFUNC(name)
@@ -64,6 +67,7 @@
 #undef _EVASGL_EXT_BEGIN
 #undef _EVASGL_EXT_END
 #undef _EVASGL_EXT_DRVNAME
+#undef _EVASGL_EXT_DRVNAME_DESKTOP
 #undef _EVASGL_EXT_FUNCTION_BEGIN
 #undef _EVASGL_EXT_FUNCTION_END
 #undef _EVASGL_EXT_FUNCTION_DRVFUNC
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h 
b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
index 0f518ed..135ce74 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
@@ -14,6 +14,7 @@
 
 // Driver extensions to wrap (name : SPEC extension name)
 #define _EVASGL_EXT_DRVNAME(name)
+#define _EVASGL_EXT_DRVNAME_DESKTOP(deskname)
 
 // These functions will be exported to 'EVAS extension function'.
 // The functions of this block must correspond with the functions list in 
Evas_GL.h.
@@ -375,12 +376,9 @@ _EVASGL_EXT_BEGIN(texture_half_float_linear)
        _EVASGL_EXT_DRVNAME(GL_OES_texture_half_float_linear)
 _EVASGL_EXT_END()
 
-_EVASGL_EXT_BEGIN(texture_npot)     // Desktop differs
-       _EVASGL_EXT_DRVNAME(GL_OES_texture_npot)
-_EVASGL_EXT_END()
-
-_EVASGL_EXT_BEGIN(texture_npot_DESKTOP)     // Desktop differs
-       _EVASGL_EXT_DRVNAME(GL_OES_texture_npot)
+_EVASGL_EXT_BEGIN(texture_npot)
+        _EVASGL_EXT_DRVNAME(GL_OES_texture_npot)
+        _EVASGL_EXT_DRVNAME_DESKTOP("GL_ARB_texture_non_power_of_two")
 _EVASGL_EXT_END()
 
 _EVASGL_EXT_BEGIN(vertex_half_float)     // Desktop differs

-- 


Reply via email to