1 #ifndef EVAS_GL_COMMON_H
2 #define EVAS_GL_COMMON_H
4 #include "evas_common.h"
5 #include "evas_private.h"
16 #define GL_GLEXT_PROTOTYPES
18 #ifdef BUILD_ENGINE_GL_COCOA
19 # include <OpenGL/gl.h>
20 # include <OpenGL/glext.h>
22 # ifdef _EVAS_ENGINE_SDL_H
23 # if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX)
24 # include <SDL/SDL_opengles.h>
26 # include <SDL/SDL_opengl.h>
29 # if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
30 # if defined(GLES_VARIETY_S3C6410)
31 # include <GLES2/gl2.h>
32 # elif defined(GLES_VARIETY_SGX)
33 # include <GLES2/gl2.h>
34 # include <GLES2/gl2ext.h>
38 # include <GL/glext.h>
43 #ifndef GL_TEXTURE_RECTANGLE_NV
44 # define GL_TEXTURE_RECTANGLE_NV 0x84F5
47 # define GL_BGRA 0x80E1
50 #ifndef EGL_NO_CONTEXT
51 # define EGL_NO_CONTEXT 0
54 # define EGL_NONE 0x3038
63 #ifndef EGL_MAP_GL_TEXTURE_2D_SEC
64 # define EGL_MAP_GL_TEXTURE_2D_SEC 0x3201
66 #ifndef EGL_MAP_GL_TEXTURE_HEIGHT_SEC
67 # define EGL_MAP_GL_TEXTURE_HEIGHT_SEC 0x3202
69 #ifndef EGL_MAP_GL_TEXTURE_WIDTH_SEC
70 # define EGL_MAP_GL_TEXTURE_WIDTH_SEC 0x3203
72 #ifndef EGL_MAP_GL_TEXTURE_FORMAT_SEC
73 # define EGL_MAP_GL_TEXTURE_FORMAT_SEC 0x3204
75 #ifndef EGL_MAP_GL_TEXTURE_RGB_SEC
76 # define EGL_MAP_GL_TEXTURE_RGB_SEC 0x3205
78 #ifndef EGL_MAP_GL_TEXTURE_RGBA_SEC
79 # define EGL_MAP_GL_TEXTURE_RGBA_SEC 0x3206
81 #ifndef EGL_MAP_GL_TEXTURE_BGRA_SEC
82 # define EGL_MAP_GL_TEXTURE_BGRA_SEC 0x3207
84 #ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC
85 # define EGL_MAP_GL_TEXTURE_LUMINANCE_SEC 0x3208
87 #ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC
88 # define EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC 0x3209
90 #ifndef EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC
91 # define EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC 0x320a
93 #ifndef EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC
94 # define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b
96 #ifndef EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC
97 # define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c
99 #ifndef GL_PROGRAM_BINARY_LENGTH
100 # define GL_PROGRAM_BINARY_LENGTH 0x8741
102 #ifndef GL_NUM_PROGRAM_BINARY_FORMATS
103 # define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
105 #ifndef GL_PROGRAM_BINARY_FORMATS
106 # define GL_PROGRAM_BINARY_FORMATS 0x87FF
108 #ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT
109 # define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
112 #define SHAD_VERTEX 0
115 #define SHAD_TEXUV2 3
116 #define SHAD_TEXUV3 4
119 typedef struct _Evas_GL_Program Evas_GL_Program;
120 typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source;
121 typedef struct _Evas_GL_Shared Evas_GL_Shared;
122 typedef struct _Evas_Engine_GL_Context Evas_Engine_GL_Context;
123 typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool;
124 typedef struct _Evas_GL_Texture Evas_GL_Texture;
125 typedef struct _Evas_GL_Image Evas_GL_Image;
126 typedef struct _Evas_GL_Font_Texture Evas_GL_Font_Texture;
127 typedef struct _Evas_GL_Polygon Evas_GL_Polygon;
128 typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point;
136 SHADER_IMG_BGRA_NOMUL,
146 SHADER_FILTER_INVERT,
147 SHADER_FILTER_INVERT_NOMUL,
148 SHADER_FILTER_INVERT_BGRA,
149 SHADER_FILTER_INVERT_BGRA_NOMUL,
150 SHADER_FILTER_GREYSCALE,
151 SHADER_FILTER_GREYSCALE_NOMUL,
152 SHADER_FILTER_GREYSCALE_BGRA,
153 SHADER_FILTER_GREYSCALE_BGRA_NOMUL,
155 SHADER_FILTER_SEPIA_NOMUL,
156 SHADER_FILTER_SEPIA_BGRA,
157 SHADER_FILTER_SEPIA_BGRA_NOMUL,
158 /* SHADER_FILTER_BLUR, */
159 /* SHADER_FILTER_BLUR_NOMUL, */
160 /* SHADER_FILTER_BLUR_BGRA, */
161 /* SHADER_FILTER_BLUR_BGRA_NOMUL, */
165 struct _Evas_GL_Program
167 GLuint vert, frag, prog;
172 struct _Evas_GL_Program_Source
175 const unsigned int *bin;
179 struct _Evas_GL_Shared
186 GLint max_texture_units;
187 GLint max_texture_size;
188 GLint max_vertex_elements;
192 Eina_Bool tex_npo2 : 1;
193 Eina_Bool tex_rect : 1;
194 Eina_Bool sec_image_map : 1;
195 Eina_Bool bin_program : 1;
196 // tuning params - per gpu/cpu combo?
197 #define MAX_CUTOUT 512
198 #define DEF_CUTOUT 512
200 // FIXME bug with pipes > 1 right now, should default to 32
201 #define MAX_PIPES 128
203 #define DEF_PIPES_SGX_540 32
204 #define DEF_PIPES_TEGRA_2 1
206 #define MIN_ATLAS_ALLOC 16
207 #define MAX_ATLAS_ALLOC 1024
208 #define DEF_ATLAS_ALLOC 1024
210 #define MIN_ATLAS_ALLOC_ALPHA 16
211 #define MAX_ATLAS_ALLOC_ALPHA 4096
212 #define DEF_ATLAS_ALLOC_ALPHA 4096
214 #define MAX_ATLAS_W 512
215 #define DEF_ATLAS_W 512
217 #define MAX_ATLAS_H 512
218 #define DEF_ATLAS_H 512
220 #define MIN_ATLAS_SLOT 16
221 #define MAX_ATLAS_SLOT 512
222 #define DEF_ATLAS_SLOT 16
233 int max_alloc_alpha_size;
243 Eina_List *atlas[33][3];
246 Eina_Hash *native_pm_hash;
247 Eina_Hash *native_tex_hash;
249 Evas_GL_Program shader[SHADER_LAST];
261 #define RTYPE_IMAGE 2
264 #define RTYPE_MAP 5 /* need to merge with image */
265 #define RTYPE_IMASK 6
269 struct _Evas_Engine_GL_Context
275 RGBA_Draw_Context *dc;
277 Evas_GL_Shared *shared;
284 GLuint cur_tex, cur_texu, cur_texv;
285 GLuint cur_texm, cur_texmu, cur_texmv;
301 Eina_Bool active : 1;
304 Evas_GL_Image *surface;
306 GLuint cur_tex, cur_texu, cur_texv, cur_texm;
307 void *cur_tex_dyn, *cur_texu_dyn, *cur_texv_dyn;
323 Eina_Bool use_vertex : 1;
324 Eina_Bool use_color : 1;
325 Eina_Bool use_texuv : 1;
326 Eina_Bool use_texuv2 : 1;
327 Eina_Bool use_texuv3 : 1;
328 Eina_Bool use_texm : 1;
337 Eina_Bool havestuff : 1;
339 Evas_GL_Image *def_surface;
341 /* If this is set: Force drawing with a particular filter */
344 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
345 // FIXME: hack. expose egl display to gl core for egl image sec extn.
350 struct _Evas_GL_Texture_Pool
352 Evas_Engine_GL_Context *gc;
354 GLuint intformat, format, dataformat;
365 Eina_List *allocations;
367 Eina_Bool render : 1;
368 Eina_Bool native : 1;
369 Eina_Bool dynamic : 1;
372 struct _Evas_GL_Texture
374 Evas_Engine_GL_Context *gc;
376 Evas_GL_Texture_Pool *pt, *ptu, *ptv, *ptuv;
378 double sx1, sy1, sx2, sy2;
383 Evas_GL_Texture_Pool *pt[2], *ptuv[2];
391 struct _Evas_GL_Image
393 Evas_Engine_GL_Context *gc;
395 Evas_GL_Texture *tex;
396 RGBA_Image_Loadopts load_opts;
398 // if im->im == NULL, it's a render-surface so these here are used
403 unsigned char no_free : 1;
409 void (*bind) (void *data, void *image);
410 void (*unbind) (void *data, void *image);
411 void (*free) (void *data, void *image);
417 unsigned char loose : 1;
420 int scale_hint, content_hint;
425 unsigned char dirty : 1;
426 unsigned char cached : 1;
427 unsigned char alpha : 1;
428 unsigned char tex_only : 1;
431 struct _Evas_GL_Font_Texture
433 Evas_GL_Texture *tex;
436 struct _Evas_GL_Polygon
439 Eina_Bool changed : 1;
442 struct _Evas_GL_Polygon_Point
448 extern Evas_GL_Program_Source shader_rect_frag_src;
449 extern Evas_GL_Program_Source shader_rect_vert_src;
450 extern Evas_GL_Program_Source shader_font_frag_src;
451 extern Evas_GL_Program_Source shader_font_vert_src;
453 extern Evas_GL_Program_Source shader_img_frag_src;
454 extern Evas_GL_Program_Source shader_img_vert_src;
455 extern Evas_GL_Program_Source shader_img_nomul_frag_src;
456 extern Evas_GL_Program_Source shader_img_nomul_vert_src;
457 extern Evas_GL_Program_Source shader_img_bgra_frag_src;
458 extern Evas_GL_Program_Source shader_img_bgra_vert_src;
459 extern Evas_GL_Program_Source shader_img_bgra_nomul_frag_src;
460 extern Evas_GL_Program_Source shader_img_bgra_nomul_vert_src;
461 extern Evas_GL_Program_Source shader_img_mask_frag_src;
462 extern Evas_GL_Program_Source shader_img_mask_vert_src;
464 extern Evas_GL_Program_Source shader_yuv_frag_src;
465 extern Evas_GL_Program_Source shader_yuv_vert_src;
466 extern Evas_GL_Program_Source shader_yuv_nomul_frag_src;
467 extern Evas_GL_Program_Source shader_yuv_nomul_vert_src;
469 extern Evas_GL_Program_Source shader_yuy2_frag_src;
470 extern Evas_GL_Program_Source shader_yuy2_vert_src;
471 extern Evas_GL_Program_Source shader_yuy2_nomul_frag_src;
472 extern Evas_GL_Program_Source shader_yuy2_nomul_vert_src;
474 extern Evas_GL_Program_Source shader_tex_frag_src;
475 extern Evas_GL_Program_Source shader_tex_vert_src;
476 extern Evas_GL_Program_Source shader_tex_nomul_frag_src;
477 extern Evas_GL_Program_Source shader_tex_nomul_vert_src;
479 extern Evas_GL_Program_Source shader_filter_invert_frag_src;
480 extern Evas_GL_Program_Source shader_filter_invert_nomul_frag_src;
481 extern Evas_GL_Program_Source shader_filter_invert_bgra_frag_src;
482 extern Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src;
483 extern Evas_GL_Program_Source shader_filter_sepia_frag_src;
484 extern Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src;
485 extern Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src;
486 extern Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src;
487 extern Evas_GL_Program_Source shader_filter_greyscale_frag_src;
488 extern Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src;
489 extern Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src;
490 extern Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src;
491 /* blur (annoyingly) needs (aka is faster with) a vertex shader */
492 extern Evas_GL_Program_Source shader_filter_blur_vert_src;
493 extern Evas_GL_Program_Source shader_filter_blur_frag_src;
494 extern Evas_GL_Program_Source shader_filter_blur_nomul_frag_src;
495 extern Evas_GL_Program_Source shader_filter_blur_bgra_frag_src;
496 extern Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src;
499 void glerr(int err, const char *file, const char *func, int line, const char *op);
501 Evas_Engine_GL_Context *evas_gl_common_context_new(void);
502 void evas_gl_common_context_free(Evas_Engine_GL_Context *gc);
503 void evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
504 void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc);
505 void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot);
506 void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface);
508 void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
509 int x1, int y1, int x2, int y2,
510 int clip, int cx, int cy, int cw, int ch,
511 int r, int g, int b, int a);
512 void evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
513 int x, int y, int w, int h,
514 int r, int g, int b, int a);
515 void evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
516 Evas_GL_Texture *tex,
517 double sx, double sy, double sw, double sh,
518 int x, int y, int w, int h,
519 int r, int g, int b, int a,
520 Eina_Bool smooth, Eina_Bool tex_only);
521 void evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc,
522 Evas_GL_Texture *tex,
523 Evas_GL_Texture *texm,
524 double sx, double sy, double sw, double sh,
525 double sxm, double sym, double swm, double shm,
526 int x, int y, int w, int h,
527 int r, int g, int b, int a,
531 void evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
532 Evas_GL_Texture *tex,
533 double sx, double sy, double sw, double sh,
534 int x, int y, int w, int h,
535 int r, int g, int b, int a);
536 void evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
537 Evas_GL_Texture *tex,
538 double sx, double sy, double sw, double sh,
539 int x, int y, int w, int h,
540 int r, int g, int b, int a,
542 void evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
543 Evas_GL_Texture *tex,
544 double sx, double sy, double sw, double sh,
545 int x, int y, int w, int h,
546 int r, int g, int b, int a,
548 void evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
549 Evas_GL_Texture *tex,
550 double sx, double sy, double sw, double sh,
551 int x, int y, int w, int h,
552 int r, int g, int b, int a,
554 void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
555 Evas_GL_Texture *tex,
558 int clip, int cx, int cy, int cw, int ch,
559 int r, int g, int b, int a,
562 Evas_Colorspace cspace);
563 void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc);
565 int evas_gl_common_shader_program_init(Evas_GL_Shared *shared);
566 void evas_gl_common_shader_program_init_done(void);
567 void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p);
569 void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h);
571 void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt);
572 Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im);
573 Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im);
574 Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
575 Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
576 void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im);
577 void evas_gl_common_texture_free(Evas_GL_Texture *tex);
578 Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
579 void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
580 Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
581 void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h);
582 Evas_GL_Texture *evas_gl_common_texture_yuy2_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
583 void evas_gl_common_texture_yuy2_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h);
584 Evas_GL_Texture *evas_gl_common_texture_nv12_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
585 void evas_gl_common_texture_nv12_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h);
586 Evas_GL_Texture *evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
587 void evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h);
589 void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc);
591 void evas_gl_common_image_ref(Evas_GL_Image *im);
592 void evas_gl_common_image_unref(Evas_GL_Image *im);
593 Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
594 Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace);
595 Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace);
596 Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace);
597 Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha);
598 void evas_gl_common_image_native_enable(Evas_GL_Image *im);
599 void evas_gl_common_image_native_disable(Evas_GL_Image *im);
600 void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint);
601 void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint);
602 void evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc);
603 void evas_gl_common_image_free(Evas_GL_Image *im);
604 Evas_GL_Image *evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
605 void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
606 void evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
607 void evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level);
608 void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
610 void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg);
611 void evas_gl_font_texture_free(void *);
612 void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y);
614 Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
615 Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
616 void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y);
618 void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2);
620 #if 0 // filtering disabled
621 void evas_gl_common_filter_draw(Evas_Engine_GL_Context *context, Evas_GL_Image *im, Evas_Filter_Info *filter);
622 Filtered_Image *evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t keylen);
623 Filtered_Image *evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage, uint8_t *key, size_t keylen);
624 void evas_gl_common_image_filtered_free(Evas_GL_Image *im, Filtered_Image *);
627 extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b);
628 extern void (*glsym_glBindFramebuffer) (GLenum a, GLuint b);
629 extern void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e);
630 extern void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b);
631 extern void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e);
632 extern void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d);
633 extern void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d);
634 extern void (*glsym_glReleaseShaderCompiler)(void);
636 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
637 extern void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e);
638 extern unsigned int (*secsym_eglDestroyImage) (void *a, void *b);
639 extern void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b);
640 extern void *(*secsym_eglMapImageSEC) (void *a, void *b);
641 extern unsigned int (*secsym_eglUnmapImageSEC) (void *a, void *b);
642 extern unsigned int (*secsym_eglGetImageAttribSEC) (void *a, void *b, int c, int *d);
645 //#define GL_ERRORS 1
648 # define GLERR(fn, fl, ln, op) \
650 int __gl_err = glGetError(); \
651 if (__gl_err != GL_NO_ERROR) glerr(__gl_err, fl, fn, ln, op); \
654 # define GLERR(fn, fl, ln, op)
657 Eina_Bool evas_gl_common_module_open(void);
658 void evas_gl_common_module_close(void);