1 #ifndef _EVAS_GL_CORE_H
2 #define _EVAS_GL_CORE_H
3 #define EVAS_GL_NO_GL_H_CHECK 1
4 #include "Evas_GL.h"
5 
6 #ifdef EAPI
7 # undef EAPI
8 #endif
9 
10 #ifdef _WIN32
11 # ifdef EFL_BUILD
12 #  ifdef DLL_EXPORT
13 #   define EAPI __declspec(dllexport)
14 #  else
15 #   define EAPI
16 #  endif
17 # else
18 #  define EAPI __declspec(dllimport)
19 # endif
20 #else
21 # ifdef __GNUC__
22 #  if __GNUC__ >= 4
23 #   define EAPI __attribute__ ((visibility("default")))
24 #  else
25 #   define EAPI
26 #  endif
27 # else
28 #  define EAPI
29 # endif
30 #endif
31 
32 typedef void *EVGLNative_Display;
33 typedef void *EVGLNative_Window;
34 typedef void *EVGLNative_Surface;
35 typedef void *EVGLNative_Context;
36 typedef struct _EVGL_Engine         EVGL_Engine;
37 typedef struct _EVGL_Interface      EVGL_Interface;
38 typedef struct _EVGL_Surface        EVGL_Surface;
39 typedef struct _EVGL_Native_Window  EVGL_Native_Window;
40 typedef struct _EVGL_Context        EVGL_Context;
41 typedef struct _EVGL_Resource       EVGL_Resource;
42 typedef struct _EVGL_Cap            EVGL_Cap;
43 typedef struct _EVGL_Surface_Cap    EVGL_Surface_Cap;
44 typedef struct _EVGL_Surface_Format EVGL_Surface_Format;
45 
46 EAPI void         evgl_engine_shutdown(void *eng_data);
47 EAPI void        *evgl_native_surface_buffer_get(EVGL_Surface *sfc, Eina_Bool *is_egl_image);
48 EAPI int          evgl_native_surface_yinvert_get(EVGL_Surface *sfc);
49 EAPI void        *evgl_current_native_context_get(EVGL_Context *ctx);
50 EAPI void         evas_gl_common_context_restore_set(Eina_Bool);
51 
52 typedef void (*EVGL_Engine_Call)(void *eng_data);
53 typedef void *(*EVGL_Native_Surface_Call)(void *sfc, Eina_Bool *is_egl_image);
54 typedef int (*EVGL_Native_Surface_Yinvert_Call)(void *sfc);
55 typedef void *(*EVGL_Current_Native_Context_Get_Call)(void *ctx);
56 
57 EVGL_Engine *evgl_engine_init(void *eng_data, const EVGL_Interface *efunc);
58 
59 void        *evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h);
60 void        *evgl_pbuffer_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h, const int *attrib_list);
61 int          evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc);
62 void        *evgl_context_create(void *eng_data, EVGL_Context *share_ctx, Evas_GL_Context_Version version, void *(*native_context_get)(void *), void *(*engine_data_get)(void *));
63 int          evgl_context_destroy(void *eng_data, EVGL_Context *ctx);
64 int          evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx);
65 
66 const char  *evgl_string_query(int name);
67 int          evgl_native_surface_get(EVGL_Surface *sfc, Evas_Native_Surface *ns);
68 Evas_GL_API *evgl_api_get(void *eng_data, Evas_GL_Context_Version version, Eina_Bool alloc_only);
69 void         evgl_safe_extension_add(const char *name, void *funcptr);
70 Eina_Bool    evgl_safe_extension_get(const char *name, void **pfuncptr);
71 
72 int          evgl_direct_rendered(void);
73 void         evgl_direct_override_get(Eina_Bool *override, Eina_Bool *force_off);
74 void         evgl_direct_info_set(int win_w, int win_h, int rot,
75                                   int img_x, int img_y, int img_w, int img_h,
76                                   int clip_x, int clip_y, int clip_w, int clip_h,
77                                   int render_op, void *surface);
78 void         evgl_direct_info_clear(void);
79 void         evgl_get_pixels_pre(void);
80 void         evgl_get_pixels_post(void);
81 
82 Eina_Bool    evgl_native_surface_direct_opts_get(Evas_Native_Surface *ns,
83                                                  Eina_Bool *direct_render,
84                                                  Eina_Bool *client_side_rotation,
85                                                  Eina_Bool *direct_override);
86 
87 void         evgl_direct_partial_info_set(int pres);
88 void         evgl_direct_partial_info_clear(void);
89 void         evgl_direct_partial_render_start(void);
90 void         evgl_direct_partial_render_end(void);
91 
92 #undef EAPI
93 #define EAPI
94 
95 #endif //_EVAS_GL_CORE_H
96