| // Generated Code - DO NOT EDIT !! |
| // generated by 'emugen' |
| #include <stdio.h> |
| #include <stdlib.h> |
| #include "egl_wrapper_context.h" |
| |
| extern "C" { |
| EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config); |
| EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); |
| EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list); |
| EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list); |
| EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list); |
| EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list); |
| EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext context); |
| EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface); |
| EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value); |
| EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config); |
| EGLDisplay eglGetCurrentDisplay(); |
| EGLSurface eglGetCurrentSurface(EGLint readdraw); |
| EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id); |
| EGLint eglGetError(); |
| __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* procname); |
| EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor); |
| EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext context); |
| EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext context, EGLint attribute, EGLint* value); |
| EGLconstcharptr eglQueryString(EGLDisplay dpy, EGLint name); |
| EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value); |
| EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); |
| EGLBoolean eglTerminate(EGLDisplay dpy); |
| EGLBoolean eglWaitGL(); |
| EGLBoolean eglWaitNative(EGLint engine); |
| EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); |
| EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); |
| EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); |
| EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval); |
| EGLBoolean eglBindAPI(EGLenum api); |
| EGLenum eglQueryAPI(); |
| EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint* attrib_list); |
| EGLBoolean eglReleaseThread(); |
| EGLBoolean eglWaitClient(); |
| EGLContext eglGetCurrentContext(); |
| EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list); |
| EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); |
| EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); |
| EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint* value); |
| EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list); |
| EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image); |
| }; |
| |
| #ifndef GET_CONTEXT |
| static egl_wrapper_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL; |
| void egl_wrapper_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; } |
| #define GET_CONTEXT egl_wrapper_context_t * ctx = getCurrentContext() |
| #endif |
| |
| EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) |
| { |
| GET_CONTEXT; |
| return ctx->eglChooseConfig( dpy, attrib_list, configs, config_size, num_config); |
| } |
| |
| EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) |
| { |
| GET_CONTEXT; |
| return ctx->eglCopyBuffers( dpy, surface, target); |
| } |
| |
| EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreateContext( dpy, config, share_context, attrib_list); |
| } |
| |
| EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreatePbufferSurface( dpy, config, attrib_list); |
| } |
| |
| EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreatePixmapSurface( dpy, config, pixmap, attrib_list); |
| } |
| |
| EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreateWindowSurface( dpy, config, win, attrib_list); |
| } |
| |
| EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext context) |
| { |
| GET_CONTEXT; |
| return ctx->eglDestroyContext( dpy, context); |
| } |
| |
| EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) |
| { |
| GET_CONTEXT; |
| return ctx->eglDestroySurface( dpy, surface); |
| } |
| |
| EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value) |
| { |
| GET_CONTEXT; |
| return ctx->eglGetConfigAttrib( dpy, config, attribute, value); |
| } |
| |
| EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) |
| { |
| GET_CONTEXT; |
| return ctx->eglGetConfigs( dpy, configs, config_size, num_config); |
| } |
| |
| EGLDisplay eglGetCurrentDisplay() |
| { |
| GET_CONTEXT; |
| return ctx->eglGetCurrentDisplay(); |
| } |
| |
| EGLSurface eglGetCurrentSurface(EGLint readdraw) |
| { |
| GET_CONTEXT; |
| return ctx->eglGetCurrentSurface( readdraw); |
| } |
| |
| EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) |
| { |
| GET_CONTEXT; |
| return ctx->eglGetDisplay( display_id); |
| } |
| |
| EGLint eglGetError() |
| { |
| GET_CONTEXT; |
| return ctx->eglGetError(); |
| } |
| |
| __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* procname) |
| { |
| GET_CONTEXT; |
| return ctx->eglGetProcAddress( procname); |
| } |
| |
| EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) |
| { |
| GET_CONTEXT; |
| return ctx->eglInitialize( dpy, major, minor); |
| } |
| |
| EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext context) |
| { |
| GET_CONTEXT; |
| return ctx->eglMakeCurrent( dpy, draw, read, context); |
| } |
| |
| EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext context, EGLint attribute, EGLint* value) |
| { |
| GET_CONTEXT; |
| return ctx->eglQueryContext( dpy, context, attribute, value); |
| } |
| |
| EGLconstcharptr eglQueryString(EGLDisplay dpy, EGLint name) |
| { |
| GET_CONTEXT; |
| return ctx->eglQueryString( dpy, name); |
| } |
| |
| EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value) |
| { |
| GET_CONTEXT; |
| return ctx->eglQuerySurface( dpy, surface, attribute, value); |
| } |
| |
| EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) |
| { |
| GET_CONTEXT; |
| return ctx->eglSwapBuffers( dpy, surface); |
| } |
| |
| EGLBoolean eglTerminate(EGLDisplay dpy) |
| { |
| GET_CONTEXT; |
| return ctx->eglTerminate( dpy); |
| } |
| |
| EGLBoolean eglWaitGL() |
| { |
| GET_CONTEXT; |
| return ctx->eglWaitGL(); |
| } |
| |
| EGLBoolean eglWaitNative(EGLint engine) |
| { |
| GET_CONTEXT; |
| return ctx->eglWaitNative( engine); |
| } |
| |
| EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) |
| { |
| GET_CONTEXT; |
| return ctx->eglBindTexImage( dpy, surface, buffer); |
| } |
| |
| EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) |
| { |
| GET_CONTEXT; |
| return ctx->eglReleaseTexImage( dpy, surface, buffer); |
| } |
| |
| EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) |
| { |
| GET_CONTEXT; |
| return ctx->eglSurfaceAttrib( dpy, surface, attribute, value); |
| } |
| |
| EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) |
| { |
| GET_CONTEXT; |
| return ctx->eglSwapInterval( dpy, interval); |
| } |
| |
| EGLBoolean eglBindAPI(EGLenum api) |
| { |
| GET_CONTEXT; |
| return ctx->eglBindAPI( api); |
| } |
| |
| EGLenum eglQueryAPI() |
| { |
| GET_CONTEXT; |
| return ctx->eglQueryAPI(); |
| } |
| |
| EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreatePbufferFromClientBuffer( dpy, buftype, buffer, config, attrib_list); |
| } |
| |
| EGLBoolean eglReleaseThread() |
| { |
| GET_CONTEXT; |
| return ctx->eglReleaseThread(); |
| } |
| |
| EGLBoolean eglWaitClient() |
| { |
| GET_CONTEXT; |
| return ctx->eglWaitClient(); |
| } |
| |
| EGLContext eglGetCurrentContext() |
| { |
| GET_CONTEXT; |
| return ctx->eglGetCurrentContext(); |
| } |
| |
| EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreateSyncKHR( dpy, type, attrib_list); |
| } |
| |
| EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) |
| { |
| GET_CONTEXT; |
| return ctx->eglDestroySyncKHR( dpy, sync); |
| } |
| |
| EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) |
| { |
| GET_CONTEXT; |
| return ctx->eglClientWaitSyncKHR( dpy, sync, flags, timeout); |
| } |
| |
| EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint* value) |
| { |
| GET_CONTEXT; |
| return ctx->eglGetSyncAttribKHR( dpy, sync, attribute, value); |
| } |
| |
| EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list) |
| { |
| GET_CONTEXT; |
| return ctx->eglCreateImageKHR( dpy, context, target, buffer, attrib_list); |
| } |
| |
| EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) |
| { |
| GET_CONTEXT; |
| return ctx->eglDestroyImageKHR( dpy, image); |
| } |
| |