|
1 /* |
|
2 * Copyright (c) 2009 Symbian Foundation Ltd |
|
3 * This component and the accompanying materials are made available |
|
4 * under the terms of the License "Eclipse Public License v1.0" |
|
5 * which accompanies this distribution, and is available |
|
6 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 * |
|
8 * Initial Contributors: |
|
9 * Symbian Foundation Ltd - initial contribution. |
|
10 * |
|
11 * Contributors: |
|
12 * |
|
13 * Description: |
|
14 * Implementation of EGL interface |
|
15 */ |
|
16 |
|
17 #include <egl.h> |
|
18 #include "eglinternal.h" |
|
19 #include <stdarg.h> |
|
20 |
|
21 |
|
22 extern "C" { |
|
23 |
|
24 EXPORT_C EGLint eglGetError(void) |
|
25 { |
|
26 return do_eglGetError(); |
|
27 } |
|
28 EXPORT_C EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) |
|
29 { |
|
30 return do_eglGetDisplay(display_id); |
|
31 } |
|
32 EXPORT_C EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) |
|
33 { |
|
34 return do_eglInitialize(dpy, major, minor); |
|
35 } |
|
36 EXPORT_C EGLBoolean eglTerminate(EGLDisplay dpy) |
|
37 { |
|
38 return do_eglTerminate(dpy); |
|
39 } |
|
40 EXPORT_C const char* eglQueryString(EGLDisplay dpy, EGLint name) |
|
41 { |
|
42 return do_eglQueryString(dpy, name); |
|
43 } |
|
44 EXPORT_C EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,EGLint config_size, EGLint *num_config) |
|
45 { |
|
46 return do_eglGetConfigs(dpy, configs,config_size, num_config); |
|
47 } |
|
48 EXPORT_C EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,EGLConfig *configs, EGLint config_size,EGLint *num_config) |
|
49 { |
|
50 return do_eglChooseConfig(dpy, attrib_list,configs, config_size,num_config); |
|
51 } |
|
52 EXPORT_C EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,EGLint attribute, EGLint *value) |
|
53 { |
|
54 return do_eglGetConfigAttrib(dpy, config,attribute, value); |
|
55 } |
|
56 EXPORT_C EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,EGLNativeWindowType win,const EGLint *attrib_list) |
|
57 { |
|
58 return do_eglCreateWindowSurface(dpy, config,win,attrib_list); |
|
59 } |
|
60 EXPORT_C EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,const EGLint *attrib_list) |
|
61 { |
|
62 return do_eglCreatePbufferSurface(dpy, config,attrib_list); |
|
63 } |
|
64 EXPORT_C EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,EGLNativePixmapType pixmap,const EGLint *attrib_list) |
|
65 { |
|
66 return do_eglCreatePixmapSurface(dpy, config,pixmap,attrib_list); |
|
67 } |
|
68 EXPORT_C EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) |
|
69 { |
|
70 return do_eglDestroySurface(dpy, surface); |
|
71 } |
|
72 EXPORT_C EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface,EGLint attribute, EGLint *value) |
|
73 { |
|
74 return do_eglQuerySurface(dpy, surface,attribute, value); |
|
75 } |
|
76 EXPORT_C EGLBoolean eglBindAPI(EGLenum api) |
|
77 { |
|
78 return do_eglBindAPI(api); |
|
79 } |
|
80 EXPORT_C EGLenum eglQueryAPI(void) |
|
81 { |
|
82 return do_eglQueryAPI(); |
|
83 } |
|
84 EXPORT_C EGLBoolean eglWaitClient(void) |
|
85 { |
|
86 return do_eglWaitClient(); |
|
87 } |
|
88 EXPORT_C EGLBoolean eglReleaseThread(void) |
|
89 { |
|
90 return do_eglReleaseThread(); |
|
91 } |
|
92 EXPORT_C EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,EGLConfig config, const EGLint *attrib_list) |
|
93 { |
|
94 return do_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer,config, attrib_list); |
|
95 } |
|
96 EXPORT_C EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,EGLint attribute, EGLint value) |
|
97 { |
|
98 return do_eglSurfaceAttrib(dpy, surface,attribute, value); |
|
99 } |
|
100 EXPORT_C EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) |
|
101 { |
|
102 return do_eglBindTexImage(dpy, surface, buffer); |
|
103 } |
|
104 EXPORT_C EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) |
|
105 { |
|
106 return do_eglReleaseTexImage(dpy, surface, buffer); |
|
107 } |
|
108 EXPORT_C EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) |
|
109 { |
|
110 return do_eglSwapInterval(dpy, interval); |
|
111 } |
|
112 EXPORT_C EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,EGLContext share_context,const EGLint *attrib_list) |
|
113 { |
|
114 return do_eglCreateContext(dpy, config,share_context,attrib_list); |
|
115 } |
|
116 EXPORT_C EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) |
|
117 { |
|
118 return do_eglDestroyContext(dpy, ctx); |
|
119 } |
|
120 EXPORT_C EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,EGLSurface read, EGLContext ctx) |
|
121 { |
|
122 return do_eglMakeCurrent(dpy, draw,read, ctx); |
|
123 } |
|
124 EXPORT_C EGLContext eglGetCurrentContext(void) |
|
125 { |
|
126 return do_eglGetCurrentContext(); |
|
127 } |
|
128 EXPORT_C EGLSurface eglGetCurrentSurface(EGLint readdraw) |
|
129 { |
|
130 return do_eglGetCurrentSurface(readdraw); |
|
131 } |
|
132 EXPORT_C EGLDisplay eglGetCurrentDisplay(void) |
|
133 { |
|
134 return do_eglGetCurrentDisplay(); |
|
135 } |
|
136 EXPORT_C EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx,EGLint attribute, EGLint *value) |
|
137 { |
|
138 return do_eglQueryContext(dpy, ctx,attribute, value); |
|
139 } |
|
140 EXPORT_C EGLBoolean eglWaitGL(void) |
|
141 { |
|
142 return do_eglWaitGL(); |
|
143 } |
|
144 EXPORT_C EGLBoolean eglWaitNative(EGLint engine) |
|
145 { |
|
146 return do_eglWaitNative(engine); |
|
147 } |
|
148 EXPORT_C EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) |
|
149 { |
|
150 return do_eglSwapBuffers(dpy, surface); |
|
151 } |
|
152 EXPORT_C EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,EGLNativePixmapType target) |
|
153 { |
|
154 return do_eglCopyBuffers(dpy, surface,target); |
|
155 } |
|
156 |
|
157 typedef void (*eglfPtr)(...); |
|
158 EXPORT_C void (*eglGetProcAddress(const char *procname))(...) |
|
159 { |
|
160 eglfPtr pname = do_eglGetProcAddress(procname); |
|
161 return pname; |
|
162 } |
|
163 } |
|
164 |