4 * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
8 * Vitaliy Cherepanov <v.cherepanov@samsung.com>
10 * This library is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU Lesser General Public License as published by the
12 * Free Software Foundation; either version 2.1 of the License, or (at your option)
15 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation, Inc., 51
22 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 * - Samsung RnD Institute Russia
29 #include "da_gles20.h"
32 #include "common_probe_init.h"
34 static enum DaOptions _sopt = OPT_GLES;
36 /* Evas open gl API functions */
38 void evas_gl_free(Evas_GL *evas_gl)
40 typedef void (*methodType)(Evas_GL *evas_gl);
41 BEFORE_EVAS_GL(evas_gl_free);
42 evas_gl_freep(evas_gl);
44 AFTER('v', NO_RETURN_VALUE, APITYPE_CONTEXT, "", "p",
48 void evas_gl_config_free(Evas_GL_Config *cfg)
50 typedef void (*methodType)(Evas_GL_Config *cfg);
51 BEFORE_EVAS_GL(evas_gl_config_free);
52 evas_gl_config_freep(cfg);
54 AFTER('v', NO_RETURN_VALUE, APITYPE_CONTEXT, "", "p",
58 void evas_gl_surface_destroy(Evas_GL *evas_gl, Evas_GL_Surface *surf)
60 typedef void (*methodType)(Evas_GL *evas_gl, Evas_GL_Surface *surf);
61 BEFORE_EVAS_GL(evas_gl_surface_destroy);
62 evas_gl_surface_destroyp(evas_gl, surf);
64 AFTER('v', NO_RETURN_VALUE, APITYPE_CONTEXT, "", "pp",
68 void evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx)
70 typedef void (*methodType)(Evas_GL *evas_gl, Evas_GL_Context *ctx);
71 BEFORE_EVAS_GL(evas_gl_context_destroy);
72 evas_gl_context_destroyp(evas_gl, ctx);
74 AFTER('v', NO_RETURN_VALUE, APITYPE_CONTEXT, "", "pp",
79 Evas_GL *evas_gl_new(Evas *e)
81 typedef Evas_GL *(*methodType)(Evas *e);
82 BEFORE_EVAS_GL(evas_gl_new);
83 Evas_GL *res = evas_gl_newp(e);
85 AFTER('p', res, APITYPE_CONTEXT, "", "p",
90 Evas_GL_Config *evas_gl_config_new(void)
92 typedef Evas_GL_Config *(*methodType)(void);
93 BEFORE_EVAS_GL(evas_gl_config_new);
94 Evas_GL_Config *res = evas_gl_config_newp();
96 AFTER_NO_PARAM('p', res, APITYPE_CONTEXT, "");
100 Evas_GL_Surface *evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *cfg,
103 typedef Evas_GL_Surface *(*methodType)(Evas_GL *evas_gl,
106 BEFORE_EVAS_GL(evas_gl_surface_create);
107 Evas_GL_Surface *res = evas_gl_surface_createp(evas_gl, cfg, w, h);
109 AFTER('p', res, APITYPE_CONTEXT, "", "ppdd",
114 Evas_GL_Context *evas_gl_context_create(Evas_GL *evas_gl,
115 Evas_GL_Context *share_ctx)
117 typedef Evas_GL_Context *(*methodType)(Evas_GL *evas_gl, Evas_GL_Context *share_ctx);
118 BEFORE_EVAS_GL(evas_gl_context_create);
119 Evas_GL_Context *res = evas_gl_context_createp(evas_gl, share_ctx);
121 AFTER('p', res, APITYPE_CONTEXT, "", "pp",
126 Eina_Bool evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf,
127 Evas_GL_Context *ctx)
129 typedef Eina_Bool (*methodType)(Evas_GL *evas_gl, Evas_GL_Surface *surf,
130 Evas_GL_Context *ctx);
131 BEFORE_EVAS_GL(evas_gl_make_current);
132 Eina_Bool res = evas_gl_make_currentp(evas_gl, surf, ctx);
134 AFTER('b', res, APITYPE_CONTEXT, "", "ppp",
139 const char *evas_gl_string_query(Evas_GL *evas_gl, int name)
141 typedef const char *(*methodType)(Evas_GL *evas_gl, int name);
142 BEFORE_EVAS_GL(evas_gl_string_query);
143 const char *res = evas_gl_string_queryp(evas_gl, name);
145 AFTER('s', res, APITYPE_CONTEXT, "", "pd",
150 Evas_GL_Func evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name)
152 typedef Evas_GL_Func(*methodType)(Evas_GL *evas_gl, const char *name);
153 BEFORE_EVAS_GL(evas_gl_proc_address_get);
154 Evas_GL_Func res = evas_gl_proc_address_getp(evas_gl, name);
156 AFTER('p', res, APITYPE_CONTEXT, "", "ps",
161 Eina_Bool evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf,
162 Evas_Native_Surface *ns)
164 typedef Eina_Bool(*methodType)(Evas_GL *evas_gl, Evas_GL_Surface *surf,
165 Evas_Native_Surface *ns);
166 BEFORE_EVAS_GL(evas_gl_native_surface_get);
167 Eina_Bool res = evas_gl_native_surface_getp(evas_gl, surf, ns);
169 AFTER('b', res, APITYPE_CONTEXT, "", "ppp",
174 Evas_GL_API *evas_gl_api_get(Evas_GL *evas_gl)
176 typedef Evas_GL_API *(*methodType)(Evas_GL *evas_gl);
177 BEFORE_EVAS_GL(evas_gl_api_get);
178 Evas_GL_API *res = evas_gl_api_getp(evas_gl);
181 AFTER('p', res, APITYPE_CONTEXT, "", "p",