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
30 #include "da_gles20.h"
32 #include "common_probe_init.h"
33 #include "real_functions.h"
35 /* GL __local_* functions prototypes */
36 #define X(func) extern void __local_##func(void);
37 #include "da_gl_api_func_list.h"
40 /* --------------------------------- */
43 static bool __gl_api_initialized = 0;
44 Evas_GL_API *__gl_api = NULL;
46 void __init_gl_api__(void)
49 __gl_api = real_malloc(sizeof(*__gl_api));
50 memset(__gl_api, 0, sizeof(*__gl_api));
53 void save_orig_gl_api_list(Evas_GL_API *api)
55 /* TODO make this check more pretty */
56 if (__gl_api_initialized == 0) {
57 memcpy(__gl_api, api, sizeof(*api));
58 __gl_api_initialized = 1;
62 /* IMPORTANT this code must be right before change_gl_api_list function!
64 * next define is GL api replacing by probe functions
69 api->func = (typeof(api->func)) __local_##func; \
70 if (api->func == NULL) \
71 PRINTWRN("api->%s not setted", #func); \
73 #include "da_gl_api_func_list.h"
74 /* --------------------------------------------------------------------- */
76 void change_gl_api_list(Evas_GL_API *api)