tizen 2.4 release
[framework/graphics/coregl.git] / src / coregl_export.c
1 #include "coregl_export.h"
2
3 #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST)     RET_TYPE (*ovr_##FUNC_NAME) PARAM_LIST = NULL;
4 #include "headers/sym.h"
5 #undef _COREGL_SYMBOL
6
7 #include "coregl_internal.h"
8 #include "coregl_export.h"
9
10 #include <stdlib.h>
11
12 int export_initialized = 0;
13 static int api_gl_version;
14
15 static void
16 _clean_overrides()
17 {
18 #define _COREGL_START_API(version) api_gl_version = version;
19 #define _COREGL_END_API(version) api_gl_version = COREGL_GLAPI_2;
20 #define OVERRIDE(f) \
21         if(api_gl_version<=driver_gl_version) COREGL_OVERRIDE_API(ovr_, f, _sym_)
22
23 #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST)     OVERRIDE(FUNC_NAME);
24 # include "headers/sym_egl.h"
25 #undef _COREGL_SYMBOL
26
27 #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST)     OVERRIDE(FUNC_NAME);
28 # include "headers/sym_gl.h"
29 #undef _COREGL_SYMBOL
30
31 #undef OVERRIDE
32 #undef _COREGL_START_API
33 #undef _COREGL_END_API
34 }
35
36 void
37 init_export()
38 {
39         _clean_overrides();
40 }
41