76 { |
78 { |
77 GET_THREAD_SESSION(session, NULL) |
79 GET_THREAD_SESSION(session, NULL) |
78 return session->EglQueryString(dpy, name); |
80 return session->EglQueryString(dpy, name); |
79 } |
81 } |
80 |
82 |
|
83 typedef void (*eglfPtr)(...); |
81 EXPORT_C TFuncPtrEglProc eglGetProcAddress (const char *procname) |
84 EXPORT_C TFuncPtrEglProc eglGetProcAddress (const char *procname) |
82 { |
85 { |
83 GET_THREAD_SESSION(session, NULL) |
86 GET_THREAD_SESSION(session, NULL) |
84 return session->EglGetProcAddress(procname); |
87 return session->EglGetProcAddress(procname); |
|
88 |
|
89 //eglfPtr pname = do_eglGetProcAddress(procname); |
|
90 //return pname; |
85 } |
91 } |
86 |
92 |
87 // Unsupported EGL APIs |
93 // Unsupported EGL APIs |
88 // |
94 // |
89 EXPORT_C EGLBoolean eglGetConfigs(EGLDisplay /*dpy*/, EGLConfig */*configs*/, |
95 EXPORT_C EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, |
90 EGLint /*config_size*/, EGLint */*num_config*/) |
96 EGLint config_size, EGLint *num_config) |
91 { |
97 { |
92 PANIC_NOT_SUPPORTED |
98 GET_THREAD_SESSION(session, EGL_FALSE) |
93 } |
99 return session->EglGetConfigs(dpy, configs,config_size, num_config); |
94 |
100 } |
95 EXPORT_C EGLBoolean eglChooseConfig(EGLDisplay /*dpy*/, const EGLint */*attrib_list*/, |
101 |
96 EGLConfig */*configs*/, EGLint /*config_size*/, |
102 EXPORT_C EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, |
97 EGLint */*num_config*/) |
103 EGLConfig *configs, EGLint config_size,EGLint *num_config) |
98 { |
104 { |
99 PANIC_NOT_SUPPORTED |
105 GET_THREAD_SESSION(session, EGL_FALSE) |
|
106 return session->EglChooseConfig(dpy, attrib_list,configs, config_size,num_config); |
100 } |
107 } |
101 |
108 |
102 EXPORT_C EGLBoolean eglGetConfigAttrib(EGLDisplay /*dpy*/, EGLConfig /*config*/, |
109 EXPORT_C EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, |
103 EGLint /*attribute*/, EGLint */*value*/) |
110 EGLint attribute, EGLint *value) |
104 { |
111 { |
105 PANIC_NOT_SUPPORTED |
112 GET_THREAD_SESSION(session, EGL_FALSE) |
106 } |
113 return session->EglGetConfigAttrib(dpy, config,attribute,value); |
107 |
114 } |
108 EXPORT_C EGLSurface eglCreateWindowSurface(EGLDisplay /*dpy*/, EGLConfig /*config*/, |
115 |
109 EGLNativeWindowType /*win*/, |
116 EXPORT_C EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, |
110 const EGLint */*attrib_list*/) |
117 const EGLint *attrib_list) |
111 { |
118 { |
112 PANIC_NOT_SUPPORTED |
119 GET_THREAD_SESSION(session, EGL_NO_SURFACE) |
113 } |
120 return session->EglCreateWindowSurface(dpy, config,win,attrib_list); |
114 |
121 } |
115 EXPORT_C EGLSurface eglCreatePbufferSurface(EGLDisplay /*dpy*/, EGLConfig /*config*/, |
122 |
116 const EGLint */*attrib_list*/) |
123 EXPORT_C EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, |
117 { |
124 const EGLint *attrib_list) |
118 PANIC_NOT_SUPPORTED |
125 { |
119 } |
126 GET_THREAD_SESSION(session, EGL_NO_SURFACE) |
120 |
127 return session->EglCreatePbufferSurface(dpy, config,attrib_list); |
121 EXPORT_C EGLSurface eglCreatePixmapSurface(EGLDisplay /*dpy*/, EGLConfig /*config*/, |
128 } |
122 EGLNativePixmapType /*pixmap*/, |
129 |
123 const EGLint */*attrib_list*/) |
130 EXPORT_C EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, |
124 { |
131 EGLNativePixmapType pixmap, |
125 PANIC_NOT_SUPPORTED |
132 const EGLint *attrib_list) |
126 } |
133 { |
127 |
134 GET_THREAD_SESSION(session, EGL_NO_SURFACE) |
128 EXPORT_C EGLBoolean eglDestroySurface(EGLDisplay /*dpy*/, EGLSurface /*surface*/) |
135 return session->EglCreatePixmapSurface(dpy, config,pixmap,attrib_list); |
129 { |
136 } |
130 PANIC_NOT_SUPPORTED |
137 |
131 } |
138 EXPORT_C EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) |
132 |
139 { |
133 EXPORT_C EGLBoolean eglQuerySurface(EGLDisplay /*dpy*/, EGLSurface /*surface*/, |
140 GET_THREAD_SESSION(session, EGL_FALSE) |
134 EGLint /*attribute*/, EGLint */*value*/) |
141 return session->EglDestroySurface(dpy, surface); |
135 { |
142 } |
136 PANIC_NOT_SUPPORTED |
143 |
137 } |
144 EXPORT_C EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, |
138 |
145 EGLint attribute, EGLint *value) |
139 EXPORT_C EGLBoolean eglBindAPI(EGLenum /*api*/) |
146 { |
140 { |
147 GET_THREAD_SESSION(session, EGL_FALSE) |
141 PANIC_NOT_SUPPORTED |
148 return session->EglQuerySurface(dpy, surface,attribute, value); |
|
149 } |
|
150 |
|
151 EXPORT_C EGLBoolean eglBindAPI(EGLenum api) |
|
152 { |
|
153 GET_THREAD_SESSION(session, EGL_FALSE) |
|
154 return session->EglBindAPI(api); |
142 } |
155 } |
143 |
156 |
144 EXPORT_C EGLenum eglQueryAPI(void) |
157 EXPORT_C EGLenum eglQueryAPI(void) |
145 { |
158 { |
146 PANIC_NOT_SUPPORTED |
159 GET_THREAD_SESSION(session, EGL_NONE) |
|
160 return session->EglQueryAPI(); |
147 } |
161 } |
148 |
162 |
149 EXPORT_C EGLBoolean eglWaitClient(void) |
163 EXPORT_C EGLBoolean eglWaitClient(void) |
150 { |
164 { |
151 PANIC_NOT_SUPPORTED |
165 GET_THREAD_SESSION(session, EGL_FALSE) |
|
166 return session->EglWaitClient(); |
152 } |
167 } |
153 |
168 |
154 EXPORT_C EGLSurface eglCreatePbufferFromClientBuffer( |
169 EXPORT_C EGLSurface eglCreatePbufferFromClientBuffer( |
155 EGLDisplay /*dpy*/, EGLenum /*buftype*/, EGLClientBuffer /*buffer*/, |
170 EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, |
156 EGLConfig /*config*/, const EGLint */*attrib_list*/) |
171 EGLConfig config, const EGLint *attrib_list) |
157 { |
172 { |
158 PANIC_NOT_SUPPORTED |
173 GET_THREAD_SESSION(session, EGL_NO_SURFACE) |
159 } |
174 return session->EglCreatePbufferFromClientBuffer(dpy, buftype, buffer,config, attrib_list); |
160 |
175 } |
161 EXPORT_C EGLBoolean eglSurfaceAttrib(EGLDisplay /*dpy*/, EGLSurface /*surface*/, |
176 |
162 EGLint /*attribute*/, EGLint /*value*/) |
177 EXPORT_C EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, |
163 { |
178 EGLint attribute, EGLint value) |
164 PANIC_NOT_SUPPORTED |
179 { |
165 } |
180 GET_THREAD_SESSION(session, EGL_FALSE) |
166 |
181 return session->EglSurfaceAttrib(dpy, surface,attribute, value); |
167 EXPORT_C EGLBoolean eglBindTexImage(EGLDisplay /*dpy*/, EGLSurface /*surface*/, EGLint /*buffer*/) |
182 } |
168 { |
183 |
169 PANIC_NOT_SUPPORTED |
184 EXPORT_C EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) |
170 } |
185 { |
171 |
186 GET_THREAD_SESSION(session, EGL_FALSE) |
172 EXPORT_C EGLBoolean eglReleaseTexImage(EGLDisplay /*dpy*/, EGLSurface /*surface*/, EGLint /*buffer*/) |
187 return session->EglBindTexImage(dpy, surface, buffer); |
173 { |
188 } |
174 PANIC_NOT_SUPPORTED |
189 |
175 } |
190 EXPORT_C EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) |
176 |
191 { |
177 EXPORT_C EGLBoolean eglSwapInterval(EGLDisplay /*dpy*/, EGLint /*interval*/) |
192 GET_THREAD_SESSION(session, EGL_FALSE) |
178 { |
193 return session->EglReleaseTexImage(dpy, surface, buffer); |
179 PANIC_NOT_SUPPORTED |
194 } |
180 } |
195 |
181 |
196 EXPORT_C EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) |
182 EXPORT_C EGLContext eglCreateContext(EGLDisplay /*dpy*/, EGLConfig /*config*/, |
197 { |
183 EGLContext /*share_context*/, |
198 GET_THREAD_SESSION(session, EGL_FALSE) |
184 const EGLint */*attrib_list*/) |
199 return session->EglSwapInterval(dpy, interval); |
185 { |
200 } |
186 PANIC_NOT_SUPPORTED |
201 |
187 } |
202 EXPORT_C EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, |
188 |
203 EGLContext share_context, |
189 EXPORT_C EGLBoolean eglDestroyContext(EGLDisplay /*dpy*/, EGLContext /*ctx*/) |
204 const EGLint *attrib_list) |
190 { |
205 { |
191 PANIC_NOT_SUPPORTED |
206 GET_THREAD_SESSION(session, EGL_NO_CONTEXT) |
192 } |
207 return session->EglCreateContext(dpy, config,share_context,attrib_list); |
193 |
208 } |
194 EXPORT_C EGLBoolean eglMakeCurrent(EGLDisplay /*dpy*/, EGLSurface /*draw*/, |
209 |
195 EGLSurface /*read*/, EGLContext /*ctx*/) |
210 EXPORT_C EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) |
196 { |
211 { |
197 PANIC_NOT_SUPPORTED |
212 GET_THREAD_SESSION(session, EGL_FALSE) |
|
213 return session->EglDestroyContext(dpy, ctx); |
|
214 } |
|
215 |
|
216 EXPORT_C EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, |
|
217 EGLSurface read, EGLContext ctx) |
|
218 { |
|
219 GET_THREAD_SESSION(session, EGL_FALSE) |
|
220 return session->EglMakeCurrent(dpy, draw,read, ctx); |
198 } |
221 } |
199 |
222 |
200 EXPORT_C EGLContext eglGetCurrentContext(void) |
223 EXPORT_C EGLContext eglGetCurrentContext(void) |
201 { |
224 { |
202 PANIC_NOT_SUPPORTED |
225 GET_THREAD_SESSION(session, EGL_NO_CONTEXT) |
203 } |
226 return session->EglGetCurrentContext(); |
204 |
227 } |
205 EXPORT_C EGLSurface eglGetCurrentSurface(EGLint /*readdraw*/) |
228 |
206 { |
229 EXPORT_C EGLSurface eglGetCurrentSurface(EGLint readdraw) |
207 PANIC_NOT_SUPPORTED |
230 { |
|
231 GET_THREAD_SESSION(session, EGL_NO_SURFACE) |
|
232 return session->EglGetCurrentSurface(readdraw); |
208 } |
233 } |
209 |
234 |
210 EXPORT_C EGLDisplay eglGetCurrentDisplay(void) |
235 EXPORT_C EGLDisplay eglGetCurrentDisplay(void) |
211 { |
236 { |
212 PANIC_NOT_SUPPORTED |
237 GET_THREAD_SESSION(session, EGL_NO_DISPLAY) |
213 } |
238 return session->EglGetCurrentDisplay(); |
214 |
239 } |
215 EXPORT_C EGLBoolean eglQueryContext(EGLDisplay /*dpy*/, EGLContext /*ctx*/, |
240 |
216 EGLint /*attribute*/, EGLint */*value*/) |
241 EXPORT_C EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx, |
217 { |
242 EGLint attribute, EGLint *value) |
218 PANIC_NOT_SUPPORTED |
243 { |
|
244 GET_THREAD_SESSION(session, EGL_FALSE) |
|
245 return session->EglQueryContext(dpy, ctx,attribute, value); |
219 } |
246 } |
220 |
247 |
221 EXPORT_C EGLBoolean eglWaitGL(void) |
248 EXPORT_C EGLBoolean eglWaitGL(void) |
222 { |
249 { |
223 PANIC_NOT_SUPPORTED |
250 GET_THREAD_SESSION(session, EGL_FALSE) |
224 } |
251 return session->EglWaitGL(); |
225 |
252 } |
226 EXPORT_C EGLBoolean eglWaitNative(EGLint /*engine*/) |
253 |
227 { |
254 EXPORT_C EGLBoolean eglWaitNative(EGLint engine) |
228 PANIC_NOT_SUPPORTED |
255 { |
229 } |
256 GET_THREAD_SESSION(session, EGL_FALSE) |
230 |
257 return session->EglWaitNative(engine); |
231 EXPORT_C EGLBoolean eglSwapBuffers(EGLDisplay /*dpy*/, EGLSurface /*surface*/) |
258 } |
232 { |
259 |
233 PANIC_NOT_SUPPORTED |
260 EXPORT_C EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) |
234 } |
261 { |
235 |
262 GET_THREAD_SESSION(session, EGL_FALSE) |
236 EXPORT_C EGLBoolean eglCopyBuffers(EGLDisplay /*dpy*/, EGLSurface /*surface*/, |
263 return session->EglSwapBuffers(dpy, surface); |
237 EGLNativePixmapType /*target*/) |
264 } |
238 { |
265 |
239 PANIC_NOT_SUPPORTED |
266 EXPORT_C EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, |
|
267 EGLNativePixmapType target) |
|
268 { |
|
269 GET_THREAD_SESSION(session, EGL_FALSE) |
|
270 return session->EglCopyBuffers(dpy, surface,target); |
|
271 |
240 } |
272 } |
241 |
273 |
242 // EGL_KHR_reusable_sync APIs |
274 // EGL_KHR_reusable_sync APIs |
243 // |
275 // |
244 EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) |
276 EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) |