Add EGL/GLES2 wrapper library for build
authorHaegeun Park <haegeun.park@samsung.com>
Tue, 17 Jul 2012 04:58:10 +0000 (21:58 -0700)
committerHaegeun Park <haegeun.park@samsung.com>
Tue, 17 Jul 2012 04:58:10 +0000 (21:58 -0700)
- You should not commit library file(binary)

- Currently EGL/GL/COREGL versions are set to 3.0
  DO NOT BRAKE or MODIFY any library linkages (include symbolic links)

  GOOD Example (using tar) :

      COREGL/lib$ tar cvzf COREGL_LIBRARY.tgz *
      (TARGET)  $ tar xvzf COREGL_LIBRARY.tgz

  BAD Example (using cp) :

      COREGL/lib$ cp libCOREGL.so.3.0 (TARGET)/libCOREGL.so.1.1

18 files changed:
CMakeLists.txt
Makefile
debian/libcoregl.install.in
include/GLES2/sym_gl.h
lib/libCOREGL.so [deleted symlink]
lib/libCOREGL.so.1 [deleted symlink]
lib/libCOREGL.so.1.1 [deleted file]
lib/libEGL.so [deleted symlink]
lib/libEGL.so.1 [deleted symlink]
lib/libEGL.so.1.4 [deleted symlink]
lib/libGLESv2.so [deleted symlink]
lib/libGLESv2.so.2 [deleted symlink]
lib/libGLESv2.so.2.0 [deleted symlink]
src/coregl.c
src/coregl.h
src/coregl_export_egl.c
src/wraps/coregl_egl.c [new file with mode: 0644]
src/wraps/coregl_gl.c [new file with mode: 0644]

index 692247f..068524a 100644 (file)
@@ -5,8 +5,8 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
 SET(LIBDIR "\${prefix}/lib")
 SET(INCLUDEDIR "\${prefix}/include")
-SET(VERSION_MAJOR 1)
-SET(VERSION "${VERSION_MAJOR}.1")
+SET(VERSION_MAJOR 3)
+SET(VERSION "${VERSION_MAJOR}.0")
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
 
@@ -42,6 +42,22 @@ SET(SRCS_common
                src/modules/appopt/coregl_appopt_egl.c
                src/modules/appopt/coregl_appopt_gl.c
 )
+#################################################################
+# Build egl Library
+# ------------------------------
+SET(EGL "EGL")
+SET(EGL_SRCS_common
+               src/wraps/coregl_egl.c
+)
+#################################################################
+# Build gles2 Library
+# ------------------------------
+SET(GLES2 "GLESv2")
+SET(GLES2_SRCS_common
+               src/wraps/coregl_egl.c
+)
+
+
 
 #SET(HEADERS_common src/coregl_export.h src/coregl_fastpath.h src/coregl_fastpath_state.h src/coregl.h src/coregl_internal.h src/coregl_thread_pthread.h src/coregl_wrappath.h)
 
@@ -57,10 +73,26 @@ SET_TARGET_PROPERTIES(${COREGL} PROPERTIES VERSION ${VERSION})
 #SET_TARGET_PROPERTIES(${COREGL} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common})
 TARGET_LINK_LIBRARIES(${COREGL} ${pkg_common_LDFLAGS} "-ldl -g -O2 -fvisibility=hidden -Wall -std=c99 -lpthread")
 
+ADD_LIBRARY(${EGL} SHARED ${EGL_SRCS_common})
+SET_TARGET_PROPERTIES(${EGL} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${EGL} PROPERTIES VERSION ${VERSION})
+#SET_TARGET_PROPERTIES(${COREGL} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common})
+TARGET_LINK_LIBRARIES(${EGL} ${pkg_common_LDFLAGS} "-ldl -g -O2 -fvisibility=hidden -Wall -std=c99 -lpthread")
+
+ADD_LIBRARY(${GLES2} SHARED ${GLES2_SRCS_common})
+SET_TARGET_PROPERTIES(${GLES2} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${GLES2} PROPERTIES VERSION ${VERSION})
+#SET_TARGET_PROPERTIES(${COREGL} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common})
+TARGET_LINK_LIBRARIES(${GLES2} ${pkg_common_LDFLAGS} "-ldl -g -O2 -fvisibility=hidden -Wall -std=c99 -lpthread")
+
 CONFIGURE_FILE(${COREGL}.pc.in ${COREGL}.pc @ONLY)
 
 INSTALL(TARGETS ${COREGL} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${EGL} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${GLES2} DESTINATION lib COMPONENT RuntimeLibraries)
+
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${COREGL}.pc DESTINATION lib/pkgconfig)
+
 #FOREACH(hfile ${HEADERS_common})
 #      INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/coregl)
 #ENDFOREACH(hfile)
index e887df1..a56a55a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,27 +27,47 @@ SOURCES = \
                src/modules/appopt/coregl_appopt_egl.c \
                src/modules/appopt/coregl_appopt_gl.c
 
-BIN = libCOREGL.so.1.1
+BIN = libCOREGL.so
+
+MAJOR = 3
+MINOR = 0
+
+WRAP_EGL = libEGL.so
+WRAP_GLES2 = libGLESv2.so
+
+OUTPUT_BIN = $(BIN).$(MAJOR).$(MINOR)
+OUTPUT_WRAP_EGL = $(WRAP_EGL).$(MAJOR).$(MINOR)
+OUTPUT_WRAP_GLES2 = $(WRAP_GLES2).$(MAJOR).$(MINOR)
 
 OBJECTS = $(SOURCES:.c=.o)
 
-all : $(BIN)
-       ln -sf $(BIN) lib/libEGL.so.1.4
-       ln -sf $(BIN) lib/libGLESv2.so.2.0
+all : $(OUTPUT_BIN) $(OUTPUT_WRAP_EGL) $(OUTPUT_WRAP_GLES2)
        cp src/headers/egl.h include/EGL/def_egl.h
        cp src/headers/gl.h include/GLES2/def_gl.h
        cp src/headers/sym_egl.h include/EGL/sym_egl.h
        cp src/headers/sym_gl.h include/GLES2/sym_gl.h
-#      ln -sf `readlink -f /usr/lib/libEGL.so` lib/libEGL_drv.so
-#      ln -sf `readlink -f /usr/lib/libGLESv2.so` lib/libGLESv2_drv.so
 
-$(BIN) : $(OBJECTS)
+$(OUTPUT_BIN) : $(OBJECTS)
+       @mkdir -p lib
+       $(CC) -shared -o lib/$(OUTPUT_BIN) $(OBJECTS) $(LDFLAGS)
+       ln -sf $(OUTPUT_BIN) lib/$(BIN).$(MAJOR)
+       ln -sf $(BIN).$(MAJOR) lib/$(BIN)
+
+$(OUTPUT_WRAP_EGL) :
+       @mkdir -p lib
+       $(CC) -shared -o lib/$(OUTPUT_WRAP_EGL) src/wraps/coregl_egl.c $(CFLAGS) $(LDFLAGS)
+       ln -sf $(OUTPUT_WRAP_EGL) lib/$(WRAP_EGL).$(MAJOR)
+       ln -sf $(WRAP_EGL).$(MAJOR) lib/$(WRAP_EGL)
+
+$(OUTPUT_WRAP_GLES2) :
        @mkdir -p lib
-       $(CC) -shared -o lib/$(BIN) $(OBJECTS) $(LDFLAGS)
+       $(CC) -shared -o lib/$(OUTPUT_WRAP_GLES2) src/wraps/coregl_gl.c $(CFLAGS) $(LDFLAGS)
+       ln -sf $(OUTPUT_WRAP_GLES2) lib/$(WRAP_GLES2).$(MAJOR)
+       ln -sf $(WRAP_GLES2).$(MAJOR) lib/$(WRAP_GLES2)
 
 %.o : %.c
        $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
 
-clean:
-       rm -f $(OBJECTS) lib/$(BIN)
+clean :
+       rm -f $(OBJECTS) lib/*
 
index 65d615c..89183d4 100644 (file)
@@ -1 +1,3 @@
 @PREFIX@/lib/libCOREGL.so*
+@PREFIX@/lib/libEGL.so*
+@PREFIX@/lib/libGLESv2.so*
index 45b992d..4983840 100644 (file)
@@ -22,11 +22,7 @@ _COREGL_SYMBOL(GL_FALSE, void, glBufferSubData, (GLenum target, GLintptr offset,
 _COREGL_SYMBOL(GL_FALSE, GLenum, glCheckFramebufferStatus, (GLenum target))
 _COREGL_SYMBOL(GL_FALSE, void, glClear, (GLbitfield mask))
 _COREGL_SYMBOL(GL_FALSE, void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
-#ifndef _COREGL_DESKTOP_GL
 _COREGL_SYMBOL(GL_FALSE, void, glClearDepthf, (GLclampf depth))
-#else
-_COREGL_SYMBOL(GL_FALSE, void, glClearDepth, (GLclampf depth))
-#endif
 _COREGL_SYMBOL(GL_FALSE, void, glClearStencil, (GLint s))
 _COREGL_SYMBOL(GL_FALSE, void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha))
 _COREGL_SYMBOL(GL_FALSE, void, glCompileShader, (GLuint shader))
@@ -45,11 +41,7 @@ _COREGL_SYMBOL(GL_FALSE, void, glDeleteShader, (GLuint shader))
 _COREGL_SYMBOL(GL_FALSE, void, glDeleteTextures, (GLsizei n, const GLuint* textures))
 _COREGL_SYMBOL(GL_FALSE, void, glDepthFunc, (GLenum func))
 _COREGL_SYMBOL(GL_FALSE, void, glDepthMask, (GLboolean flag))
-#ifndef _COREGL_DESKTOP_GL
 _COREGL_SYMBOL(GL_FALSE, void, glDepthRangef, (GLclampf zNear, GLclampf zFar))
-#else
-_COREGL_SYMBOL(GL_FALSE, void, glDepthRange, (GLclampf zNear, GLclampf zFar))
-#endif
 _COREGL_SYMBOL(GL_FALSE, void, glDetachShader, (GLuint program, GLuint shader))
 _COREGL_SYMBOL(GL_FALSE, void, glDisable, (GLenum cap))
 _COREGL_SYMBOL(GL_FALSE, void, glDisableVertexAttribArray, (GLuint index))
diff --git a/lib/libCOREGL.so b/lib/libCOREGL.so
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libCOREGL.so.1 b/lib/libCOREGL.so.1
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libCOREGL.so.1.1 b/lib/libCOREGL.so.1.1
deleted file mode 100755 (executable)
index a2f7a6e..0000000
Binary files a/lib/libCOREGL.so.1.1 and /dev/null differ
diff --git a/lib/libEGL.so b/lib/libEGL.so
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libEGL.so.1 b/lib/libEGL.so.1
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libEGL.so.1.4 b/lib/libEGL.so.1.4
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libGLESv2.so b/lib/libGLESv2.so
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libGLESv2.so.2 b/lib/libGLESv2.so.2
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
diff --git a/lib/libGLESv2.so.2.0 b/lib/libGLESv2.so.2.0
deleted file mode 120000 (symlink)
index a2550b2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libCOREGL.so.1.1
\ No newline at end of file
index ab73a36..fe98420 100644 (file)
@@ -187,7 +187,7 @@ _gl_lib_deinit(void)
 }
 
 int
-init_gl()
+coregl_initialize()
 {
        LOG("[CoreGL] Library initializing...");
 
@@ -204,7 +204,7 @@ init_gl()
 
 __attribute__((destructor))
 void
-free_gl()
+coregl_terminate()
 {
        if (export_initialized != 0)
        {
index c03aec8..c0ac691 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef COREGL_H
 #define COREGL_H
 
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
 #define COREGL_API           __attribute__((visibility("default")))
 
 // Include GL/EGL/GLX types
@@ -16,8 +13,8 @@ typedef void (*_eng_fn) (void);
 
 #include "headers/sym.h"
 
-extern int  init_gl();
-extern void free_gl();
+extern int  coregl_initialize();
+extern void coregl_terminate();
 
 #endif // COREGL_H
 
index 255d915..af31eb2 100644 (file)
@@ -8,7 +8,7 @@ Mutex init_export_mutex = MUTEX_INITIALIZER;
                mutex_lock(&init_export_mutex); \
                if (export_initialized == 0) \
                { \
-                       init_gl(); \
+                       coregl_initialize(); \
                        export_initialized = 1; \
                } \
                mutex_unlock(&init_export_mutex); \
diff --git a/src/wraps/coregl_egl.c b/src/wraps/coregl_egl.c
new file mode 100644 (file)
index 0000000..0be0226
--- /dev/null
@@ -0,0 +1,333 @@
+#include <stdio.h>
+#include <dlfcn.h>
+
+// Include GL/EGL/GLX types
+# include <EGL/eglplatform.h>
+# include "../headers/egl.h"
+
+typedef void (*_eng_fn) (void);
+
+#define COREGL_API           __attribute__((visibility("default")))
+
+#define _COREGL_SYMBOL(IS_EXTENSION, RET_TYPE, FUNC_NAME, PARAM_LIST)     COREGL_API extern RET_TYPE FUNC_NAME PARAM_LIST;
+# include "../headers/sym_egl.h"
+#undef _COREGL_SYMBOL
+
+#define _COREGL_SYMBOL(IS_EXTENSION, RET_TYPE, FUNC_NAME, PARAM_LIST)     RET_TYPE (*ovr_##FUNC_NAME) PARAM_LIST = NULL;
+# include "../headers/sym_egl.h"
+#undef _COREGL_SYMBOL
+
+#define INIT_EXPORT()
+
+__attribute__((constructor))
+int
+coregl_glwrap_init()
+{
+       void *lib_handle = NULL;
+
+       lib_handle = dlopen("libCOREGL.so", RTLD_NOW);
+       if (!lib_handle)
+       {
+               fprintf(stderr, "\E[0;31;1mERROR : %s\E[0m\n\n", dlerror());
+               fprintf(stderr, "\E[0;31;1mERROR : Invalid library link! (Check linkage of libEGL -> libCOREGL)\E[0m\n");
+               return 0;
+       }
+
+#define _COREGL_SYMBOL(IS_EXTENSION, RET_TYPE, FUNC_NAME, PARAM_LIST) \
+   ovr_##FUNC_NAME = (__typeof__(ovr_##FUNC_NAME))dlsym(lib_handle, #FUNC_NAME);
+#include "../headers/sym_egl.h"
+#undef _COREGL_SYMBOL
+
+       return 1;
+}
+
+
+EGLint
+eglGetError(void)
+{
+       INIT_EXPORT();
+       return ovr_eglGetError();
+}
+
+EGLDisplay
+eglGetDisplay(EGLNativeDisplayType display_id)
+{
+       INIT_EXPORT();
+       return ovr_eglGetDisplay(display_id);
+}
+
+EGLBoolean
+eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor)
+{
+       INIT_EXPORT();
+       return ovr_eglInitialize(dpy, major, minor);
+}
+
+EGLBoolean
+eglTerminate(EGLDisplay dpy)
+{
+       INIT_EXPORT();
+       return ovr_eglTerminate(dpy);
+}
+
+EGLBoolean
+eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)
+{
+       INIT_EXPORT();
+       return ovr_eglGetConfigs(dpy, configs, config_size, num_config);
+}
+
+EGLBoolean
+eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config)
+{
+       INIT_EXPORT();
+       return ovr_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config);
+}
+
+EGLBoolean
+eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
+{
+       INIT_EXPORT();
+       return ovr_eglGetConfigAttrib(dpy, config, attribute, value);
+}
+
+
+EGLSurface
+eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglCreateWindowSurface(dpy, config, win, attrib_list);
+}
+
+EGLSurface
+eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglCreatePbufferSurface(dpy, config, attrib_list);
+}
+
+EGLSurface
+eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list);
+}
+
+EGLBoolean
+eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
+{
+       INIT_EXPORT();
+       return ovr_eglDestroySurface(dpy, surface);
+}
+
+EGLBoolean
+eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)
+{
+       INIT_EXPORT();
+       return ovr_eglQuerySurface(dpy, surface, attribute, value);
+}
+
+EGLBoolean
+eglBindAPI(EGLenum api)
+{
+       INIT_EXPORT();
+       return ovr_eglBindAPI(api);
+}
+
+EGLenum
+eglQueryAPI(void)
+{
+       INIT_EXPORT();
+       return ovr_eglQueryAPI();
+}
+
+EGLBoolean
+eglWaitClient(void)
+{
+       INIT_EXPORT();
+       return ovr_eglWaitClient();
+}
+
+EGLBoolean
+eglReleaseThread(void)
+{
+       INIT_EXPORT();
+       return ovr_eglReleaseThread();
+}
+
+EGLSurface
+eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
+}
+
+EGLBoolean
+eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
+{
+       INIT_EXPORT();
+       return ovr_eglSurfaceAttrib(dpy, surface, attribute, value);
+}
+
+EGLBoolean
+eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+{
+       INIT_EXPORT();
+       return ovr_eglBindTexImage(dpy, surface, buffer);
+}
+
+EGLBoolean
+eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+{
+       INIT_EXPORT();
+       return ovr_eglReleaseTexImage(dpy, surface, buffer);
+}
+
+EGLBoolean
+eglSwapInterval(EGLDisplay dpy, EGLint interval)
+{
+       INIT_EXPORT();
+       return ovr_eglSwapInterval(dpy, interval);
+}
+
+EGLContext
+eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglCreateContext(dpy, config, share_context, attrib_list);
+}
+
+EGLBoolean
+eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
+{
+       INIT_EXPORT();
+       return ovr_eglDestroyContext(dpy, ctx);
+}
+
+EGLBoolean
+eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
+{
+       INIT_EXPORT();
+       return ovr_eglMakeCurrent(dpy, draw, read, ctx);
+}
+
+EGLContext
+eglGetCurrentContext(void)
+{
+       INIT_EXPORT();
+       return ovr_eglGetCurrentContext();
+}
+
+EGLSurface
+eglGetCurrentSurface(EGLint readdraw)
+{
+       INIT_EXPORT();
+       return ovr_eglGetCurrentSurface(readdraw);
+}
+
+EGLDisplay
+eglGetCurrentDisplay(void)
+{
+       INIT_EXPORT();
+       return ovr_eglGetCurrentDisplay();
+}
+
+EGLBoolean
+eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)
+{
+       INIT_EXPORT();
+       return ovr_eglQueryContext(dpy, ctx, attribute, value);
+}
+
+EGLBoolean
+eglWaitGL(void)
+{
+       INIT_EXPORT();
+       return ovr_eglWaitGL();
+}
+
+EGLBoolean
+eglWaitNative(EGLint engine)
+{
+       INIT_EXPORT();
+       return ovr_eglWaitNative(engine);
+}
+
+EGLBoolean
+eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
+{
+       INIT_EXPORT();
+       return ovr_eglSwapBuffers(dpy, surface);
+}
+
+EGLBoolean
+eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
+{
+       INIT_EXPORT();
+       return ovr_eglCopyBuffers(dpy, surface, target);
+}
+
+_eng_fn
+eglGetProcAddress(const char* procname)
+{
+       INIT_EXPORT();
+       return ovr_eglGetProcAddress(procname);
+}
+
+const char *
+eglQueryString(EGLDisplay dpy, EGLint name)
+{
+       INIT_EXPORT();
+       return ovr_eglQueryString(dpy, name);
+}
+
+EGLImageKHR
+eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglCreateImageKHR(dpy, ctx, target, buffer, attrib_list);
+}
+
+EGLBoolean
+eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
+{
+       INIT_EXPORT();
+       return ovr_eglDestroyImageKHR(dpy, image);
+}
+
+void *
+eglMapImageSEC(EGLDisplay dpy, EGLImageKHR image)
+{
+       INIT_EXPORT();
+       return ovr_eglMapImageSEC(dpy, image);
+}
+
+EGLBoolean
+eglUnmapImageSEC(EGLDisplay dpy, EGLImageKHR image)
+{
+       INIT_EXPORT();
+       return ovr_eglUnmapImageSEC(dpy, image);
+}
+
+EGLBoolean
+eglGetImageAttribSEC(EGLDisplay dpy, EGLImageKHR image, EGLint attribute, EGLint *value)
+{
+       INIT_EXPORT();
+       return ovr_eglGetImageAttribSEC(dpy, image, attribute, value);
+}
+
+EGLBoolean
+eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list)
+{
+       INIT_EXPORT();
+       return ovr_eglLockSurfaceKHR(display, surface, attrib_list);
+}
+
+EGLBoolean
+eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface)
+{
+       INIT_EXPORT();
+       return ovr_eglUnlockSurfaceKHR(display, surface);
+}
+
+
diff --git a/src/wraps/coregl_gl.c b/src/wraps/coregl_gl.c
new file mode 100644 (file)
index 0000000..b2578ea
--- /dev/null
@@ -0,0 +1,945 @@
+#include <stdio.h>
+#include <dlfcn.h>
+
+# include <GLES/glplatform.h>
+# include "../headers/gl.h"
+
+#define COREGL_API           __attribute__((visibility("default")))
+
+#define _COREGL_SYMBOL(IS_EXTENSION, RET_TYPE, FUNC_NAME, PARAM_LIST)     COREGL_API extern RET_TYPE FUNC_NAME PARAM_LIST;
+# include "../headers/sym_gl.h"
+#undef _COREGL_SYMBOL
+
+#define _COREGL_SYMBOL(IS_EXTENSION, RET_TYPE, FUNC_NAME, PARAM_LIST)     RET_TYPE (*ovr_##FUNC_NAME) PARAM_LIST = NULL;
+# include "../headers/sym_gl.h"
+#undef _COREGL_SYMBOL
+
+#define INIT_EXPORT()
+
+__attribute__((constructor))
+int
+coregl_glwrap_init()
+{
+       void *lib_handle = NULL;
+
+       lib_handle = dlopen("libCOREGL.so", RTLD_NOW);
+       if (!lib_handle)
+       {
+               fprintf(stderr, "\E[0;31;1mERROR : %s\E[0m\n\n", dlerror());
+               fprintf(stderr, "\E[0;31;1mERROR : Invalid library link! (Check linkage of libEGL -> libCOREGL)\E[0m\n");
+               return 0;
+       }
+
+#define _COREGL_SYMBOL(IS_EXTENSION, RET_TYPE, FUNC_NAME, PARAM_LIST) \
+   ovr_##FUNC_NAME = (__typeof__(ovr_##FUNC_NAME))dlsym(lib_handle, #FUNC_NAME);
+#include "../headers/sym_gl.h"
+#undef _COREGL_SYMBOL
+
+       return 1;
+}
+
+void
+glActiveTexture(GLenum texture)
+{
+       ovr_glActiveTexture(texture);
+}
+
+void
+glAttachShader(GLuint program, GLuint shader)
+{
+       ovr_glAttachShader(program, shader);
+}
+
+void
+glBindAttribLocation(GLuint program, GLuint index, const char* name)
+{
+       ovr_glBindAttribLocation(program, index, name);
+}
+
+void
+glBindBuffer(GLenum target, GLuint buffer)
+{
+       ovr_glBindBuffer(target, buffer);
+}
+
+void
+glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+       ovr_glBindFramebuffer(target, framebuffer);
+}
+
+void
+glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+       ovr_glBindRenderbuffer(target, renderbuffer);
+}
+
+void
+glBindTexture(GLenum target, GLuint texture)
+{
+       ovr_glBindTexture(target, texture);
+}
+
+void
+glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+       ovr_glBlendColor(red, green, blue, alpha);
+}
+
+void
+glBlendEquation(GLenum mode)
+{
+       ovr_glBlendEquation(mode);
+}
+
+void
+glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+{
+       ovr_glBlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+void
+glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+       ovr_glBlendFunc(sfactor, dfactor);
+}
+
+void
+glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+{
+       ovr_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+void
+glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage)
+{
+       ovr_glBufferData(target, size, data, usage);
+}
+
+void
+glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
+{
+       ovr_glBufferSubData(target, offset, size, data);
+}
+
+GLenum
+glCheckFramebufferStatus(GLenum target)
+{
+       return ovr_glCheckFramebufferStatus(target);
+}
+
+void
+glClear(GLbitfield mask)
+{
+       ovr_glClear(mask);
+}
+
+void
+glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+       ovr_glClearColor(red, green, blue, alpha);
+}
+
+void
+glClearDepthf(GLclampf depth)
+{
+       ovr_glClearDepthf(depth);
+}
+
+void
+glClearStencil(GLint s)
+{
+       ovr_glClearStencil(s);
+}
+
+void
+glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+       ovr_glColorMask(red, green, blue, alpha);
+}
+
+void
+glCompileShader(GLuint shader)
+{
+       ovr_glCompileShader(shader);
+}
+
+void
+glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
+{
+       ovr_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+void
+glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
+{
+       ovr_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+void
+glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+       ovr_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+}
+
+void
+glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+       ovr_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+GLuint
+glCreateProgram(void)
+{
+       return ovr_glCreateProgram();
+}
+
+GLuint
+glCreateShader(GLenum type)
+{
+       return ovr_glCreateShader(type);
+}
+
+void
+glCullFace(GLenum mode)
+{
+       ovr_glCullFace(mode);
+}
+
+void
+glDeleteBuffers(GLsizei n, const GLuint* buffers)
+{
+       ovr_glDeleteBuffers(n, buffers);
+}
+
+void
+glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
+{
+       ovr_glDeleteFramebuffers(n, framebuffers);
+}
+
+void
+glDeleteProgram(GLuint program)
+{
+       ovr_glDeleteProgram(program);
+}
+
+void
+glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
+{
+       ovr_glDeleteRenderbuffers(n, renderbuffers);
+}
+
+void
+glDeleteShader(GLuint shader)
+{
+       ovr_glDeleteShader(shader);
+}
+
+void
+glDeleteTextures(GLsizei n, const GLuint* textures)
+{
+       ovr_glDeleteTextures(n, textures);
+}
+
+void
+glDepthFunc(GLenum func)
+{
+       ovr_glDepthFunc(func);
+}
+
+void
+glDepthMask(GLboolean flag)
+{
+       ovr_glDepthMask(flag);
+}
+
+void
+glDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+       ovr_glDepthRangef(zNear, zFar);
+}
+
+void
+glDetachShader(GLuint program, GLuint shader)
+{
+       ovr_glDetachShader(program, shader);
+}
+
+void
+glDisable(GLenum cap)
+{
+       ovr_glDisable(cap);
+}
+
+void
+glDisableVertexAttribArray(GLuint index)
+{
+       ovr_glDisableVertexAttribArray(index);
+}
+
+void
+glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+       ovr_glDrawArrays(mode, first, count);
+}
+
+void
+glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices)
+{
+       ovr_glDrawElements(mode, count, type, indices);
+}
+
+void
+glEnable(GLenum cap)
+{
+       ovr_glEnable(cap);
+}
+
+void
+glEnableVertexAttribArray(GLuint index)
+{
+       ovr_glEnableVertexAttribArray(index);
+}
+
+void
+glFinish(void)
+{
+       ovr_glFinish();
+}
+
+void
+glFlush(void)
+{
+       ovr_glFlush();
+}
+
+void
+glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+       ovr_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+void
+glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+       ovr_glFramebufferTexture2D(target, attachment, textarget, texture, level);
+}
+
+void
+glFrontFace(GLenum mode)
+{
+       ovr_glFrontFace(mode);
+}
+
+void
+glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
+{
+       ovr_glGetVertexAttribfv(index, pname, params);
+}
+
+void
+glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
+{
+       ovr_glGetVertexAttribiv(index, pname, params);
+}
+
+void
+glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
+{
+       ovr_glGetVertexAttribPointerv(index, pname, pointer);
+}
+
+void
+glHint(GLenum target, GLenum mode)
+{
+       ovr_glHint(target, mode);
+}
+
+void
+glGenBuffers(GLsizei n, GLuint* buffers)
+{
+       ovr_glGenBuffers(n, buffers);
+}
+
+void
+glGenerateMipmap(GLenum target)
+{
+       ovr_glGenerateMipmap(target);
+}
+
+void
+glGenFramebuffers(GLsizei n, GLuint* framebuffers)
+{
+       ovr_glGenFramebuffers(n, framebuffers);
+}
+
+void
+glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
+{
+       ovr_glGenRenderbuffers(n, renderbuffers);
+}
+
+void
+glGenTextures(GLsizei n, GLuint* textures)
+{
+       ovr_glGenTextures(n, textures);
+}
+
+void
+glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+{
+       ovr_glGetActiveAttrib(program, index, bufsize, length, size, type, name);
+}
+
+void
+glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+{
+       ovr_glGetActiveUniform(program, index, bufsize, length, size, type, name);
+}
+
+void
+glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
+{
+       ovr_glGetAttachedShaders(program, maxcount, count, shaders);
+}
+
+int
+glGetAttribLocation(GLuint program, const char* name)
+{
+       return ovr_glGetAttribLocation(program, name);
+}
+
+void
+glGetBooleanv(GLenum pname, GLboolean* params)
+{
+       ovr_glGetBooleanv(pname, params);
+}
+
+void
+glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+       ovr_glGetBufferParameteriv(target, pname, params);
+}
+
+GLenum
+glGetError(void)
+{
+       return ovr_glGetError();
+}
+
+void
+glGetFloatv(GLenum pname, GLfloat* params)
+{
+       ovr_glGetFloatv(pname, params);
+}
+
+void
+glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
+{
+       ovr_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+}
+
+void
+glGetIntegerv(GLenum pname, GLint* params)
+{
+       ovr_glGetIntegerv(pname, params);
+}
+
+void
+glGetProgramiv(GLuint program, GLenum pname, GLint* params)
+{
+       ovr_glGetProgramiv(program, pname, params);
+}
+
+void
+glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
+{
+       ovr_glGetProgramInfoLog(program, bufsize, length, infolog);
+}
+
+void
+glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+       ovr_glGetRenderbufferParameteriv(target, pname, params);
+}
+
+void
+glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
+{
+       ovr_glGetShaderiv(shader, pname, params);
+}
+
+void
+glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
+{
+       ovr_glGetShaderInfoLog(shader, bufsize, length, infolog);
+}
+
+void
+glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
+{
+       ovr_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+}
+
+void
+glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
+{
+       ovr_glGetShaderSource(shader, bufsize, length, source);
+}
+
+const GLubyte *
+glGetString(GLenum name)
+{
+       return ovr_glGetString(name);
+}
+
+void
+glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
+{
+       ovr_glGetTexParameterfv(target, pname, params);
+}
+
+void
+glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+       ovr_glGetTexParameteriv(target, pname, params);
+}
+
+void
+glGetUniformfv(GLuint program, GLint location, GLfloat* params)
+{
+       ovr_glGetUniformfv(program, location, params);
+}
+
+void
+glGetUniformiv(GLuint program, GLint location, GLint* params)
+{
+       ovr_glGetUniformiv(program, location, params);
+}
+
+int
+glGetUniformLocation(GLuint program, const char* name)
+{
+       return ovr_glGetUniformLocation(program, name);
+}
+
+GLboolean
+glIsBuffer(GLuint buffer)
+{
+       return ovr_glIsBuffer(buffer);
+}
+
+GLboolean
+glIsEnabled(GLenum cap)
+{
+       return ovr_glIsEnabled(cap);
+}
+
+GLboolean
+glIsFramebuffer(GLuint framebuffer)
+{
+       return ovr_glIsFramebuffer(framebuffer);
+}
+
+GLboolean
+glIsProgram(GLuint program)
+{
+       return ovr_glIsProgram(program);
+}
+
+GLboolean
+glIsRenderbuffer(GLuint renderbuffer)
+{
+       return ovr_glIsRenderbuffer(renderbuffer);
+}
+
+GLboolean
+glIsShader(GLuint shader)
+{
+       return ovr_glIsShader(shader);
+}
+
+GLboolean
+glIsTexture(GLuint texture)
+{
+       return ovr_glIsTexture(texture);
+}
+
+void
+glLineWidth(GLfloat width)
+{
+       ovr_glLineWidth(width);
+}
+
+void
+glLinkProgram(GLuint program)
+{
+       ovr_glLinkProgram(program);
+}
+
+void
+glPixelStorei(GLenum pname, GLint param)
+{
+       ovr_glPixelStorei(pname, param);
+}
+
+void
+glPolygonOffset(GLfloat factor, GLfloat units)
+{
+       ovr_glPolygonOffset(factor, units);
+}
+
+void
+glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
+{
+       ovr_glReadPixels(x, y, width, height, format, type, pixels);
+}
+
+void
+glReleaseShaderCompiler(void)
+{
+       ovr_glReleaseShaderCompiler();
+}
+
+void
+glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+       ovr_glRenderbufferStorage(target, internalformat, width, height);
+}
+
+void
+glSampleCoverage(GLclampf value, GLboolean invert)
+{
+       ovr_glSampleCoverage(value, invert);
+}
+
+void
+glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+       ovr_glScissor(x, y, width, height);
+}
+
+void
+glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
+{
+       ovr_glShaderBinary(n, shaders, binaryformat, binary, length);
+}
+
+void
+glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
+{
+       ovr_glShaderSource(shader, count, string, length);
+}
+
+void
+glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+       ovr_glStencilFunc(func, ref, mask);
+}
+
+void
+glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+       ovr_glStencilFuncSeparate(face, func, ref, mask);
+}
+
+void
+glStencilMask(GLuint mask)
+{
+       ovr_glStencilMask(mask);
+}
+
+void
+glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+       ovr_glStencilMaskSeparate(face, mask);
+}
+
+void
+glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+       ovr_glStencilOp(fail, zfail, zpass);
+}
+
+void
+glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
+{
+       ovr_glStencilOpSeparate(face, fail, zfail, zpass);
+}
+
+void
+glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
+{
+       ovr_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+void
+glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+       ovr_glTexParameterf(target, pname, param);
+}
+
+void
+glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
+{
+       ovr_glTexParameterfv(target, pname, params);
+}
+
+void
+glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+       ovr_glTexParameteri(target, pname, param);
+}
+
+void
+glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
+{
+       ovr_glTexParameteriv(target, pname, params);
+}
+
+void
+glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
+{
+       ovr_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+void
+glUniform1f(GLint location, GLfloat x)
+{
+       ovr_glUniform1f(location, x);
+}
+
+void
+glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
+{
+       ovr_glUniform1fv(location, count, v);
+}
+
+void
+glUniform1i(GLint location, GLint x)
+{
+       ovr_glUniform1i(location, x);
+}
+
+void
+glUniform1iv(GLint location, GLsizei count, const GLint* v)
+{
+       ovr_glUniform1iv(location, count, v);
+}
+
+void
+glUniform2f(GLint location, GLfloat x, GLfloat y)
+{
+       ovr_glUniform2f(location, x, y);
+}
+
+void
+glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
+{
+       ovr_glUniform2fv(location, count, v);
+}
+
+void
+glUniform2i(GLint location, GLint x, GLint y)
+{
+       ovr_glUniform2i(location, x, y);
+}
+
+void
+glUniform2iv(GLint location, GLsizei count, const GLint* v)
+{
+       ovr_glUniform2iv(location, count, v);
+}
+
+void
+glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
+{
+       ovr_glUniform3f(location, x, y, z);
+}
+
+void
+glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
+{
+       ovr_glUniform3fv(location, count, v);
+}
+
+void
+glUniform3i(GLint location, GLint x, GLint y, GLint z)
+{
+       ovr_glUniform3i(location, x, y, z);
+}
+
+void
+glUniform3iv(GLint location, GLsizei count, const GLint* v)
+{
+       ovr_glUniform3iv(location, count, v);
+}
+
+void
+glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+       ovr_glUniform4f(location, x, y, z, w);
+}
+
+void
+glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
+{
+       ovr_glUniform4fv(location, count, v);
+}
+
+void
+glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
+{
+       ovr_glUniform4i(location, x, y, z, w);
+}
+
+void
+glUniform4iv(GLint location, GLsizei count, const GLint* v)
+{
+       ovr_glUniform4iv(location, count, v);
+}
+
+void
+glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+{
+       ovr_glUniformMatrix2fv(location, count, transpose, value);
+}
+
+void
+glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+{
+       ovr_glUniformMatrix3fv(location, count, transpose, value);
+}
+
+void
+glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+{
+       ovr_glUniformMatrix4fv(location, count, transpose, value);
+}
+
+void
+glUseProgram(GLuint program)
+{
+       ovr_glUseProgram(program);
+}
+
+void
+glValidateProgram(GLuint program)
+{
+       ovr_glValidateProgram(program);
+}
+
+void
+glVertexAttrib1f(GLuint indx, GLfloat x)
+{
+       ovr_glVertexAttrib1f(indx, x);
+}
+
+void
+glVertexAttrib1fv(GLuint indx, const GLfloat* values)
+{
+       ovr_glVertexAttrib1fv(indx, values);
+}
+
+void
+glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
+{
+       ovr_glVertexAttrib2f(indx, x, y);
+}
+
+void
+glVertexAttrib2fv(GLuint indx, const GLfloat* values)
+{
+       ovr_glVertexAttrib2fv(indx, values);
+}
+
+void
+glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
+{
+       ovr_glVertexAttrib3f(indx, x, y, z);
+}
+
+void
+glVertexAttrib3fv(GLuint indx, const GLfloat* values)
+{
+       ovr_glVertexAttrib3fv(indx, values);
+}
+
+void
+glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+       ovr_glVertexAttrib4f(indx, x, y, z, w);
+}
+
+void
+glVertexAttrib4fv(GLuint indx, const GLfloat* values)
+{
+       ovr_glVertexAttrib4fv(indx, values);
+}
+
+void
+glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
+{
+       ovr_glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
+}
+
+void
+glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+       ovr_glViewport(x, y, width, height);
+}
+
+
+// GLES Extensions...
+void
+glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
+{
+       ovr_glEGLImageTargetTexture2DOES(target, image);
+}
+
+void
+glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
+{
+       ovr_glEGLImageTargetRenderbufferStorageOES(target, image);
+}
+
+void
+glGetProgramBinary(GLuint program, GLsizei bufsize, GLsizei* length, GLenum* binaryFormat, void* binary)
+{
+       ovr_glGetProgramBinary(program, bufsize, length, binaryFormat, binary);
+}
+
+void
+glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary, GLint length)
+{
+       ovr_glProgramBinary(program, binaryFormat, binary, length);
+}
+
+
+void
+glProgramParameteri(GLuint program, GLuint pname, GLint value)
+{
+       ovr_glProgramParameteri(program, pname, value);
+}
+
+void
+glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+       ovr_glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
+}
+
+void
+glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
+{
+       ovr_glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
+}
+
+void
+glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+       ovr_glDiscardFramebufferEXT(target, numAttachments, attachments);
+}
+
+
+