diff options
author | Carsten Haitzler <raster@rasterman.com> | 2012-09-24 03:33:43 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2012-09-24 03:33:43 +0000 |
commit | cde875d4381f75433eeb41bf8ca83d868cfe850a (patch) | |
tree | 1f3f8f5d2b33fb63e159f4be238985280e211809 /legacy/evas/src/modules | |
parent | 15aa383ae8b371e79b85b4372446600879d23303 (diff) |
and simplify gles suport to #ifdef GL_GLES :) we dont need sgx+6410
stuff anymore.
SVN revision: 77028
Diffstat (limited to '')
11 files changed, 114 insertions, 215 deletions
diff --git a/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c b/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c index abcc43d553..60d6f93e9d 100644 --- a/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c | |||
@@ -1106,7 +1106,7 @@ evgl_glBindRenderbuffer(GLenum target, GLuint renderbuffer) | |||
1106 | static void | 1106 | static void |
1107 | evgl_glClearDepthf(GLclampf depth) | 1107 | evgl_glClearDepthf(GLclampf depth) |
1108 | { | 1108 | { |
1109 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1109 | #ifdef GL_GLES |
1110 | glClearDepthf(depth); | 1110 | glClearDepthf(depth); |
1111 | #else | 1111 | #else |
1112 | glClearDepth(depth); | 1112 | glClearDepth(depth); |
@@ -1116,7 +1116,7 @@ evgl_glClearDepthf(GLclampf depth) | |||
1116 | static void | 1116 | static void |
1117 | evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) | 1117 | evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) |
1118 | { | 1118 | { |
1119 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1119 | #ifdef GL_GLES |
1120 | glDepthRangef(zNear, zFar); | 1120 | glDepthRangef(zNear, zFar); |
1121 | #else | 1121 | #else |
1122 | glDepthRange(zNear, zFar); | 1122 | glDepthRange(zNear, zFar); |
@@ -1126,7 +1126,7 @@ evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) | |||
1126 | static void | 1126 | static void |
1127 | evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) | 1127 | evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) |
1128 | { | 1128 | { |
1129 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1129 | #ifdef GL_GLES |
1130 | glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); | 1130 | glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); |
1131 | #else | 1131 | #else |
1132 | if (range) | 1132 | if (range) |
@@ -1146,7 +1146,7 @@ evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* | |||
1146 | static void | 1146 | static void |
1147 | evgl_glReleaseShaderCompiler(void) | 1147 | evgl_glReleaseShaderCompiler(void) |
1148 | { | 1148 | { |
1149 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1149 | #ifdef GL_GLES |
1150 | glReleaseShaderCompiler(); | 1150 | glReleaseShaderCompiler(); |
1151 | #else | 1151 | #else |
1152 | #endif | 1152 | #endif |
@@ -1155,7 +1155,7 @@ evgl_glReleaseShaderCompiler(void) | |||
1155 | static void | 1155 | static void |
1156 | evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) | 1156 | evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) |
1157 | { | 1157 | { |
1158 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1158 | #ifdef GL_GLES |
1159 | glShaderBinary(n, shaders, binaryformat, binary, length); | 1159 | glShaderBinary(n, shaders, binaryformat, binary, length); |
1160 | #else | 1160 | #else |
1161 | // FIXME: need to dlsym/getprocaddress for this | 1161 | // FIXME: need to dlsym/getprocaddress for this |
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h index d8f02ffa8e..f8c6f1658d 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h | |||
@@ -20,19 +20,15 @@ | |||
20 | # include <OpenGL/glext.h> | 20 | # include <OpenGL/glext.h> |
21 | #else | 21 | #else |
22 | # ifdef _EVAS_ENGINE_SDL_H | 22 | # ifdef _EVAS_ENGINE_SDL_H |
23 | # if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) | 23 | # ifdef GL_GLES |
24 | # include <SDL/SDL_opengles.h> | 24 | # include <SDL/SDL_opengles.h> |
25 | # else | 25 | # else |
26 | # include <SDL/SDL_opengl.h> | 26 | # include <SDL/SDL_opengl.h> |
27 | # endif | 27 | # endif |
28 | # else | 28 | # else |
29 | # if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 29 | # ifdef GL_GLES |
30 | # if defined(GLES_VARIETY_S3C6410) | 30 | # include <GLES2/gl2.h> |
31 | # include <GLES2/gl2.h> | 31 | # include <GLES2/gl2ext.h> |
32 | # elif defined(GLES_VARIETY_SGX) | ||
33 | # include <GLES2/gl2.h> | ||
34 | # include <GLES2/gl2ext.h> | ||
35 | # endif | ||
36 | # else | 32 | # else |
37 | # include <GL/gl.h> | 33 | # include <GL/gl.h> |
38 | # include <GL/glext.h> | 34 | # include <GL/glext.h> |
@@ -354,7 +350,7 @@ struct _Evas_Engine_GL_Context | |||
354 | /* If this is set: Force drawing with a particular filter */ | 350 | /* If this is set: Force drawing with a particular filter */ |
355 | GLuint filter_prog; | 351 | GLuint filter_prog; |
356 | 352 | ||
357 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 353 | #ifdef GL_GLES |
358 | // FIXME: hack. expose egl display to gl core for egl image sec extn. | 354 | // FIXME: hack. expose egl display to gl core for egl image sec extn. |
359 | void *egldisp; | 355 | void *egldisp; |
360 | #endif | 356 | #endif |
@@ -649,7 +645,7 @@ extern void (*glsym_glReleaseShaderCompiler)(void); | |||
649 | extern void *(*glsym_glMapBuffer) (GLenum a, GLenum b); | 645 | extern void *(*glsym_glMapBuffer) (GLenum a, GLenum b); |
650 | extern GLboolean (*glsym_glUnmapBuffer) (GLenum a); | 646 | extern GLboolean (*glsym_glUnmapBuffer) (GLenum a); |
651 | 647 | ||
652 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 648 | #ifdef GL_GLES |
653 | extern void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e); | 649 | extern void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e); |
654 | extern unsigned int (*secsym_eglDestroyImage) (void *a, void *b); | 650 | extern unsigned int (*secsym_eglDestroyImage) (void *a, void *b); |
655 | extern void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b); | 651 | extern void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b); |
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c index b9c10039ca..0f19cbdffc 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c | |||
@@ -27,7 +27,7 @@ void (*glsym_glReleaseShaderCompiler)(void) = NULL; | |||
27 | void *(*glsym_glMapBuffer) (GLenum a, GLenum b) = NULL; | 27 | void *(*glsym_glMapBuffer) (GLenum a, GLenum b) = NULL; |
28 | GLboolean (*glsym_glUnmapBuffer) (GLenum a) = NULL; | 28 | GLboolean (*glsym_glUnmapBuffer) (GLenum a) = NULL; |
29 | 29 | ||
30 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 30 | #ifdef GL_GLES |
31 | // just used for finding symbols :) | 31 | // just used for finding symbols :) |
32 | typedef void (*_eng_fn) (void); | 32 | typedef void (*_eng_fn) (void); |
33 | 33 | ||
@@ -118,7 +118,7 @@ gl_symbols(void) | |||
118 | FINDSYM(glsym_glUnmapBuffer, "glUnmapBufferKHR", glsym_func_boolean); | 118 | FINDSYM(glsym_glUnmapBuffer, "glUnmapBufferKHR", glsym_func_boolean); |
119 | } | 119 | } |
120 | 120 | ||
121 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 121 | #ifdef GL_GLES |
122 | #undef FINDSYM | 122 | #undef FINDSYM |
123 | #define FINDSYM(dst, sym, typ) \ | 123 | #define FINDSYM(dst, sym, typ) \ |
124 | if ((!dst) && (secsym_eglGetProcAddress)) dst = (typ)secsym_eglGetProcAddress(sym); \ | 124 | if ((!dst) && (secsym_eglGetProcAddress)) dst = (typ)secsym_eglGetProcAddress(sym); \ |
@@ -558,7 +558,7 @@ evas_gl_common_context_new(void) | |||
558 | (strstr((char *)ext, "GL_EXT_texture_format_BGRA8888"))) | 558 | (strstr((char *)ext, "GL_EXT_texture_format_BGRA8888"))) |
559 | shared->info.bgra = 1; | 559 | shared->info.bgra = 1; |
560 | #endif | 560 | #endif |
561 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 561 | #ifdef GL_GLES |
562 | // FIXME: there should be an extension name/string to check for | 562 | // FIXME: there should be an extension name/string to check for |
563 | // not just symbols in the lib | 563 | // not just symbols in the lib |
564 | i = 0; | 564 | i = 0; |
@@ -993,7 +993,7 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, | |||
993 | 993 | ||
994 | gc->pipe[0].shader.surface = surface; | 994 | gc->pipe[0].shader.surface = surface; |
995 | gc->change.size = 1; | 995 | gc->change.size = 1; |
996 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 996 | #ifdef GL_GLES |
997 | # ifndef GL_FRAMEBUFFER | 997 | # ifndef GL_FRAMEBUFFER |
998 | # define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES | 998 | # define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES |
999 | # endif | 999 | # endif |
@@ -2425,7 +2425,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc) | |||
2425 | } | 2425 | } |
2426 | if (gc->pipe[i].array.im) | 2426 | if (gc->pipe[i].array.im) |
2427 | { | 2427 | { |
2428 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2428 | #ifdef GL_GLES |
2429 | if (gc->pipe[i].array.im->tex->pt->dyn.img) | 2429 | if (gc->pipe[i].array.im->tex->pt->dyn.img) |
2430 | { | 2430 | { |
2431 | secsym_glEGLImageTargetTexture2DOES | 2431 | secsym_glEGLImageTargetTexture2DOES |
@@ -2693,7 +2693,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc) | |||
2693 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 2693 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
2694 | glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); | 2694 | glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); |
2695 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 2695 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
2696 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2696 | #ifdef GL_GLES |
2697 | if (gc->pipe[i].shader.cur_texu_dyn) | 2697 | if (gc->pipe[i].shader.cur_texu_dyn) |
2698 | secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); | 2698 | secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); |
2699 | #endif | 2699 | #endif |
@@ -2702,7 +2702,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc) | |||
2702 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 2702 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
2703 | glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv); | 2703 | glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv); |
2704 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 2704 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
2705 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2705 | #ifdef GL_GLES |
2706 | if (gc->pipe[i].shader.cur_texv_dyn) | 2706 | if (gc->pipe[i].shader.cur_texv_dyn) |
2707 | secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv_dyn); | 2707 | secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv_dyn); |
2708 | #endif | 2708 | #endif |
@@ -2720,7 +2720,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc) | |||
2720 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 2720 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
2721 | glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); | 2721 | glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); |
2722 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 2722 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
2723 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2723 | #ifdef GL_GLES |
2724 | if (gc->pipe[i].shader.cur_texu_dyn) | 2724 | if (gc->pipe[i].shader.cur_texu_dyn) |
2725 | secsym_glEGLImageTargetTexture2DOES | 2725 | secsym_glEGLImageTargetTexture2DOES |
2726 | (GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); | 2726 | (GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); |
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_shader.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_shader.c index 68b62d7e3e..477e47072f 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_shader.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_shader.c | |||
@@ -736,7 +736,7 @@ _evas_gl_common_shader_program_source_init(Evas_GL_Program *p, | |||
736 | } | 736 | } |
737 | 737 | ||
738 | p->prog = glCreateProgram(); | 738 | p->prog = glCreateProgram(); |
739 | #if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) | 739 | #ifdef GL_GLES |
740 | #else | 740 | #else |
741 | if ((glsym_glGetProgramBinary) && (glsym_glProgramParameteri)) | 741 | if ((glsym_glGetProgramBinary) && (glsym_glProgramParameteri)) |
742 | glsym_glProgramParameteri(p->prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, | 742 | glsym_glProgramParameteri(p->prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, |
@@ -940,7 +940,7 @@ evas_gl_common_shader_program_init(Evas_GL_Shared *shared) | |||
940 | void | 940 | void |
941 | evas_gl_common_shader_program_init_done(void) | 941 | evas_gl_common_shader_program_init_done(void) |
942 | { | 942 | { |
943 | #if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) | 943 | #ifdef GL_GLES |
944 | glReleaseShaderCompiler(); | 944 | glReleaseShaderCompiler(); |
945 | #else | 945 | #else |
946 | if (glsym_glReleaseShaderCompiler) glsym_glReleaseShaderCompiler(); | 946 | if (glsym_glReleaseShaderCompiler) glsym_glReleaseShaderCompiler(); |
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c index 396079329b..d4bb4c771b 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | static const GLenum rgba_fmt = GL_RGBA; | 3 | static const GLenum rgba_fmt = GL_RGBA; |
4 | static const GLenum rgba_ifmt = GL_RGBA; | 4 | static const GLenum rgba_ifmt = GL_RGBA; |
5 | //#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 5 | //#ifdef GL_GLES |
6 | //static const GLenum rgb_fmt = GL_RGBA; | 6 | //static const GLenum rgb_fmt = GL_RGBA; |
7 | //static const GLenum rgb_ifmt = GL_RGBA; | 7 | //static const GLenum rgb_ifmt = GL_RGBA; |
8 | //#else | 8 | //#else |
@@ -10,7 +10,7 @@ static const GLenum rgb_fmt = GL_RGBA; | |||
10 | static const GLenum rgb_ifmt = GL_RGB; | 10 | static const GLenum rgb_ifmt = GL_RGB; |
11 | //#endif | 11 | //#endif |
12 | #ifdef GL_BGRA | 12 | #ifdef GL_BGRA |
13 | # if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 13 | # ifdef GL_GLES |
14 | static const GLenum bgra_fmt = GL_BGRA; | 14 | static const GLenum bgra_fmt = GL_BGRA; |
15 | static const GLenum bgra_ifmt = GL_BGRA; | 15 | static const GLenum bgra_ifmt = GL_BGRA; |
16 | static const GLenum bgr_fmt = GL_BGRA; | 16 | static const GLenum bgr_fmt = GL_BGRA; |
@@ -322,7 +322,7 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im) | |||
322 | &u, &v, &l_after, | 322 | &u, &v, &l_after, |
323 | gc->shared->info.tune.atlas.max_alloc_size); | 323 | gc->shared->info.tune.atlas.max_alloc_size); |
324 | else | 324 | else |
325 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 325 | #ifdef GL_GLES |
326 | tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, | 326 | tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, |
327 | im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, | 327 | im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, |
328 | &u, &v, &l_after, | 328 | &u, &v, &l_after, |
@@ -371,7 +371,7 @@ _pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, in | |||
371 | pt->dataformat = GL_UNSIGNED_BYTE; | 371 | pt->dataformat = GL_UNSIGNED_BYTE; |
372 | pt->render = 1; | 372 | pt->render = 1; |
373 | pt->references = 0; | 373 | pt->references = 0; |
374 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 374 | #ifdef GL_GLES |
375 | # ifndef GL_FRAMEBUFFER | 375 | # ifndef GL_FRAMEBUFFER |
376 | # define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES | 376 | # define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES |
377 | # endif | 377 | # endif |
@@ -456,7 +456,7 @@ _pool_tex_native_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, in | |||
456 | glBindTexture(im->native.target, pt->texture); | 456 | glBindTexture(im->native.target, pt->texture); |
457 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 457 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
458 | 458 | ||
459 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 459 | #ifdef GL_GLES |
460 | #else | 460 | #else |
461 | if (im->native.loose) | 461 | if (im->native.loose) |
462 | { | 462 | { |
@@ -485,7 +485,7 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i | |||
485 | { | 485 | { |
486 | Evas_GL_Texture_Pool *pt = NULL; | 486 | Evas_GL_Texture_Pool *pt = NULL; |
487 | 487 | ||
488 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 488 | #ifdef GL_GLES |
489 | int fmt; // EGL_MAP_GL_TEXTURE_RGBA_SEC or EGL_MAP_GL_TEXTURE_RGB_SEC or bust | 489 | int fmt; // EGL_MAP_GL_TEXTURE_RGBA_SEC or EGL_MAP_GL_TEXTURE_RGB_SEC or bust |
490 | int pixtype; // EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC or bust | 490 | int pixtype; // EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC or bust |
491 | int attr[] = | 491 | int attr[] = |
@@ -600,7 +600,7 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i | |||
600 | return pt; | 600 | return pt; |
601 | 601 | ||
602 | /* ERROR HANDLING */ | 602 | /* ERROR HANDLING */ |
603 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 603 | #ifdef GL_GLES |
604 | error: | 604 | error: |
605 | secsym_eglDestroyImage(egldisplay, pt->dyn.img); | 605 | secsym_eglDestroyImage(egldisplay, pt->dyn.img); |
606 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); | 606 | GLERR(__FUNCTION__, __FILE__, __LINE__, ""); |
@@ -652,7 +652,7 @@ evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt) | |||
652 | 652 | ||
653 | _print_tex_count(); | 653 | _print_tex_count(); |
654 | 654 | ||
655 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 655 | #ifdef GL_GLES |
656 | if (pt->dyn.img) | 656 | if (pt->dyn.img) |
657 | { | 657 | { |
658 | if (pt->dyn.checked_out > 0) | 658 | if (pt->dyn.checked_out > 0) |
@@ -1292,7 +1292,7 @@ evas_gl_common_texture_nv12_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsign | |||
1292 | { | 1292 | { |
1293 | Evas_GL_Texture *tex; | 1293 | Evas_GL_Texture *tex; |
1294 | 1294 | ||
1295 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1295 | #ifdef GL_GLES |
1296 | tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); | 1296 | tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); |
1297 | if (!tex) | 1297 | if (!tex) |
1298 | #endif | 1298 | #endif |
@@ -1307,7 +1307,7 @@ evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, u | |||
1307 | { | 1307 | { |
1308 | Evas_GL_Texture *tex = NULL; | 1308 | Evas_GL_Texture *tex = NULL; |
1309 | 1309 | ||
1310 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1310 | #ifdef GL_GLES |
1311 | tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); | 1311 | tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); |
1312 | if (!tex) | 1312 | if (!tex) |
1313 | #endif | 1313 | #endif |
@@ -1439,7 +1439,7 @@ evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **rows, unsi | |||
1439 | mb_w = w / 64 + (w % 64 ? 1 : 0); | 1439 | mb_w = w / 64 + (w % 64 ? 1 : 0); |
1440 | mb_h = h / 32 + (h % 32 ? 1 : 0); | 1440 | mb_h = h / 32 + (h % 32 ? 1 : 0); |
1441 | 1441 | ||
1442 | #if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) | 1442 | #ifdef GL_GLES |
1443 | if (tex->dyn) | 1443 | if (tex->dyn) |
1444 | { | 1444 | { |
1445 | char *texture_addr; | 1445 | char *texture_addr; |
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c index 8a27f1f94b..9e014910fc 100644 --- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c | |||
@@ -243,7 +243,7 @@ eng_output_flush(void *data) | |||
243 | re->draw.drew = 0; | 243 | re->draw.drew = 0; |
244 | 244 | ||
245 | #if 0 | 245 | #if 0 |
246 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 246 | #ifdef GL_GLES |
247 | // glFlush(); | 247 | // glFlush(); |
248 | eglSwapBuffers(re->egl_disp, re->egl_surface[0]); | 248 | eglSwapBuffers(re->egl_disp, re->egl_surface[0]); |
249 | #else | 249 | #else |
@@ -499,7 +499,7 @@ struct _Native | |||
499 | { | 499 | { |
500 | Evas_Native_Surface ns; | 500 | Evas_Native_Surface ns; |
501 | 501 | ||
502 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 502 | #ifdef GL_GLES |
503 | EGLSurface egl_surface; | 503 | EGLSurface egl_surface; |
504 | #endif | 504 | #endif |
505 | }; | 505 | }; |
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h index 7d46720d34..adc03b9357 100644 --- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h +++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include "config.h" | 6 | #include "config.h" |
7 | #include <SDL/SDL.h> | 7 | #include <SDL/SDL.h> |
8 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 8 | #ifdef GL_GLES |
9 | # include <EGL/egl.h> | 9 | # include <EGL/egl.h> |
10 | # include <SDL/SDL_opengles.h> | 10 | # include <SDL/SDL_opengles.h> |
11 | # ifdef HAVE_SDL_FLAG_OPENGLES | 11 | # ifdef HAVE_SDL_FLAG_OPENGLES |
@@ -61,7 +61,7 @@ struct _Render_Engine | |||
61 | int drew : 1; | 61 | int drew : 1; |
62 | int x1, y1, x2, y2; | 62 | int x1, y1, x2, y2; |
63 | } draw; | 63 | } draw; |
64 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 64 | #ifdef GL_GLES |
65 | EGLContext egl_context[1]; | 65 | EGLContext egl_context[1]; |
66 | EGLSurface egl_surface[1]; | 66 | EGLSurface egl_surface[1]; |
67 | EGLConfig egl_config; | 67 | EGLConfig egl_config; |
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c index 9c6b731e70..829a29e03e 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c | |||
@@ -10,15 +10,6 @@ | |||
10 | #define EVAS_GL_NO_GL_H_CHECK 1 | 10 | #define EVAS_GL_NO_GL_H_CHECK 1 |
11 | #include "Evas_GL.h" | 11 | #include "Evas_GL.h" |
12 | 12 | ||
13 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | ||
14 | // EGL / GLES | ||
15 | # if defined(GLES_VARIETY_S3C6410) | ||
16 | # elif defined(GLES_VARIETY_SGX) | ||
17 | # endif | ||
18 | #else | ||
19 | // GLX | ||
20 | #endif | ||
21 | |||
22 | typedef struct _Render_Engine Render_Engine; | 13 | typedef struct _Render_Engine Render_Engine; |
23 | typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; | 14 | typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; |
24 | typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; | 15 | typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; |
@@ -92,7 +83,7 @@ struct _Render_Engine_GL_Surface | |||
92 | GLuint rb_depth_stencil; | 83 | GLuint rb_depth_stencil; |
93 | GLenum rb_depth_stencil_fmt; | 84 | GLenum rb_depth_stencil_fmt; |
94 | 85 | ||
95 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 86 | #ifdef GL_GLES |
96 | EGLSurface direct_sfc; | 87 | EGLSurface direct_sfc; |
97 | #else | 88 | #else |
98 | Window direct_sfc; | 89 | Window direct_sfc; |
@@ -104,7 +95,7 @@ struct _Render_Engine_GL_Surface | |||
104 | struct _Render_Engine_GL_Context | 95 | struct _Render_Engine_GL_Context |
105 | { | 96 | { |
106 | int initialized; | 97 | int initialized; |
107 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 98 | #ifdef GL_GLES |
108 | EGLContext context; | 99 | EGLContext context; |
109 | #else | 100 | #else |
110 | GLXContext context; | 101 | GLXContext context; |
@@ -122,7 +113,7 @@ struct _Render_Engine_GL_Context | |||
122 | struct _Render_Engine_GL_Resource | 113 | struct _Render_Engine_GL_Resource |
123 | { | 114 | { |
124 | // Resource context/surface per Thread in TLS for evasgl use | 115 | // Resource context/surface per Thread in TLS for evasgl use |
125 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 116 | #ifdef GL_GLES |
126 | EGLContext context; | 117 | EGLContext context; |
127 | EGLSurface surface; | 118 | EGLSurface surface; |
128 | #else | 119 | #else |
@@ -165,7 +156,7 @@ typedef unsigned char (*glsym_func_uchar) (); | |||
165 | typedef unsigned char *(*glsym_func_uchar_ptr) (); | 156 | typedef unsigned char *(*glsym_func_uchar_ptr) (); |
166 | typedef const char *(*glsym_func_const_char_ptr) (); | 157 | typedef const char *(*glsym_func_const_char_ptr) (); |
167 | 158 | ||
168 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 159 | #ifdef GL_GLES |
169 | 160 | ||
170 | #ifndef EGL_NATIVE_PIXMAP_KHR | 161 | #ifndef EGL_NATIVE_PIXMAP_KHR |
171 | # define EGL_NATIVE_PIXMAP_KHR 0x30b0 | 162 | # define EGL_NATIVE_PIXMAP_KHR 0x30b0 |
@@ -256,7 +247,7 @@ void (*glsym_glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertyp | |||
256 | 247 | ||
257 | //------ GLES 2.0 Extensions supported in EvasGL -----// | 248 | //------ GLES 2.0 Extensions supported in EvasGL -----// |
258 | static Extension_Entry _gl_ext_entries[] = { | 249 | static Extension_Entry _gl_ext_entries[] = { |
259 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 250 | #ifdef GL_GLES |
260 | //--- Function Extensions ---// | 251 | //--- Function Extensions ---// |
261 | { "GL_OES_get_program_binary", "get_program_binary", 0 }, | 252 | { "GL_OES_get_program_binary", "get_program_binary", 0 }, |
262 | { "GL_OES_mapbuffer", "mapbuffer", 0 }, | 253 | { "GL_OES_mapbuffer", "mapbuffer", 0 }, |
@@ -353,7 +344,7 @@ static Extension_Entry _gl_ext_entries[] = { | |||
353 | 344 | ||
354 | //------ Extensions supported in EvasGL -----// | 345 | //------ Extensions supported in EvasGL -----// |
355 | static Extension_Entry _evasgl_ext_entries[] = { | 346 | static Extension_Entry _evasgl_ext_entries[] = { |
356 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 347 | #ifdef GL_GLES |
357 | { "EvasGL_KHR_image", "EGL_KHR_image", 0 }, | 348 | { "EvasGL_KHR_image", "EGL_KHR_image", 0 }, |
358 | { "EvasGL_KHR_vg_parent_image", "EGL_KHR_vg_parent_image", 0 }, | 349 | { "EvasGL_KHR_vg_parent_image", "EGL_KHR_vg_parent_image", 0 }, |
359 | { "EvasGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_2D_image", 0 }, | 350 | { "EvasGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_2D_image", 0 }, |
@@ -372,7 +363,7 @@ _gl_ext_sym_init(void) | |||
372 | 363 | ||
373 | if (done) return; | 364 | if (done) return; |
374 | 365 | ||
375 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 366 | #ifdef GL_GLES |
376 | #define FINDSYM(dst, sym, typ) \ | 367 | #define FINDSYM(dst, sym, typ) \ |
377 | if ((!dst) && (glsym_eglGetProcAddress)) dst = (typ)glsym_eglGetProcAddress(sym); \ | 368 | if ((!dst) && (glsym_eglGetProcAddress)) dst = (typ)glsym_eglGetProcAddress(sym); \ |
378 | if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) | 369 | if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) |
@@ -649,7 +640,7 @@ _gl_ext_init(Render_Engine *re) | |||
649 | } | 640 | } |
650 | DBG(" "); | 641 | DBG(" "); |
651 | 642 | ||
652 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 643 | #ifdef GL_GLES |
653 | // EGL Extensions | 644 | // EGL Extensions |
654 | if (glsym_eglQueryString) | 645 | if (glsym_eglQueryString) |
655 | { | 646 | { |
@@ -798,7 +789,7 @@ _create_internal_glue_resources(void *data) | |||
798 | 789 | ||
799 | if (!rsc) return NULL; | 790 | if (!rsc) return NULL; |
800 | 791 | ||
801 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 792 | #ifdef GL_GLES |
802 | // EGL | 793 | // EGL |
803 | int context_attrs[3]; | 794 | int context_attrs[3]; |
804 | context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; | 795 | context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; |
@@ -889,7 +880,7 @@ _destroy_internal_glue_resources(void *data) | |||
889 | Render_Engine_GL_Resource *rsc; | 880 | Render_Engine_GL_Resource *rsc; |
890 | 881 | ||
891 | LKL(resource_lock); | 882 | LKL(resource_lock); |
892 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 883 | #ifdef GL_GLES |
893 | // EGL | 884 | // EGL |
894 | // Delete the Resources | 885 | // Delete the Resources |
895 | EINA_LIST_FOREACH(resource_list, l, rsc) | 886 | EINA_LIST_FOREACH(resource_list, l, rsc) |
@@ -954,7 +945,7 @@ _internal_resources_make_current(void *data) | |||
954 | } | 945 | } |
955 | 946 | ||
956 | // Use resource surface/context to create surface resrouces | 947 | // Use resource surface/context to create surface resrouces |
957 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 948 | #ifdef GL_GLES |
958 | // Update the evas' window surface | 949 | // Update the evas' window surface |
959 | if (eina_main_loop_is()) rsc->surface = re->win->egl_surface[0]; | 950 | if (eina_main_loop_is()) rsc->surface = re->win->egl_surface[0]; |
960 | 951 | ||
@@ -985,7 +976,7 @@ eng_setup(Evas *e, void *in) | |||
985 | info = (Evas_Engine_Info_GL_X11 *)in; | 976 | info = (Evas_Engine_Info_GL_X11 *)in; |
986 | if (!e->engine.data.output) | 977 | if (!e->engine.data.output) |
987 | { | 978 | { |
988 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 979 | #ifdef GL_GLES |
989 | #else | 980 | #else |
990 | int eb, evb; | 981 | int eb, evb; |
991 | 982 | ||
@@ -1205,7 +1196,7 @@ eng_output_free(void *data) | |||
1205 | // if (re->xrdb) XrmDestroyDatabase(re->xrdb); | 1196 | // if (re->xrdb) XrmDestroyDatabase(re->xrdb); |
1206 | 1197 | ||
1207 | #if 0 | 1198 | #if 0 |
1208 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1199 | #ifdef GL_GLES |
1209 | // Destroy the resource surface | 1200 | // Destroy the resource surface |
1210 | // Only required for EGL case | 1201 | // Only required for EGL case |
1211 | if (re->surface) | 1202 | if (re->surface) |
@@ -1339,7 +1330,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i | |||
1339 | */ | 1330 | */ |
1340 | evas_common_tilebuf_free_render_rects(rects); | 1331 | evas_common_tilebuf_free_render_rects(rects); |
1341 | evas_common_tilebuf_clear(re->tb); | 1332 | evas_common_tilebuf_clear(re->tb); |
1342 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1333 | #ifdef GL_GLES |
1343 | // dont need to for egl - eng_window_use() can check for other ctxt's | 1334 | // dont need to for egl - eng_window_use() can check for other ctxt's |
1344 | #else | 1335 | #else |
1345 | eng_window_use(NULL); | 1336 | eng_window_use(NULL); |
@@ -1361,7 +1352,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i | |||
1361 | return NULL; | 1352 | return NULL; |
1362 | /* | 1353 | /* |
1363 | if (!re->win->draw.redraw) return NULL; | 1354 | if (!re->win->draw.redraw) return NULL; |
1364 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1355 | #ifdef GL_GLES |
1365 | // dont need to for egl - eng_window_use() can check for other ctxt's | 1356 | // dont need to for egl - eng_window_use() can check for other ctxt's |
1366 | #else | 1357 | #else |
1367 | eng_window_use(NULL); | 1358 | eng_window_use(NULL); |
@@ -1428,7 +1419,7 @@ eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x | |||
1428 | } | 1419 | } |
1429 | } | 1420 | } |
1430 | } | 1421 | } |
1431 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1422 | #ifdef GL_GLES |
1432 | // this is needed to make sure all previous rendering is flushed to | 1423 | // this is needed to make sure all previous rendering is flushed to |
1433 | // buffers/surfaces | 1424 | // buffers/surfaces |
1434 | #ifdef FRAMECOUNT | 1425 | #ifdef FRAMECOUNT |
@@ -1466,7 +1457,7 @@ eng_output_flush(void *data) | |||
1466 | re->win->draw.drew = 0; | 1457 | re->win->draw.drew = 0; |
1467 | eng_window_use(re->win); | 1458 | eng_window_use(re->win); |
1468 | 1459 | ||
1469 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1460 | #ifdef GL_GLES |
1470 | #ifdef FRAMECOUNT | 1461 | #ifdef FRAMECOUNT |
1471 | double t0 = get_time(); | 1462 | double t0 = get_time(); |
1472 | #endif | 1463 | #endif |
@@ -1860,7 +1851,7 @@ struct _Native | |||
1860 | Pixmap pixmap; | 1851 | Pixmap pixmap; |
1861 | Visual *visual; | 1852 | Visual *visual; |
1862 | 1853 | ||
1863 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1854 | #ifdef GL_GLES |
1864 | void *egl_surface; | 1855 | void *egl_surface; |
1865 | #else | 1856 | #else |
1866 | void *fbc; | 1857 | void *fbc; |
@@ -1885,7 +1876,7 @@ _native_bind_cb(void *data, void *image) | |||
1885 | 1876 | ||
1886 | if (n->ns.type == EVAS_NATIVE_SURFACE_X11) | 1877 | if (n->ns.type == EVAS_NATIVE_SURFACE_X11) |
1887 | { | 1878 | { |
1888 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1879 | #ifdef GL_GLES |
1889 | if (n->egl_surface) | 1880 | if (n->egl_surface) |
1890 | { | 1881 | { |
1891 | if (glsym_glEGLImageTargetTexture2DOES) | 1882 | if (glsym_glEGLImageTargetTexture2DOES) |
@@ -1929,7 +1920,7 @@ _native_unbind_cb(void *data, void *image) | |||
1929 | 1920 | ||
1930 | if (n->ns.type == EVAS_NATIVE_SURFACE_X11) | 1921 | if (n->ns.type == EVAS_NATIVE_SURFACE_X11) |
1931 | { | 1922 | { |
1932 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1923 | #ifdef GL_GLES |
1933 | // nothing | 1924 | // nothing |
1934 | #else | 1925 | #else |
1935 | # ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT | 1926 | # ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT |
@@ -1967,7 +1958,7 @@ _native_free_cb(void *data, void *image) | |||
1967 | { | 1958 | { |
1968 | pmid = n->pixmap; | 1959 | pmid = n->pixmap; |
1969 | eina_hash_del(re->win->gl_context->shared->native_pm_hash, &pmid, im); | 1960 | eina_hash_del(re->win->gl_context->shared->native_pm_hash, &pmid, im); |
1970 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 1961 | #ifdef GL_GLES |
1971 | if (n->egl_surface) | 1962 | if (n->egl_surface) |
1972 | { | 1963 | { |
1973 | if (glsym_eglDestroyImage) | 1964 | if (glsym_eglDestroyImage) |
@@ -2128,7 +2119,7 @@ eng_image_native_set(void *data, void *image, void *native) | |||
2128 | if (!im) return NULL; | 2119 | if (!im) return NULL; |
2129 | if (ns->type == EVAS_NATIVE_SURFACE_X11) | 2120 | if (ns->type == EVAS_NATIVE_SURFACE_X11) |
2130 | { | 2121 | { |
2131 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2122 | #ifdef GL_GLES |
2132 | if (native) | 2123 | if (native) |
2133 | { | 2124 | { |
2134 | n = calloc(1, sizeof(Native)); | 2125 | n = calloc(1, sizeof(Native)); |
@@ -2314,7 +2305,7 @@ eng_image_native_set(void *data, void *image, void *native) | |||
2314 | 2305 | ||
2315 | n->pixmap = 0; | 2306 | n->pixmap = 0; |
2316 | n->visual = 0; | 2307 | n->visual = 0; |
2317 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2308 | #ifdef GL_GLES |
2318 | n->egl_surface = 0; | 2309 | n->egl_surface = 0; |
2319 | #else | 2310 | #else |
2320 | n->fbc = 0; | 2311 | n->fbc = 0; |
@@ -2545,7 +2536,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i | |||
2545 | return im; | 2536 | return im; |
2546 | } | 2537 | } |
2547 | 2538 | ||
2548 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2539 | #ifdef GL_GLES |
2549 | eng_window_use(re->win); | 2540 | eng_window_use(re->win); |
2550 | 2541 | ||
2551 | if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) | 2542 | if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) |
@@ -2655,7 +2646,7 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) | |||
2655 | if (im->tex->pt->dyn.checked_out > 0) | 2646 | if (im->tex->pt->dyn.checked_out > 0) |
2656 | { | 2647 | { |
2657 | im->tex->pt->dyn.checked_out--; | 2648 | im->tex->pt->dyn.checked_out--; |
2658 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2649 | #ifdef GL_GLES |
2659 | if (im->tex->pt->dyn.checked_out == 0) | 2650 | if (im->tex->pt->dyn.checked_out == 0) |
2660 | glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); | 2651 | glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); |
2661 | #endif | 2652 | #endif |
@@ -2979,7 +2970,7 @@ _check_gl_surface_format(GLint int_fmt, GLenum fmt, GLenum attachment, GLenum at | |||
2979 | // Render Target Attachment (Stencil or Depth) | 2970 | // Render Target Attachment (Stencil or Depth) |
2980 | if (attachment) | 2971 | if (attachment) |
2981 | { | 2972 | { |
2982 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 2973 | #ifdef GL_GLES |
2983 | // This is a little hacky but this is how we'll have to do for now. | 2974 | // This is a little hacky but this is how we'll have to do for now. |
2984 | if (attach_fmt == GL_DEPTH_STENCIL_OES) | 2975 | if (attach_fmt == GL_DEPTH_STENCIL_OES) |
2985 | { | 2976 | { |
@@ -3123,7 +3114,7 @@ _set_gl_surface_cap(Render_Engine *re) | |||
3123 | if (!re) return; | 3114 | if (!re) return; |
3124 | if (re->gl_cap_initted) return; | 3115 | if (re->gl_cap_initted) return; |
3125 | 3116 | ||
3126 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3117 | #ifdef GL_GLES |
3127 | int max_samples = 0; | 3118 | int max_samples = 0; |
3128 | 3119 | ||
3129 | glGetIntegerv(GL_MAX_SAMPLES_IMG, &max_samples); | 3120 | glGetIntegerv(GL_MAX_SAMPLES_IMG, &max_samples); |
@@ -3154,7 +3145,7 @@ _set_gl_surface_cap(Render_Engine *re) | |||
3154 | 3145 | ||
3155 | glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &re->gl_cap.max_rb_size); | 3146 | glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &re->gl_cap.max_rb_size); |
3156 | 3147 | ||
3157 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3148 | #ifdef GL_GLES |
3158 | count = (re->gl_cap.msaa_support) ? 4 : 1; | 3149 | count = (re->gl_cap.msaa_support) ? 4 : 1; |
3159 | 3150 | ||
3160 | for (i = 0; i < count; i++) | 3151 | for (i = 0; i < count; i++) |
@@ -3370,7 +3361,7 @@ _attach_fbo_surface(Render_Engine *data __UNUSED__, | |||
3370 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0); | 3361 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0); |
3371 | glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); | 3362 | glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); |
3372 | glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); | 3363 | glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); |
3373 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3364 | #ifdef GL_GLES |
3374 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0); | 3365 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0); |
3375 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); | 3366 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); |
3376 | #else | 3367 | #else |
@@ -3407,7 +3398,7 @@ _attach_fbo_surface(Render_Engine *data __UNUSED__, | |||
3407 | // Depth Stencil RenderBuffer - Attach it to FBO | 3398 | // Depth Stencil RenderBuffer - Attach it to FBO |
3408 | if (sfc->rb_depth_stencil) | 3399 | if (sfc->rb_depth_stencil) |
3409 | { | 3400 | { |
3410 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3401 | #ifdef GL_GLES |
3411 | curr_tex = 0; | 3402 | curr_tex = 0; |
3412 | glGetIntegerv(GL_TEXTURE_BINDING_2D, &curr_tex); | 3403 | glGetIntegerv(GL_TEXTURE_BINDING_2D, &curr_tex); |
3413 | glBindTexture(GL_TEXTURE_2D, sfc->rb_depth_stencil); | 3404 | glBindTexture(GL_TEXTURE_2D, sfc->rb_depth_stencil); |
@@ -3523,7 +3514,7 @@ _create_rt_buffers(Render_Engine *data __UNUSED__, | |||
3523 | // First check if packed buffer is to be used. | 3514 | // First check if packed buffer is to be used. |
3524 | if (sfc->rb_depth_stencil_fmt) | 3515 | if (sfc->rb_depth_stencil_fmt) |
3525 | { | 3516 | { |
3526 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3517 | #ifdef GL_GLES |
3527 | glGenTextures(1, &sfc->rb_depth_stencil); | 3518 | glGenTextures(1, &sfc->rb_depth_stencil); |
3528 | #else | 3519 | #else |
3529 | glGenRenderbuffers(1, &sfc->rb_depth_stencil); | 3520 | glGenRenderbuffers(1, &sfc->rb_depth_stencil); |
@@ -3554,7 +3545,7 @@ _create_rt_buffers(Render_Engine *data __UNUSED__, | |||
3554 | if (sfc->rt_tex) glDeleteTextures(1, &sfc->rt_tex); | 3545 | if (sfc->rt_tex) glDeleteTextures(1, &sfc->rt_tex); |
3555 | if (sfc->rb_depth) glDeleteRenderbuffers(1, &sfc->rb_depth); | 3546 | if (sfc->rb_depth) glDeleteRenderbuffers(1, &sfc->rb_depth); |
3556 | if (sfc->rb_stencil) glDeleteRenderbuffers(1, &sfc->rb_stencil); | 3547 | if (sfc->rb_stencil) glDeleteRenderbuffers(1, &sfc->rb_stencil); |
3557 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3548 | #ifdef GL_GLES |
3558 | if (sfc->rb_depth_stencil) glDeleteTextures(1, &sfc->rb_depth_stencil); | 3549 | if (sfc->rb_depth_stencil) glDeleteTextures(1, &sfc->rb_depth_stencil); |
3559 | #else | 3550 | #else |
3560 | if (sfc->rb_depth_stencil) glDeleteRenderbuffers(1, &sfc->rb_depth_stencil); | 3551 | if (sfc->rb_depth_stencil) glDeleteRenderbuffers(1, &sfc->rb_depth_stencil); |
@@ -3601,7 +3592,7 @@ eng_gl_surface_create(void *data, void *config, int w, int h) | |||
3601 | if (cfg->options_bits & EVAS_GL_OPTIONS_DIRECT) | 3592 | if (cfg->options_bits & EVAS_GL_OPTIONS_DIRECT) |
3602 | { | 3593 | { |
3603 | DBG("Enabling Direct rendering to the Evas' window."); | 3594 | DBG("Enabling Direct rendering to the Evas' window."); |
3604 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3595 | #ifdef GL_GLES |
3605 | sfc->direct_sfc = re->win->egl_surface[0]; | 3596 | sfc->direct_sfc = re->win->egl_surface[0]; |
3606 | #else | 3597 | #else |
3607 | sfc->direct_sfc = re->win->win; | 3598 | sfc->direct_sfc = re->win->win; |
@@ -3643,7 +3634,7 @@ eng_gl_surface_create(void *data, void *config, int w, int h) | |||
3643 | 3634 | ||
3644 | finish: | 3635 | finish: |
3645 | 3636 | ||
3646 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3637 | #ifdef GL_GLES |
3647 | res = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); | 3638 | res = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); |
3648 | #else | 3639 | #else |
3649 | res = glXMakeCurrent(re->info->info.display, None, NULL); | 3640 | res = glXMakeCurrent(re->info->info.display, None, NULL); |
@@ -3702,7 +3693,7 @@ eng_gl_surface_destroy(void *data, void *surface) | |||
3702 | 3693 | ||
3703 | if (sfc->rb_depth_stencil) | 3694 | if (sfc->rb_depth_stencil) |
3704 | { | 3695 | { |
3705 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3696 | #ifdef GL_GLES |
3706 | glDeleteTextures(1, &sfc->rb_depth_stencil); | 3697 | glDeleteTextures(1, &sfc->rb_depth_stencil); |
3707 | #else | 3698 | #else |
3708 | glDeleteRenderbuffers(1, &sfc->rb_depth_stencil); | 3699 | glDeleteRenderbuffers(1, &sfc->rb_depth_stencil); |
@@ -3710,7 +3701,7 @@ eng_gl_surface_destroy(void *data, void *surface) | |||
3710 | } | 3701 | } |
3711 | 3702 | ||
3712 | 3703 | ||
3713 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3704 | #ifdef GL_GLES |
3714 | ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); | 3705 | ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); |
3715 | #else | 3706 | #else |
3716 | ret = glXMakeCurrent(re->info->info.display, None, NULL); | 3707 | ret = glXMakeCurrent(re->info->info.display, None, NULL); |
@@ -3734,7 +3725,7 @@ eng_gl_context_create(void *data, void *share_context) | |||
3734 | Render_Engine *re; | 3725 | Render_Engine *re; |
3735 | Render_Engine_GL_Context *ctx; | 3726 | Render_Engine_GL_Context *ctx; |
3736 | Render_Engine_GL_Context *share_ctx; | 3727 | Render_Engine_GL_Context *share_ctx; |
3737 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3728 | #ifdef GL_GLES |
3738 | int context_attrs[3]; | 3729 | int context_attrs[3]; |
3739 | #endif | 3730 | #endif |
3740 | 3731 | ||
@@ -3747,7 +3738,7 @@ eng_gl_context_create(void *data, void *share_context) | |||
3747 | 3738 | ||
3748 | // Set the share context to Evas' GL context if share_context is NULL. | 3739 | // Set the share context to Evas' GL context if share_context is NULL. |
3749 | // Otherwise set it to the given share_context. | 3740 | // Otherwise set it to the given share_context. |
3750 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3741 | #ifdef GL_GLES |
3751 | // EGL | 3742 | // EGL |
3752 | context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; | 3743 | context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; |
3753 | context_attrs[1] = 2; | 3744 | context_attrs[1] = 2; |
@@ -3828,7 +3819,7 @@ eng_gl_context_destroy(void *data, void *context) | |||
3828 | glDeleteFramebuffers(1, &ctx->context_fbo); | 3819 | glDeleteFramebuffers(1, &ctx->context_fbo); |
3829 | 3820 | ||
3830 | // Destroy the Context | 3821 | // Destroy the Context |
3831 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3822 | #ifdef GL_GLES |
3832 | eglDestroyContext(re->win->egl_disp, ctx->context); | 3823 | eglDestroyContext(re->win->egl_disp, ctx->context); |
3833 | 3824 | ||
3834 | ctx->context = EGL_NO_CONTEXT; | 3825 | ctx->context = EGL_NO_CONTEXT; |
@@ -3864,7 +3855,7 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) | |||
3864 | Render_Engine_GL_Surface *sfc; | 3855 | Render_Engine_GL_Surface *sfc; |
3865 | Render_Engine_GL_Context *ctx; | 3856 | Render_Engine_GL_Context *ctx; |
3866 | int ret = 0; | 3857 | int ret = 0; |
3867 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3858 | #ifdef GL_GLES |
3868 | Render_Engine_GL_Resource *rsc; | 3859 | Render_Engine_GL_Resource *rsc; |
3869 | #endif | 3860 | #endif |
3870 | 3861 | ||
@@ -3877,7 +3868,7 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) | |||
3877 | // Unset surface/context | 3868 | // Unset surface/context |
3878 | if ((!sfc) || (!ctx)) | 3869 | if ((!sfc) || (!ctx)) |
3879 | { | 3870 | { |
3880 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3871 | #ifdef GL_GLES |
3881 | ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, | 3872 | ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, |
3882 | EGL_NO_SURFACE, EGL_NO_CONTEXT); | 3873 | EGL_NO_SURFACE, EGL_NO_CONTEXT); |
3883 | #else | 3874 | #else |
@@ -3902,7 +3893,7 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) | |||
3902 | // correct rendering. | 3893 | // correct rendering. |
3903 | if ((sfc->direct_fb_opt) && (gl_direct_img_obj || gl_direct_override)) | 3894 | if ((sfc->direct_fb_opt) && (gl_direct_img_obj || gl_direct_override)) |
3904 | { | 3895 | { |
3905 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3896 | #ifdef GL_GLES |
3906 | sfc->direct_sfc = re->win->egl_surface[0]; | 3897 | sfc->direct_sfc = re->win->egl_surface[0]; |
3907 | #else | 3898 | #else |
3908 | sfc->direct_sfc = re->win->win; | 3899 | sfc->direct_sfc = re->win->win; |
@@ -3917,7 +3908,7 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) | |||
3917 | GLint curr_fbo = 0; | 3908 | GLint curr_fbo = 0; |
3918 | 3909 | ||
3919 | // Do a make current only if it's not already current | 3910 | // Do a make current only if it's not already current |
3920 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3911 | #ifdef GL_GLES |
3921 | if ((eglGetCurrentContext() != ctx->context) || | 3912 | if ((eglGetCurrentContext() != ctx->context) || |
3922 | (eglGetCurrentSurface(EGL_READ) != sfc->direct_sfc) || | 3913 | (eglGetCurrentSurface(EGL_READ) != sfc->direct_sfc) || |
3923 | (eglGetCurrentSurface(EGL_DRAW) != sfc->direct_sfc) ) | 3914 | (eglGetCurrentSurface(EGL_DRAW) != sfc->direct_sfc) ) |
@@ -3963,7 +3954,7 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) | |||
3963 | else | 3954 | else |
3964 | { | 3955 | { |
3965 | // Do a make current only if it's not already current | 3956 | // Do a make current only if it's not already current |
3966 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 3957 | #ifdef GL_GLES |
3967 | if (eina_main_loop_is()) | 3958 | if (eina_main_loop_is()) |
3968 | { | 3959 | { |
3969 | if ((eglGetCurrentContext() != ctx->context) || | 3960 | if ((eglGetCurrentContext() != ctx->context) || |
@@ -4074,7 +4065,7 @@ eng_gl_string_query(void *data __UNUSED__, int name) | |||
4074 | static void * | 4065 | static void * |
4075 | eng_gl_proc_address_get(void *data __UNUSED__, const char *name) | 4066 | eng_gl_proc_address_get(void *data __UNUSED__, const char *name) |
4076 | { | 4067 | { |
4077 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4068 | #ifdef GL_GLES |
4078 | if (glsym_eglGetProcAddress) return glsym_eglGetProcAddress(name); | 4069 | if (glsym_eglGetProcAddress) return glsym_eglGetProcAddress(name); |
4079 | return dlsym(RTLD_DEFAULT, name); | 4070 | return dlsym(RTLD_DEFAULT, name); |
4080 | #else | 4071 | #else |
@@ -4381,7 +4372,7 @@ evgl_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) | |||
4381 | static void | 4372 | static void |
4382 | evgl_glClearDepthf(GLclampf depth) | 4373 | evgl_glClearDepthf(GLclampf depth) |
4383 | { | 4374 | { |
4384 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4375 | #ifdef GL_GLES |
4385 | glClearDepthf(depth); | 4376 | glClearDepthf(depth); |
4386 | #else | 4377 | #else |
4387 | glClearDepth(depth); | 4378 | glClearDepth(depth); |
@@ -4391,7 +4382,7 @@ evgl_glClearDepthf(GLclampf depth) | |||
4391 | static void | 4382 | static void |
4392 | evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) | 4383 | evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) |
4393 | { | 4384 | { |
4394 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4385 | #ifdef GL_GLES |
4395 | glDepthRangef(zNear, zFar); | 4386 | glDepthRangef(zNear, zFar); |
4396 | #else | 4387 | #else |
4397 | glDepthRange(zNear, zFar); | 4388 | glDepthRange(zNear, zFar); |
@@ -4401,7 +4392,7 @@ evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) | |||
4401 | static void | 4392 | static void |
4402 | evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) | 4393 | evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) |
4403 | { | 4394 | { |
4404 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4395 | #ifdef GL_GLES |
4405 | glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); | 4396 | glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); |
4406 | #else | 4397 | #else |
4407 | if (range) | 4398 | if (range) |
@@ -4420,7 +4411,7 @@ evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* | |||
4420 | static void | 4411 | static void |
4421 | evgl_glReleaseShaderCompiler(void) | 4412 | evgl_glReleaseShaderCompiler(void) |
4422 | { | 4413 | { |
4423 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4414 | #ifdef GL_GLES |
4424 | glReleaseShaderCompiler(); | 4415 | glReleaseShaderCompiler(); |
4425 | #else | 4416 | #else |
4426 | #endif | 4417 | #endif |
@@ -4429,7 +4420,7 @@ evgl_glReleaseShaderCompiler(void) | |||
4429 | static void | 4420 | static void |
4430 | evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) | 4421 | evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) |
4431 | { | 4422 | { |
4432 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4423 | #ifdef GL_GLES |
4433 | glShaderBinary(n, shaders, binaryformat, binary, length); | 4424 | glShaderBinary(n, shaders, binaryformat, binary, length); |
4434 | #else | 4425 | #else |
4435 | // FIXME: need to dlsym/getprocaddress for this | 4426 | // FIXME: need to dlsym/getprocaddress for this |
@@ -4440,7 +4431,7 @@ evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const | |||
4440 | } | 4431 | } |
4441 | 4432 | ||
4442 | //--------------------------------// | 4433 | //--------------------------------// |
4443 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4434 | #ifdef GL_GLES |
4444 | // EGL Extensions | 4435 | // EGL Extensions |
4445 | static void * | 4436 | static void * |
4446 | evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) | 4437 | evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) |
@@ -4709,7 +4700,7 @@ eng_gl_api_get(void *data __UNUSED__) | |||
4709 | 4700 | ||
4710 | ORD(glGetString); | 4701 | ORD(glGetString); |
4711 | 4702 | ||
4712 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 4703 | #ifdef GL_GLES |
4713 | // GLES 2.0 Extensions that needs wrapping | 4704 | // GLES 2.0 Extensions that needs wrapping |
4714 | ORD(evasglCreateImage); | 4705 | ORD(evasglCreateImage); |
4715 | ORD(evasglDestroyImage); | 4706 | ORD(evasglDestroyImage); |
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.h b/legacy/evas/src/modules/engines/gl_x11/evas_engine.h index 4f62c580c9..3778698b4a 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.h +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.h | |||
@@ -10,26 +10,16 @@ | |||
10 | 10 | ||
11 | #define GL_GLEXT_PROTOTYPES | 11 | #define GL_GLEXT_PROTOTYPES |
12 | 12 | ||
13 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 13 | #ifdef GL_GLES |
14 | # if defined(GLES_VARIETY_S3C6410) | 14 | # define SUPPORT_X11 1 |
15 | # include <EGL/egl.h> | 15 | # include <EGL/egl.h> |
16 | # include <GLES2/gl2.h> | 16 | # include <GLES2/gl2.h> |
17 | # include <X11/Xlib.h> | 17 | # include <GLES2/gl2ext.h> |
18 | # include <X11/Xatom.h> | 18 | # include <X11/Xlib.h> |
19 | # include <X11/Xutil.h> | 19 | # include <X11/Xatom.h> |
20 | # include <X11/extensions/Xrender.h> | 20 | # include <X11/Xutil.h> |
21 | # include <X11/Xresource.h> // xres - dpi | 21 | # include <X11/extensions/Xrender.h> |
22 | # elif defined(GLES_VARIETY_SGX) | 22 | # include <X11/Xresource.h> // xres - dpi |
23 | # define SUPPORT_X11 1 | ||
24 | # include <EGL/egl.h> | ||
25 | # include <GLES2/gl2.h> | ||
26 | # include <GLES2/gl2ext.h> | ||
27 | # include <X11/Xlib.h> | ||
28 | # include <X11/Xatom.h> | ||
29 | # include <X11/Xutil.h> | ||
30 | # include <X11/extensions/Xrender.h> | ||
31 | # include <X11/Xresource.h> // xres - dpi | ||
32 | # endif | ||
33 | #else | 23 | #else |
34 | # include <X11/Xlib.h> | 24 | # include <X11/Xlib.h> |
35 | # include <X11/Xatom.h> | 25 | # include <X11/Xatom.h> |
@@ -87,7 +77,7 @@ struct _Evas_GL_X11_Window | |||
87 | int drew : 1; | 77 | int drew : 1; |
88 | int x1, y1, x2, y2; | 78 | int x1, y1, x2, y2; |
89 | } draw; | 79 | } draw; |
90 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 80 | #ifdef GL_GLES |
91 | EGLContext egl_context[1]; | 81 | EGLContext egl_context[1]; |
92 | EGLSurface egl_surface[1]; | 82 | EGLSurface egl_surface[1]; |
93 | EGLConfig egl_config; | 83 | EGLConfig egl_config; |
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c b/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c index 6b8b955640..ccda5ccde7 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | static Evas_GL_X11_Window *_evas_gl_x11_window = NULL; | 3 | static Evas_GL_X11_Window *_evas_gl_x11_window = NULL; |
4 | 4 | ||
5 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 5 | #ifdef GL_GLES |
6 | static EGLContext context = EGL_NO_CONTEXT; | 6 | static EGLContext context = EGL_NO_CONTEXT; |
7 | #else | 7 | #else |
8 | // FIXME: this will only work for 1 display connection (glx land can have > 1) | 8 | // FIXME: this will only work for 1 display connection (glx land can have > 1) |
@@ -36,7 +36,7 @@ eng_window_new(Display *disp, | |||
36 | int rot) | 36 | int rot) |
37 | { | 37 | { |
38 | Evas_GL_X11_Window *gw; | 38 | Evas_GL_X11_Window *gw; |
39 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 39 | #ifdef GL_GLES |
40 | int context_attrs[3]; | 40 | int context_attrs[3]; |
41 | int config_attrs[40]; | 41 | int config_attrs[40]; |
42 | int major_version, minor_version; | 42 | int major_version, minor_version; |
@@ -66,7 +66,7 @@ eng_window_new(Display *disp, | |||
66 | vi_use = _evas_gl_x11_vi; | 66 | vi_use = _evas_gl_x11_vi; |
67 | if (gw->alpha) | 67 | if (gw->alpha) |
68 | { | 68 | { |
69 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 69 | #ifdef GL_GLES |
70 | if (_evas_gl_x11_rgba_vi) | 70 | if (_evas_gl_x11_rgba_vi) |
71 | { | 71 | { |
72 | vi_use = _evas_gl_x11_rgba_vi; | 72 | vi_use = _evas_gl_x11_rgba_vi; |
@@ -83,54 +83,16 @@ eng_window_new(Display *disp, | |||
83 | gw->visualinfo = vi_use; | 83 | gw->visualinfo = vi_use; |
84 | 84 | ||
85 | // EGL / GLES | 85 | // EGL / GLES |
86 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 86 | #ifdef GL_GLES |
87 | context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; | 87 | context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; |
88 | context_attrs[1] = 2; | 88 | context_attrs[1] = 2; |
89 | context_attrs[2] = EGL_NONE; | 89 | context_attrs[2] = EGL_NONE; |
90 | 90 | ||
91 | # if defined(GLES_VARIETY_S3C6410) | ||
92 | if (gw->visualinfo->depth == 16) // 16bpp | ||
93 | { | ||
94 | config_attrs[n++] = EGL_SURFACE_TYPE; | ||
95 | config_attrs[n++] = EGL_WINDOW_BIT; | ||
96 | config_attrs[n++] = EGL_RENDERABLE_TYPE; | ||
97 | config_attrs[n++] = EGL_OPENGL_ES2_BIT; | ||
98 | config_attrs[n++] = EGL_RED_SIZE; | ||
99 | config_attrs[n++] = 5; | ||
100 | config_attrs[n++] = EGL_GREEN_SIZE; | ||
101 | config_attrs[n++] = 6; | ||
102 | config_attrs[n++] = EGL_BLUE_SIZE; | ||
103 | config_attrs[n++] = 5; | ||
104 | config_attrs[n++] = EGL_DEPTH_SIZE; | ||
105 | config_attrs[n++] = 0; | ||
106 | config_attrs[n++] = EGL_STENCIL_SIZE; | ||
107 | config_attrs[n++] = 0; | ||
108 | config_attrs[n++] = EGL_NONE; | ||
109 | } | ||
110 | else // 24/32bit. no one does 8bpp anymore. and 15bpp... dead | ||
111 | { | ||
112 | config_attrs[n++] = EGL_SURFACE_TYPE; | ||
113 | config_attrs[n++] = EGL_WINDOW_BIT; | ||
114 | config_attrs[n++] = EGL_RENDERABLE_TYPE; | ||
115 | config_attrs[n++] = EGL_OPENGL_ES2_BIT; | ||
116 | config_attrs[n++] = EGL_RED_SIZE; | ||
117 | config_attrs[n++] = 8; | ||
118 | config_attrs[n++] = EGL_GREEN_SIZE; | ||
119 | config_attrs[n++] = 8; | ||
120 | config_attrs[n++] = EGL_BLUE_SIZE; | ||
121 | config_attrs[n++] = 8; | ||
122 | config_attrs[n++] = EGL_DEPTH_SIZE; | ||
123 | config_attrs[n++] = 0; | ||
124 | config_attrs[n++] = EGL_STENCIL_SIZE; | ||
125 | config_attrs[n++] = 0; | ||
126 | config_attrs[n++] = EGL_NONE; | ||
127 | } | ||
128 | # elif defined(GLES_VARIETY_SGX) | ||
129 | config_attrs[n++] = EGL_SURFACE_TYPE; | 91 | config_attrs[n++] = EGL_SURFACE_TYPE; |
130 | config_attrs[n++] = EGL_WINDOW_BIT; | 92 | config_attrs[n++] = EGL_WINDOW_BIT; |
131 | config_attrs[n++] = EGL_RENDERABLE_TYPE; | 93 | config_attrs[n++] = EGL_RENDERABLE_TYPE; |
132 | config_attrs[n++] = EGL_OPENGL_ES2_BIT; | 94 | config_attrs[n++] = EGL_OPENGL_ES2_BIT; |
133 | #if 0 | 95 | # if 0 |
134 | // FIXME: n900 - omap3 sgx libs break here | 96 | // FIXME: n900 - omap3 sgx libs break here |
135 | config_attrs[n++] = EGL_RED_SIZE; | 97 | config_attrs[n++] = EGL_RED_SIZE; |
136 | config_attrs[n++] = 1; | 98 | config_attrs[n++] = 1; |
@@ -139,7 +101,7 @@ eng_window_new(Display *disp, | |||
139 | config_attrs[n++] = EGL_BLUE_SIZE; | 101 | config_attrs[n++] = EGL_BLUE_SIZE; |
140 | config_attrs[n++] = 1; | 102 | config_attrs[n++] = 1; |
141 | // FIXME: end n900 breakage | 103 | // FIXME: end n900 breakage |
142 | #endif | 104 | # endif |
143 | if (gw->alpha) | 105 | if (gw->alpha) |
144 | { | 106 | { |
145 | config_attrs[n++] = EGL_ALPHA_SIZE; | 107 | config_attrs[n++] = EGL_ALPHA_SIZE; |
@@ -155,8 +117,7 @@ eng_window_new(Display *disp, | |||
155 | config_attrs[n++] = EGL_STENCIL_SIZE; | 117 | config_attrs[n++] = EGL_STENCIL_SIZE; |
156 | config_attrs[n++] = 0; | 118 | config_attrs[n++] = 0; |
157 | config_attrs[n++] = EGL_NONE; | 119 | config_attrs[n++] = EGL_NONE; |
158 | # endif | 120 | |
159 | |||
160 | gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); | 121 | gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); |
161 | if (!gw->egl_disp) | 122 | if (!gw->egl_disp) |
162 | { | 123 | { |
@@ -528,7 +489,7 @@ eng_window_new(Display *disp, | |||
528 | eng_window_free(gw); | 489 | eng_window_free(gw); |
529 | return NULL; | 490 | return NULL; |
530 | } | 491 | } |
531 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 492 | #ifdef GL_GLES |
532 | gw->gl_context->egldisp = gw->egl_disp; | 493 | gw->gl_context->egldisp = gw->egl_disp; |
533 | #endif | 494 | #endif |
534 | eng_window_use(gw); | 495 | eng_window_use(gw); |
@@ -550,7 +511,7 @@ eng_window_free(Evas_GL_X11_Window *gw) | |||
550 | ref = gw->gl_context->references - 1; | 511 | ref = gw->gl_context->references - 1; |
551 | evas_gl_common_context_free(gw->gl_context); | 512 | evas_gl_common_context_free(gw->gl_context); |
552 | } | 513 | } |
553 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 514 | #ifdef GL_GLES |
554 | eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); | 515 | eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); |
555 | if (gw->egl_surface[0] != EGL_NO_SURFACE) | 516 | if (gw->egl_surface[0] != EGL_NO_SURFACE) |
556 | eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); | 517 | eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); |
@@ -582,7 +543,7 @@ eng_window_use(Evas_GL_X11_Window *gw) | |||
582 | { | 543 | { |
583 | Eina_Bool force_use = EINA_FALSE; | 544 | Eina_Bool force_use = EINA_FALSE; |
584 | 545 | ||
585 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 546 | #ifdef GL_GLES |
586 | if (_evas_gl_x11_window) | 547 | if (_evas_gl_x11_window) |
587 | { | 548 | { |
588 | if ((eglGetCurrentContext() != | 549 | if ((eglGetCurrentContext() != |
@@ -611,7 +572,7 @@ eng_window_use(Evas_GL_X11_Window *gw) | |||
611 | if (gw) | 572 | if (gw) |
612 | { | 573 | { |
613 | // EGL / GLES | 574 | // EGL / GLES |
614 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 575 | #ifdef GL_GLES |
615 | if (gw->egl_surface[0] != EGL_NO_SURFACE) | 576 | if (gw->egl_surface[0] != EGL_NO_SURFACE) |
616 | { | 577 | { |
617 | if (eglMakeCurrent(gw->egl_disp, | 578 | if (eglMakeCurrent(gw->egl_disp, |
@@ -652,7 +613,7 @@ eng_window_unsurf(Evas_GL_X11_Window *gw) | |||
652 | if (!getenv("EVAS_GL_WIN_RESURF")) return; | 613 | if (!getenv("EVAS_GL_WIN_RESURF")) return; |
653 | if (getenv("EVAS_GL_INFO")) | 614 | if (getenv("EVAS_GL_INFO")) |
654 | printf("unsurf %p\n", gw); | 615 | printf("unsurf %p\n", gw); |
655 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 616 | #ifdef GL_GLES |
656 | if (_evas_gl_x11_window) | 617 | if (_evas_gl_x11_window) |
657 | evas_gl_common_context_flush(_evas_gl_x11_window->gl_context); | 618 | evas_gl_common_context_flush(_evas_gl_x11_window->gl_context); |
658 | if (_evas_gl_x11_window == gw) | 619 | if (_evas_gl_x11_window == gw) |
@@ -681,7 +642,7 @@ eng_window_resurf(Evas_GL_X11_Window *gw) | |||
681 | if (gw->surf) return; | 642 | if (gw->surf) return; |
682 | if (getenv("EVAS_GL_INFO")) | 643 | if (getenv("EVAS_GL_INFO")) |
683 | printf("resurf %p\n", gw); | 644 | printf("resurf %p\n", gw); |
684 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 645 | #ifdef GL_GLES |
685 | gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, | 646 | gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, |
686 | (EGLNativeWindowType)gw->win, | 647 | (EGLNativeWindowType)gw->win, |
687 | NULL); | 648 | NULL); |
@@ -729,7 +690,7 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo) | |||
729 | int alpha; | 690 | int alpha; |
730 | 691 | ||
731 | // EGL / GLES | 692 | // EGL / GLES |
732 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 693 | #ifdef GL_GLES |
733 | for (alpha = 0; alpha < 2; alpha++) | 694 | for (alpha = 0; alpha < 2; alpha++) |
734 | { | 695 | { |
735 | int depth = DefaultDepth(einfo->info.display, | 696 | int depth = DefaultDepth(einfo->info.display, |
@@ -871,7 +832,7 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo) | |||
871 | if (einfo->info.destination_alpha) | 832 | if (einfo->info.destination_alpha) |
872 | { | 833 | { |
873 | // EGL / GLES | 834 | // EGL / GLES |
874 | #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) | 835 | #ifdef GL_GLES |
875 | if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->visual; | 836 | if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->visual; |
876 | #else | 837 | #else |
877 | //# ifdef NEWGL | 838 | //# ifdef NEWGL |
diff --git a/legacy/evas/src/modules/engines/wayland_egl/evas_wl_main.c b/legacy/evas/src/modules/engines/wayland_egl/evas_wl_main.c index b7ec16f018..417b56b5cc 100644 --- a/legacy/evas/src/modules/engines/wayland_egl/evas_wl_main.c +++ b/legacy/evas/src/modules/engines/wayland_egl/evas_wl_main.c | |||
@@ -38,44 +38,6 @@ eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, | |||
38 | context_attrs[1] = 2; | 38 | context_attrs[1] = 2; |
39 | context_attrs[2] = EGL_NONE; | 39 | context_attrs[2] = EGL_NONE; |
40 | 40 | ||
41 | #if defined(GLES_VARIETY_S3C6410) | ||
42 | if (gw->depth == 16) // 16bpp | ||
43 | { | ||
44 | config_attrs[n++] = EGL_SURFACE_TYPE; | ||
45 | config_attrs[n++] = EGL_WINDOW_BIT; | ||
46 | config_attrs[n++] = EGL_RENDERABLE_TYPE; | ||
47 | config_attrs[n++] = EGL_OPENGL_ES2_BIT; | ||
48 | config_attrs[n++] = EGL_RED_SIZE; | ||
49 | config_attrs[n++] = 5; | ||
50 | config_attrs[n++] = EGL_GREEN_SIZE; | ||
51 | config_attrs[n++] = 6; | ||
52 | config_attrs[n++] = EGL_BLUE_SIZE; | ||
53 | config_attrs[n++] = 5; | ||
54 | config_attrs[n++] = EGL_DEPTH_SIZE; | ||
55 | config_attrs[n++] = 0; | ||
56 | config_attrs[n++] = EGL_STENCIL_SIZE; | ||
57 | config_attrs[n++] = 0; | ||
58 | config_attrs[n++] = EGL_NONE; | ||
59 | } | ||
60 | else // 24/32bit. no one does 8bpp anymore. and 15bpp... dead | ||
61 | { | ||
62 | config_attrs[n++] = EGL_SURFACE_TYPE; | ||
63 | config_attrs[n++] = EGL_WINDOW_BIT; | ||
64 | config_attrs[n++] = EGL_RENDERABLE_TYPE; | ||
65 | config_attrs[n++] = EGL_OPENGL_ES2_BIT; | ||
66 | config_attrs[n++] = EGL_RED_SIZE; | ||
67 | config_attrs[n++] = 8; | ||
68 | config_attrs[n++] = EGL_GREEN_SIZE; | ||
69 | config_attrs[n++] = 8; | ||
70 | config_attrs[n++] = EGL_BLUE_SIZE; | ||
71 | config_attrs[n++] = 8; | ||
72 | config_attrs[n++] = EGL_DEPTH_SIZE; | ||
73 | config_attrs[n++] = 0; | ||
74 | config_attrs[n++] = EGL_STENCIL_SIZE; | ||
75 | config_attrs[n++] = 0; | ||
76 | config_attrs[n++] = EGL_NONE; | ||
77 | } | ||
78 | #elif defined(GLES_VARIETY_SGX) | ||
79 | config_attrs[n++] = EGL_SURFACE_TYPE; | 41 | config_attrs[n++] = EGL_SURFACE_TYPE; |
80 | config_attrs[n++] = EGL_WINDOW_BIT; | 42 | config_attrs[n++] = EGL_WINDOW_BIT; |
81 | config_attrs[n++] = EGL_RENDERABLE_TYPE; | 43 | config_attrs[n++] = EGL_RENDERABLE_TYPE; |
@@ -105,7 +67,6 @@ eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, | |||
105 | config_attrs[n++] = EGL_STENCIL_SIZE; | 67 | config_attrs[n++] = EGL_STENCIL_SIZE; |
106 | config_attrs[n++] = 0; | 68 | config_attrs[n++] = 0; |
107 | config_attrs[n++] = EGL_NONE; | 69 | config_attrs[n++] = EGL_NONE; |
108 | #endif | ||
109 | 70 | ||
110 | gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); | 71 | gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); |
111 | if (!gw->egl_disp) | 72 | if (!gw->egl_disp) |