sl@0: /* sl@0: * Copyright (c) 2009 Symbian Foundation Ltd sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Symbian Foundation Ltd - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Implementation of EGL interface sl@0: */ sl@0: sl@0: #include sl@0: #include "eglinternal.h" sl@0: #include sl@0: sl@0: sl@0: extern "C" { sl@0: sl@0: EXPORT_C EGLint eglGetError(void) sl@0: { sl@0: return do_eglGetError(); sl@0: } sl@0: EXPORT_C EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) sl@0: { sl@0: return do_eglGetDisplay(display_id); sl@0: } sl@0: EXPORT_C EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) sl@0: { sl@0: return do_eglInitialize(dpy, major, minor); sl@0: } sl@0: EXPORT_C EGLBoolean eglTerminate(EGLDisplay dpy) sl@0: { sl@0: return do_eglTerminate(dpy); sl@0: } sl@0: EXPORT_C const char* eglQueryString(EGLDisplay dpy, EGLint name) sl@0: { sl@0: return do_eglQueryString(dpy, name); sl@0: } sl@0: EXPORT_C EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,EGLint config_size, EGLint *num_config) sl@0: { sl@0: return do_eglGetConfigs(dpy, configs,config_size, num_config); sl@0: } sl@0: EXPORT_C EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,EGLConfig *configs, EGLint config_size,EGLint *num_config) sl@0: { sl@0: return do_eglChooseConfig(dpy, attrib_list,configs, config_size,num_config); sl@0: } sl@0: EXPORT_C EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,EGLint attribute, EGLint *value) sl@0: { sl@0: return do_eglGetConfigAttrib(dpy, config,attribute, value); sl@0: } sl@0: EXPORT_C EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,EGLNativeWindowType win,const EGLint *attrib_list) sl@0: { sl@0: return do_eglCreateWindowSurface(dpy, config,win,attrib_list); sl@0: } sl@0: EXPORT_C EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,const EGLint *attrib_list) sl@0: { sl@0: return do_eglCreatePbufferSurface(dpy, config,attrib_list); sl@0: } sl@0: EXPORT_C EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,EGLNativePixmapType pixmap,const EGLint *attrib_list) sl@0: { sl@0: return do_eglCreatePixmapSurface(dpy, config,pixmap,attrib_list); sl@0: } sl@0: EXPORT_C EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) sl@0: { sl@0: return do_eglDestroySurface(dpy, surface); sl@0: } sl@0: EXPORT_C EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface,EGLint attribute, EGLint *value) sl@0: { sl@0: return do_eglQuerySurface(dpy, surface,attribute, value); sl@0: } sl@0: EXPORT_C EGLBoolean eglBindAPI(EGLenum api) sl@0: { sl@0: return do_eglBindAPI(api); sl@0: } sl@0: EXPORT_C EGLenum eglQueryAPI(void) sl@0: { sl@0: return do_eglQueryAPI(); sl@0: } sl@0: EXPORT_C EGLBoolean eglWaitClient(void) sl@0: { sl@0: return do_eglWaitClient(); sl@0: } sl@0: EXPORT_C EGLBoolean eglReleaseThread(void) sl@0: { sl@0: return do_eglReleaseThread(); sl@0: } sl@0: EXPORT_C EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,EGLConfig config, const EGLint *attrib_list) sl@0: { sl@0: return do_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer,config, attrib_list); sl@0: } sl@0: EXPORT_C EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,EGLint attribute, EGLint value) sl@0: { sl@0: return do_eglSurfaceAttrib(dpy, surface,attribute, value); sl@0: } sl@0: EXPORT_C EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) sl@0: { sl@0: return do_eglBindTexImage(dpy, surface, buffer); sl@0: } sl@0: EXPORT_C EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) sl@0: { sl@0: return do_eglReleaseTexImage(dpy, surface, buffer); sl@0: } sl@0: EXPORT_C EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) sl@0: { sl@0: return do_eglSwapInterval(dpy, interval); sl@0: } sl@0: EXPORT_C EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,EGLContext share_context,const EGLint *attrib_list) sl@0: { sl@0: return do_eglCreateContext(dpy, config,share_context,attrib_list); sl@0: } sl@0: EXPORT_C EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) sl@0: { sl@0: return do_eglDestroyContext(dpy, ctx); sl@0: } sl@0: EXPORT_C EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,EGLSurface read, EGLContext ctx) sl@0: { sl@0: return do_eglMakeCurrent(dpy, draw,read, ctx); sl@0: } sl@0: EXPORT_C EGLContext eglGetCurrentContext(void) sl@0: { sl@0: return do_eglGetCurrentContext(); sl@0: } sl@0: EXPORT_C EGLSurface eglGetCurrentSurface(EGLint readdraw) sl@0: { sl@0: return do_eglGetCurrentSurface(readdraw); sl@0: } sl@0: EXPORT_C EGLDisplay eglGetCurrentDisplay(void) sl@0: { sl@0: return do_eglGetCurrentDisplay(); sl@0: } sl@0: EXPORT_C EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx,EGLint attribute, EGLint *value) sl@0: { sl@0: return do_eglQueryContext(dpy, ctx,attribute, value); sl@0: } sl@0: EXPORT_C EGLBoolean eglWaitGL(void) sl@0: { sl@0: return do_eglWaitGL(); sl@0: } sl@0: EXPORT_C EGLBoolean eglWaitNative(EGLint engine) sl@0: { sl@0: return do_eglWaitNative(engine); sl@0: } sl@0: EXPORT_C EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) sl@0: { sl@0: return do_eglSwapBuffers(dpy, surface); sl@0: } sl@0: EXPORT_C EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,EGLNativePixmapType target) sl@0: { sl@0: return do_eglCopyBuffers(dpy, surface,target); sl@0: } sl@0: sl@0: typedef void (*eglfPtr)(...); sl@0: EXPORT_C void (*eglGetProcAddress(const char *procname))(...) sl@0: { sl@0: eglfPtr pname = do_eglGetProcAddress(procname); sl@0: return pname; sl@0: } sl@0: } sl@0: