diff options
author | Mathias Agopian <mathias@google.com> | 2009-05-27 20:38:06 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-05-27 20:38:06 -0700 |
commit | b1a39d67be99fe6c4545b25e10ac82a5dd1df634 (patch) | |
tree | 9c5107e1af357dc5e734287df0661a36642a4761 | |
parent | a3d66a834f7e6796003684652d8aef13fa6345cd (diff) | |
download | frameworks_native-b1a39d67be99fe6c4545b25e10ac82a5dd1df634.zip frameworks_native-b1a39d67be99fe6c4545b25e10ac82a5dd1df634.tar.gz frameworks_native-b1a39d67be99fe6c4545b25e10ac82a5dd1df634.tar.bz2 |
Added most of the support needed for GLES 2.x
-rw-r--r-- | opengl/include/GLES2/gl2platform.h | 29 | ||||
-rw-r--r-- | opengl/libs/Android.mk | 39 | ||||
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 114 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_entries.in (renamed from opengl/libs/egl_entries.in) | 0 | ||||
-rw-r--r-- | opengl/libs/GLES2/gl2.cpp | 111 | ||||
-rw-r--r-- | opengl/libs/GLES2/gl2_api.in | 426 | ||||
-rw-r--r-- | opengl/libs/GLES2/gl2_entries.in | 142 | ||||
-rw-r--r-- | opengl/libs/GLES2/gl2ext_api.in | 105 | ||||
-rw-r--r-- | opengl/libs/GLES2/gl2ext_entries.in | 35 | ||||
-rw-r--r-- | opengl/libs/GLES_CM/gl_entries.in (renamed from opengl/libs/gl_entries.in) | 0 | ||||
-rw-r--r-- | opengl/libs/GLES_CM/glext_entries.in (renamed from opengl/libs/glext_entries.in) | 0 | ||||
-rw-r--r-- | opengl/libs/gl_enums.in | 261 | ||||
-rw-r--r-- | opengl/libs/hooks.h | 14 | ||||
-rw-r--r-- | opengl/libs/tools/enumextract.sh | 32 | ||||
-rwxr-xr-x | opengl/libs/tools/genfiles | 11 | ||||
-rwxr-xr-x | opengl/libs/tools/glapigen | 15 | ||||
-rwxr-xr-x | opengl/libs/tools/glentrygen | 15 |
17 files changed, 991 insertions, 358 deletions
diff --git a/opengl/include/GLES2/gl2platform.h b/opengl/include/GLES2/gl2platform.h new file mode 100644 index 0000000..3e9036c --- /dev/null +++ b/opengl/include/GLES2/gl2platform.h @@ -0,0 +1,29 @@ +#ifndef __gl2platform_h_ +#define __gl2platform_h_ + +/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h + * Last modified on 2008/12/19 + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#define GL_APIENTRY KHRONOS_APIENTRY + +#endif /* __gl2platform_h_ */ diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index c8e11f0..67a67ec 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -1,6 +1,6 @@ LOCAL_PATH:= $(call my-dir) -# +############################################################################### # Build META EGL library # @@ -30,14 +30,14 @@ include $(BUILD_SHARED_LIBRARY) -# -# Build the wrapper OpenGL ES library +############################################################################### +# Build the wrapper OpenGL ES 1.x library # include $(CLEAR_VARS) -LOCAL_SRC_FILES:= \ - GLES_CM/gl.cpp.arm \ +LOCAL_SRC_FILES:= \ + GLES_CM/gl.cpp.arm \ # LOCAL_SHARED_LIBRARIES += libcutils libEGL @@ -57,3 +57,32 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -fvisibility=hidden include $(BUILD_SHARED_LIBRARY) + + +############################################################################### +# Build the wrapper OpenGL ES 2.x library +# + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= \ + GLES2/gl2.cpp.arm \ +# + +LOCAL_SHARED_LIBRARIES += libcutils libEGL +LOCAL_LDLIBS := -lpthread -ldl +LOCAL_MODULE:= libGLESv2 + +# needed on sim build because of weird logging issues +ifeq ($(TARGET_SIMULATOR),true) +else + LOCAL_SHARED_LIBRARIES += libdl + # we need to access the Bionic private header <bionic_tls.h> + LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../bionic/libc/private +endif + +LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" +LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES +LOCAL_CFLAGS += -fvisibility=hidden + +include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 2493fc6..4eae98e 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -153,8 +153,14 @@ static void gl_unimplemented() { #define EGL_ENTRY(_r, _api, ...) #_api, static char const * const gl_names[] = { - #include "gl_entries.in" - #include "glext_entries.in" + #include "GLES_CM/gl_entries.in" + #include "GLES_CM/glext_entries.in" + NULL +}; + +static char const * const gl2_names[] = { + #include "GLES2/gl2_entries.in" + #include "GLES2/gl2ext_entries.in" NULL }; @@ -275,11 +281,58 @@ EGLContext getContext() { /*****************************************************************************/ +typedef __eglMustCastToProperFunctionPointerType (*getProcAddressType)( + const char*); + +static __attribute__((noinline)) +void init_api(void* dso, + char const * const * api, + __eglMustCastToProperFunctionPointerType* curr, + getProcAddressType getProcAddress) +{ + char scrap[256]; + while (*api) { + char const * name = *api; + __eglMustCastToProperFunctionPointerType f = + (__eglMustCastToProperFunctionPointerType)dlsym(dso, name); + if (f == NULL) { + // couldn't find the entry-point, use eglGetProcAddress() + f = getProcAddress(name); + } + if (f == NULL) { + // Try without the OES postfix + ssize_t index = ssize_t(strlen(name)) - 3; + if ((index>0 && (index<255)) && (!strcmp(name+index, "OES"))) { + strncpy(scrap, name, index); + scrap[index] = 0; + f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); + //LOGD_IF(f, "found <%s> instead", scrap); + } + } + if (f == NULL) { + // Try with the OES postfix + ssize_t index = ssize_t(strlen(name)) - 3; + if ((index>0 && (index<252)) && (strcmp(name+index, "OES"))) { + strncpy(scrap, name, index); + scrap[index] = 0; + strcat(scrap, "OES"); + f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); + //LOGD_IF(f, "found <%s> instead", scrap); + } + } + if (f == NULL) { + //LOGD("%s", name); + f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented; + } + *curr++ = f; + api++; + } +} + static __attribute__((noinline)) void *load_driver(const char* driver, gl_hooks_t* hooks) { //LOGD("%s", driver); - char scrap[256]; void* dso = dlopen(driver, RTLD_NOW | RTLD_LOCAL); LOGE_IF(!dso, "couldn't load <%s> library (%s)", @@ -296,13 +349,11 @@ void *load_driver(const char* driver, gl_hooks_t* hooks) LOGE_IF(!getProcAddress, "can't find eglGetProcAddress() in %s", driver); - - __eglMustCastToProperFunctionPointerType* curr; - char const * const * api; gl_hooks_t::egl_t* egl = &hooks->egl; - curr = (__eglMustCastToProperFunctionPointerType*)egl; - api = egl_names; + __eglMustCastToProperFunctionPointerType* curr = + (__eglMustCastToProperFunctionPointerType*)egl; + char const * const * api = egl_names; while (*api) { char const * name = *api; __eglMustCastToProperFunctionPointerType f = @@ -317,45 +368,14 @@ void *load_driver(const char* driver, gl_hooks_t* hooks) *curr++ = f; api++; } - gl_hooks_t::gl_t* gl = &hooks->gl; - curr = (__eglMustCastToProperFunctionPointerType*)gl; - api = gl_names; - while (*api) { - char const * name = *api; - __eglMustCastToProperFunctionPointerType f = - (__eglMustCastToProperFunctionPointerType)dlsym(dso, name); - if (f == NULL) { - // couldn't find the entry-point, use eglGetProcAddress() - f = getProcAddress(name); - } - if (f == NULL) { - // Try without the OES postfix - ssize_t index = ssize_t(strlen(name)) - 3; - if ((index>0 && (index<255)) && (!strcmp(name+index, "OES"))) { - strncpy(scrap, name, index); - scrap[index] = 0; - f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); - //LOGD_IF(f, "found <%s> instead", scrap); - } - } - if (f == NULL) { - // Try with the OES postfix - ssize_t index = ssize_t(strlen(name)) - 3; - if ((index>0 && (index<252)) && (strcmp(name+index, "OES"))) { - strncpy(scrap, name, index); - scrap[index] = 0; - strcat(scrap, "OES"); - f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); - //LOGD_IF(f, "found <%s> instead", scrap); - } - } - if (f == NULL) { - //LOGD("%s", name); - f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented; - } - *curr++ = f; - api++; - } + + init_api(dso, gl_names, + (__eglMustCastToProperFunctionPointerType*)&hooks->gl, + getProcAddress); + + init_api(dso, gl2_names, + (__eglMustCastToProperFunctionPointerType*)&hooks->gl2, + getProcAddress); } return dso; } diff --git a/opengl/libs/egl_entries.in b/opengl/libs/EGL/egl_entries.in index 1fe2b57..1fe2b57 100644 --- a/opengl/libs/egl_entries.in +++ b/opengl/libs/EGL/egl_entries.in diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp new file mode 100644 index 0000000..e5358c3 --- /dev/null +++ b/opengl/libs/GLES2/gl2.cpp @@ -0,0 +1,111 @@ +/* + ** Copyright 2007, The Android Open Source Project + ** + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + */ + +#include <ctype.h> +#include <string.h> +#include <errno.h> + +#include <sys/ioctl.h> + +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> + +#include <cutils/log.h> +#include <cutils/properties.h> + +#include "hooks.h" +#include "egl_impl.h" + +using namespace android; + +// ---------------------------------------------------------------------------- +// Actual GL entry-points +// ---------------------------------------------------------------------------- + +#undef API_ENTRY +#undef CALL_GL_API +#undef CALL_GL_API_RETURN + +#if USE_FAST_TLS_KEY + + #define API_ENTRY(_api) __attribute__((naked)) _api + + #define CALL_GL_API(_api, ...) \ + asm volatile( \ + "mov r12, #0xFFFF0FFF \n" \ + "ldr r12, [r12, #-15] \n" \ + "ldr r12, [r12, %[tls]] \n" \ + "cmp r12, #0 \n" \ + "ldrne pc, [r12, %[api]] \n" \ + "bx lr \n" \ + : \ + : [tls] "J"(TLS_SLOT_OPENGL_API*4), \ + [api] "J"(__builtin_offsetof(gl_hooks_t, gl2._api)) \ + : \ + ); + + #define CALL_GL_API_RETURN(_api, ...) \ + CALL_GL_API(_api, __VA_ARGS__) \ + return 0; // placate gcc's warnings. never reached. + +#else + + #define API_ENTRY(_api) _api + + #define CALL_GL_API(_api, ...) \ + gl_hooks_t::gl2_t const * const _c = &getGlThreadSpecific()->gl2; \ + _c->_api(__VA_ARGS__) + + #define CALL_GL_API_RETURN(_api, ...) \ + gl_hooks_t::gl2_t const * const _c = &getGlThreadSpecific()->gl2; \ + return _c->_api(__VA_ARGS__) + +#endif + + +extern "C" { +#include "gl2_api.in" +#include "gl2ext_api.in" +} + +#undef API_ENTRY +#undef CALL_GL_API +#undef CALL_GL_API_RETURN + + +/* + * These GL calls are special because they need to EGL to retrieve some + * informations before they can execute. + */ + +extern "C" void __glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); +extern "C" void __glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); + + +void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) +{ + GLeglImageOES implImage = + (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); + __glEGLImageTargetTexture2DOES(target, implImage); +} + +void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) +{ + GLeglImageOES implImage = + (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); + __glEGLImageTargetRenderbufferStorageOES(target, image); +} + diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in new file mode 100644 index 0000000..9c2e69a --- /dev/null +++ b/opengl/libs/GLES2/gl2_api.in @@ -0,0 +1,426 @@ +void API_ENTRY(glActiveTexture)(GLenum texture) { + CALL_GL_API(glActiveTexture, texture); +} +void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) { + CALL_GL_API(glAttachShader, program, shader); +} +void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const char* name) { + CALL_GL_API(glBindAttribLocation, program, index, name); +} +void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) { + CALL_GL_API(glBindBuffer, target, buffer); +} +void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) { + CALL_GL_API(glBindFramebuffer, target, framebuffer); +} +void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) { + CALL_GL_API(glBindRenderbuffer, target, renderbuffer); +} +void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) { + CALL_GL_API(glBindTexture, target, texture); +} +void API_ENTRY(glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { + CALL_GL_API(glBlendColor, red, green, blue, alpha); +} +void API_ENTRY(glBlendEquation)( GLenum mode ) { + CALL_GL_API(glBlendEquation, mode); +} +void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) { + CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha); +} +void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) { + CALL_GL_API(glBlendFunc, sfactor, dfactor); +} +void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { + CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha); +} +void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { + CALL_GL_API(glBufferData, target, size, data, usage); +} +void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { + CALL_GL_API(glBufferSubData, target, offset, size, data); +} +GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) { + CALL_GL_API_RETURN(glCheckFramebufferStatus, target); +} +void API_ENTRY(glClear)(GLbitfield mask) { + CALL_GL_API(glClear, mask); +} +void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { + CALL_GL_API(glClearColor, red, green, blue, alpha); +} +void API_ENTRY(glClearDepthf)(GLclampf depth) { + CALL_GL_API(glClearDepthf, depth); +} +void API_ENTRY(glClearStencil)(GLint s) { + CALL_GL_API(glClearStencil, s); +} +void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { + CALL_GL_API(glColorMask, red, green, blue, alpha); +} +void API_ENTRY(glCompileShader)(GLuint shader) { + CALL_GL_API(glCompileShader, shader); +} +void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) { + CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data); +} +void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) { + CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data); +} +void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { + CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border); +} +void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { + CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height); +} +GLuint API_ENTRY(glCreateProgram)(void) { + CALL_GL_API_RETURN(glCreateProgram); +} +GLuint API_ENTRY(glCreateShader)(GLenum type) { + CALL_GL_API_RETURN(glCreateShader, type); +} +void API_ENTRY(glCullFace)(GLenum mode) { + CALL_GL_API(glCullFace, mode); +} +void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint* buffers) { + CALL_GL_API(glDeleteBuffers, n, buffers); +} +void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) { + CALL_GL_API(glDeleteFramebuffers, n, framebuffers); +} +void API_ENTRY(glDeleteProgram)(GLuint program) { + CALL_GL_API(glDeleteProgram, program); +} +void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) { + CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers); +} +void API_ENTRY(glDeleteShader)(GLuint shader) { + CALL_GL_API(glDeleteShader, shader); +} +void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint* textures) { + CALL_GL_API(glDeleteTextures, n, textures); +} +void API_ENTRY(glDepthFunc)(GLenum func) { + CALL_GL_API(glDepthFunc, func); +} +void API_ENTRY(glDepthMask)(GLboolean flag) { + CALL_GL_API(glDepthMask, flag); +} +void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) { + CALL_GL_API(glDepthRangef, zNear, zFar); +} +void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) { + CALL_GL_API(glDetachShader, program, shader); +} +void API_ENTRY(glDisable)(GLenum cap) { + CALL_GL_API(glDisable, cap); +} +void API_ENTRY(glDisableVertexAttribArray)(GLuint index) { + CALL_GL_API(glDisableVertexAttribArray, index); +} +void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) { + CALL_GL_API(glDrawArrays, mode, first, count); +} +void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void* indices) { + CALL_GL_API(glDrawElements, mode, count, type, indices); +} +void API_ENTRY(glEnable)(GLenum cap) { + CALL_GL_API(glEnable, cap); +} +void API_ENTRY(glEnableVertexAttribArray)(GLuint index) { + CALL_GL_API(glEnableVertexAttribArray, index); +} +void API_ENTRY(glFinish)(void) { + CALL_GL_API(glFinish); +} +void API_ENTRY(glFlush)(void) { + CALL_GL_API(glFlush); +} +void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { + CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer); +} +void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { + CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level); +} +void API_ENTRY(glFrontFace)(GLenum mode) { + CALL_GL_API(glFrontFace, mode); +} +void API_ENTRY(glGenBuffers)(GLsizei n, GLuint* buffers) { + CALL_GL_API(glGenBuffers, n, buffers); +} +void API_ENTRY(glGenerateMipmap)(GLenum target) { + CALL_GL_API(glGenerateMipmap, target); +} +void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint* framebuffers) { + CALL_GL_API(glGenFramebuffers, n, framebuffers); +} +void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) { + CALL_GL_API(glGenRenderbuffers, n, renderbuffers); +} +void API_ENTRY(glGenTextures)(GLsizei n, GLuint* textures) { + CALL_GL_API(glGenTextures, n, textures); +} +void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) { + CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name); +} +void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) { + CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name); +} +void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { + CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders); +} +int API_ENTRY(glGetAttribLocation)(GLuint program, const char* name) { + CALL_GL_API_RETURN(glGetAttribLocation, program, name); +} +void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) { + CALL_GL_API(glGetBooleanv, pname, params); +} +void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) { + CALL_GL_API(glGetBufferParameteriv, target, pname, params); +} +GLenum API_ENTRY(glGetError)(void) { + CALL_GL_API_RETURN(glGetError); +} +void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) { + CALL_GL_API(glGetFloatv, pname, params); +} +void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) { + CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params); +} +void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) { + CALL_GL_API(glGetIntegerv, pname, params); +} +void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint* params) { + CALL_GL_API(glGetProgramiv, program, pname, params); +} +void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { + CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog); +} +void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) { + CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params); +} +void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) { + CALL_GL_API(glGetShaderiv, shader, pname, params); +} +void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { + CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog); +} +void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { + CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision); +} +void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { + CALL_GL_API(glGetShaderSource, shader, bufsize, length, source); +} +const GLubyte* API_ENTRY(glGetString)(GLenum name) { + CALL_GL_API_RETURN(glGetString, name); +} +void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) { + CALL_GL_API(glGetTexParameterfv, target, pname, params); +} +void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) { + CALL_GL_API(glGetTexParameteriv, target, pname, params); +} +void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) { + CALL_GL_API(glGetUniformfv, program, location, params); +} +void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) { + CALL_GL_API(glGetUniformiv, program, location, params); +} +int API_ENTRY(glGetUniformLocation)(GLuint program, const char* name) { + CALL_GL_API_RETURN(glGetUniformLocation, program, name); +} +void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) { + CALL_GL_API(glGetVertexAttribfv, index, pname, params); +} +void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) { + CALL_GL_API(glGetVertexAttribiv, index, pname, params); +} +void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer) { + CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer); +} +void API_ENTRY(glHint)(GLenum target, GLenum mode) { + CALL_GL_API(glHint, target, mode); +} +GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) { + CALL_GL_API_RETURN(glIsBuffer, buffer); +} +GLboolean API_ENTRY(glIsEnabled)(GLenum cap) { + CALL_GL_API_RETURN(glIsEnabled, cap); +} +GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) { + CALL_GL_API_RETURN(glIsFramebuffer, framebuffer); +} +GLboolean API_ENTRY(glIsProgram)(GLuint program) { + CALL_GL_API_RETURN(glIsProgram, program); +} +GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) { + CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer); +} +GLboolean API_ENTRY(glIsShader)(GLuint shader) { + CALL_GL_API_RETURN(glIsShader, shader); +} +GLboolean API_ENTRY(glIsTexture)(GLuint texture) { + CALL_GL_API_RETURN(glIsTexture, texture); +} +void API_ENTRY(glLineWidth)(GLfloat width) { + CALL_GL_API(glLineWidth, width); +} +void API_ENTRY(glLinkProgram)(GLuint program) { + CALL_GL_API(glLinkProgram, program); +} +void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) { + CALL_GL_API(glPixelStorei, pname, param); +} +void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) { + CALL_GL_API(glPolygonOffset, factor, units); +} +void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) { + CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels); +} +void API_ENTRY(glReleaseShaderCompiler)(void) { + CALL_GL_API(glReleaseShaderCompiler); +} +void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { + CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height); +} +void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) { + CALL_GL_API(glSampleCoverage, value, invert); +} +void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) { + CALL_GL_API(glScissor, x, y, width, height); +} +void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) { + CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length); +} +void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length) { + CALL_GL_API(glShaderSource, shader, count, string, length); +} +void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) { + CALL_GL_API(glStencilFunc, func, ref, mask); +} +void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) { + CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask); +} +void API_ENTRY(glStencilMask)(GLuint mask) { + CALL_GL_API(glStencilMask, mask); +} +void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) { + CALL_GL_API(glStencilMaskSeparate, face, mask); +} +void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) { + CALL_GL_API(glStencilOp, fail, zfail, zpass); +} +void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { + CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass); +} +void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { + CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels); +} +void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) { + CALL_GL_API(glTexParameterf, target, pname, param); +} +void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) { + CALL_GL_API(glTexParameterfv, target, pname, params); +} +void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) { + CALL_GL_API(glTexParameteri, target, pname, param); +} +void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) { + CALL_GL_API(glTexParameteriv, target, pname, params); +} +void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) { + CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels); +} +void API_ENTRY(glUniform1f)(GLint location, GLfloat x) { + CALL_GL_API(glUniform1f, location, x); +} +void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) { + CALL_GL_API(glUniform1fv, location, count, v); +} +void API_ENTRY(glUniform1i)(GLint location, GLint x) { + CALL_GL_API(glUniform1i, location, x); +} +void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint* v) { + CALL_GL_API(glUniform1iv, location, count, v); +} +void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) { + CALL_GL_API(glUniform2f, location, x, y); +} +void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) { + CALL_GL_API(glUniform2fv, location, count, v); +} +void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) { + CALL_GL_API(glUniform2i, location, x, y); +} +void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint* v) { + CALL_GL_API(glUniform2iv, location, count, v); +} +void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) { + CALL_GL_API(glUniform3f, location, x, y, z); +} +void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) { + CALL_GL_API(glUniform3fv, location, count, v); +} +void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) { + CALL_GL_API(glUniform3i, location, x, y, z); +} +void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint* v) { + CALL_GL_API(glUniform3iv, location, count, v); +} +void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { + CALL_GL_API(glUniform4f, location, x, y, z, w); +} +void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) { + CALL_GL_API(glUniform4fv, location, count, v); +} +void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) { + CALL_GL_API(glUniform4i, location, x, y, z, w); +} +void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint* v) { + CALL_GL_API(glUniform4iv, location, count, v); +} +void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value); +} +void API_ENTRY(glUseProgram)(GLuint program) { + CALL_GL_API(glUseProgram, program); +} +void API_ENTRY(glValidateProgram)(GLuint program) { + CALL_GL_API(glValidateProgram, program); +} +void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) { + CALL_GL_API(glVertexAttrib1f, indx, x); +} +void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat* values) { + CALL_GL_API(glVertexAttrib1fv, indx, values); +} +void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) { + CALL_GL_API(glVertexAttrib2f, indx, x, y); +} +void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat* values) { + CALL_GL_API(glVertexAttrib2fv, indx, values); +} +void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { + CALL_GL_API(glVertexAttrib3f, indx, x, y, z); +} +void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat* values) { + CALL_GL_API(glVertexAttrib3fv, indx, values); +} +void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { + CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w); +} +void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat* values) { + CALL_GL_API(glVertexAttrib4fv, indx, values); +} +void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) { + CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr); +} +void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) { + CALL_GL_API(glViewport, x, y, width, height); +} diff --git a/opengl/libs/GLES2/gl2_entries.in b/opengl/libs/GLES2/gl2_entries.in new file mode 100644 index 0000000..6a41b94 --- /dev/null +++ b/opengl/libs/GLES2/gl2_entries.in @@ -0,0 +1,142 @@ +GL_ENTRY(void, glActiveTexture, GLenum texture) +GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader) +GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const char* name) +GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) +GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) +GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) +GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) +GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +GL_ENTRY(void, glBlendEquation, GLenum mode ) +GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) +GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) +GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const void* data, GLenum usage) +GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const void* data) +GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target) +GL_ENTRY(void, glClear, GLbitfield mask) +GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +GL_ENTRY(void, glClearDepthf, GLclampf depth) +GL_ENTRY(void, glClearStencil, GLint s) +GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +GL_ENTRY(void, glCompileShader, GLuint shader) +GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) +GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) +GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(GLuint, glCreateProgram, void) +GL_ENTRY(GLuint, glCreateShader, GLenum type) +GL_ENTRY(void, glCullFace, GLenum mode) +GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint* buffers) +GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers) +GL_ENTRY(void, glDeleteProgram, GLuint program) +GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers) +GL_ENTRY(void, glDeleteShader, GLuint shader) +GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint* textures) +GL_ENTRY(void, glDepthFunc, GLenum func) +GL_ENTRY(void, glDepthMask, GLboolean flag) +GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) +GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader) +GL_ENTRY(void, glDisable, GLenum cap) +GL_ENTRY(void, glDisableVertexAttribArray, GLuint index) +GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) +GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const void* indices) +GL_ENTRY(void, glEnable, GLenum cap) +GL_ENTRY(void, glEnableVertexAttribArray, GLuint index) +GL_ENTRY(void, glFinish, void) +GL_ENTRY(void, glFlush, void) +GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +GL_ENTRY(void, glFrontFace, GLenum mode) +GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint* buffers) +GL_ENTRY(void, glGenerateMipmap, GLenum target) +GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers) +GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers) +GL_ENTRY(void, glGenTextures, GLsizei n, GLuint* textures) +GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +GL_ENTRY(int, glGetAttribLocation, GLuint program, const char* name) +GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean* params) +GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint* params) +GL_ENTRY(GLenum, glGetError, void) +GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat* params) +GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params) +GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint* params) +GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params) +GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) +GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params) +GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params) +GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) +GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, char* source) +GL_ENTRY(const GLubyte*, glGetString, GLenum name) +GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat* params) +GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint* params) +GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params) +GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params) +GL_ENTRY(int, glGetUniformLocation, GLuint program, const char* name) +GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params) +GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params) +GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void** pointer) +GL_ENTRY(void, glHint, GLenum target, GLenum mode) +GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) +GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) +GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) +GL_ENTRY(GLboolean, glIsProgram, GLuint program) +GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) +GL_ENTRY(GLboolean, glIsShader, GLuint shader) +GL_ENTRY(GLboolean, glIsTexture, GLuint texture) +GL_ENTRY(void, glLineWidth, GLfloat width) +GL_ENTRY(void, glLinkProgram, GLuint program) +GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) +GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) +GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) +GL_ENTRY(void, glReleaseShaderCompiler, void) +GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert) +GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const char** string, const GLint* length) +GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) +GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) +GL_ENTRY(void, glStencilMask, GLuint mask) +GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask) +GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) +GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) +GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) +GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat* params) +GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) +GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint* params) +GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) +GL_ENTRY(void, glUniform1f, GLint location, GLfloat x) +GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform1i, GLint location, GLint x) +GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y) +GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y) +GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z) +GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v) +GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w) +GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v) +GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUseProgram, GLuint program) +GL_ENTRY(void, glValidateProgram, GLuint program) +GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x) +GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y) +GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z) +GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values) +GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) +GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in new file mode 100644 index 0000000..6eeecb3 --- /dev/null +++ b/opengl/libs/GLES2/gl2ext_api.in @@ -0,0 +1,105 @@ +void API_ENTRY(__glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) { + CALL_GL_API(glEGLImageTargetTexture2DOES, target, image); +} +void API_ENTRY(__glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) { + CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image); +} +void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) { + CALL_GL_API(glGetProgramBinaryOES, program, bufSize, length, binaryFormat, binary); +} +void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const void *binary, GLint length) { + CALL_GL_API(glProgramBinaryOES, program, binaryFormat, binary, length); +} +void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) { + CALL_GL_API_RETURN(glMapBufferOES, target, access); +} +GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) { + CALL_GL_API_RETURN(glUnmapBufferOES, target); +} +void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, void** params) { + CALL_GL_API(glGetBufferPointervOES, target, pname, params); +} +void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) { + CALL_GL_API(glTexImage3DOES, target, level, internalformat, width, height, depth, border, format, type, pixels); +} +void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { + CALL_GL_API(glTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +} +void API_ENTRY(glCopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { + CALL_GL_API(glCopyTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, x, y, width, height); +} +void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) { + CALL_GL_API(glCompressedTexImage3DOES, target, level, internalformat, width, height, depth, border, imageSize, data); +} +void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) { + CALL_GL_API(glCompressedTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); +} +void API_ENTRY(glFramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { + CALL_GL_API(glFramebufferTexture3DOES, target, attachment, textarget, texture, level, zoffset); +} +void API_ENTRY(glGetPerfMonitorGroupsAMD)(GLint *numGroups, GLsizei groupsSize, GLuint *groups) { + CALL_GL_API(glGetPerfMonitorGroupsAMD, numGroups, groupsSize, groups); +} +void API_ENTRY(glGetPerfMonitorCountersAMD)(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) { + CALL_GL_API(glGetPerfMonitorCountersAMD, group, numCounters, maxActiveCounters, counterSize, counters); +} +void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei *length, char *groupString) { + CALL_GL_API(glGetPerfMonitorGroupStringAMD, group, bufSize, length, groupString); +} +void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString) { + CALL_GL_API(glGetPerfMonitorCounterStringAMD, group, counter, bufSize, length, counterString); +} +void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, void *data) { + CALL_GL_API(glGetPerfMonitorCounterInfoAMD, group, counter, pname, data); +} +void API_ENTRY(glGenPerfMonitorsAMD)(GLsizei n, GLuint *monitors) { + CALL_GL_API(glGenPerfMonitorsAMD, n, monitors); +} +void API_ENTRY(glDeletePerfMonitorsAMD)(GLsizei n, GLuint *monitors) { + CALL_GL_API(glDeletePerfMonitorsAMD, n, monitors); +} +void API_ENTRY(glSelectPerfMonitorCountersAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) { + CALL_GL_API(glSelectPerfMonitorCountersAMD, monitor, enable, group, numCounters, countersList); +} +void API_ENTRY(glBeginPerfMonitorAMD)(GLuint monitor) { + CALL_GL_API(glBeginPerfMonitorAMD, monitor); +} +void API_ENTRY(glEndPerfMonitorAMD)(GLuint monitor) { + CALL_GL_API(glEndPerfMonitorAMD, monitor); +} +void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) { + CALL_GL_API(glGetPerfMonitorCounterDataAMD, monitor, pname, dataSize, data, bytesWritten); +} +void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) { + CALL_GL_API(glDeleteFencesNV, n, fences); +} +void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) { + CALL_GL_API(glGenFencesNV, n, fences); +} +GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) { + CALL_GL_API_RETURN(glIsFenceNV, fence); +} +GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) { + CALL_GL_API_RETURN(glTestFenceNV, fence); +} +void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) { + CALL_GL_API(glGetFenceivNV, fence, pname, params); +} +void API_ENTRY(glFinishFenceNV)(GLuint fence) { + CALL_GL_API(glFinishFenceNV, fence); +} +void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) { + CALL_GL_API(glSetFenceNV, fence, condition); +} +void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) { + CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls); +} +void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString) { + CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString); +} +void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) { + CALL_GL_API(glEnableDriverControlQCOM, driverControl); +} +void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) { + CALL_GL_API(glDisableDriverControlQCOM, driverControl); +} diff --git a/opengl/libs/GLES2/gl2ext_entries.in b/opengl/libs/GLES2/gl2ext_entries.in new file mode 100644 index 0000000..e608f5d --- /dev/null +++ b/opengl/libs/GLES2/gl2ext_entries.in @@ -0,0 +1,35 @@ +GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) +GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) +GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) +GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const void *binary, GLint length) +GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access) +GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) +GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void** params) +GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) +GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) +GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) +GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) +GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) +GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups) +GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) +GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, char *groupString) +GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString) +GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, void *data) +GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors) +GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors) +GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) +GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor) +GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor) +GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) +GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences) +GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences) +GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence) +GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence) +GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params) +GL_ENTRY(void, glFinishFenceNV, GLuint fence) +GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition) +GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls) +GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString) +GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl) +GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl) diff --git a/opengl/libs/gl_entries.in b/opengl/libs/GLES_CM/gl_entries.in index d7cc5da..d7cc5da 100644 --- a/opengl/libs/gl_entries.in +++ b/opengl/libs/GLES_CM/gl_entries.in diff --git a/opengl/libs/glext_entries.in b/opengl/libs/GLES_CM/glext_entries.in index dd09c71..dd09c71 100644 --- a/opengl/libs/glext_entries.in +++ b/opengl/libs/GLES_CM/glext_entries.in diff --git a/opengl/libs/gl_enums.in b/opengl/libs/gl_enums.in deleted file mode 100644 index ffc2fad..0000000 --- a/opengl/libs/gl_enums.in +++ /dev/null @@ -1,261 +0,0 @@ -GLENUM(GL_POINTS, 0x0000) -GLENUM(GL_LINES, 0x0001) -GLENUM(GL_LINE_LOOP, 0x0002) -GLENUM(GL_LINE_STRIP, 0x0003) -GLENUM(GL_TRIANGLES, 0x0004) -GLENUM(GL_TRIANGLE_STRIP, 0x0005) -GLENUM(GL_TRIANGLE_FAN, 0x0006) -GLENUM(GL_ADD, 0x0104) -GLENUM(GL_NEVER, 0x0200) -GLENUM(GL_LESS, 0x0201) -GLENUM(GL_EQUAL, 0x0202) -GLENUM(GL_LEQUAL, 0x0203) -GLENUM(GL_GREATER, 0x0204) -GLENUM(GL_NOTEQUAL, 0x0205) -GLENUM(GL_GEQUAL, 0x0206) -GLENUM(GL_ALWAYS, 0x0207) -GLENUM(GL_SRC_COLOR, 0x0300) -GLENUM(GL_ONE_MINUS_SRC_COLOR, 0x0301) -GLENUM(GL_SRC_ALPHA, 0x0302) -GLENUM(GL_ONE_MINUS_SRC_ALPHA, 0x0303) -GLENUM(GL_DST_ALPHA, 0x0304) -GLENUM(GL_ONE_MINUS_DST_ALPHA, 0x0305) -GLENUM(GL_DST_COLOR, 0x0306) -GLENUM(GL_ONE_MINUS_DST_COLOR, 0x0307) -GLENUM(GL_SRC_ALPHA_SATURATE, 0x0308) -GLENUM(GL_FRONT, 0x0404) -GLENUM(GL_BACK, 0x0405) -GLENUM(GL_FRONT_AND_BACK, 0x0408) -GLENUM(GL_INVALID_ENUM, 0x0500) -GLENUM(GL_INVALID_VALUE, 0x0501) -GLENUM(GL_INVALID_OPERATION, 0x0502) -GLENUM(GL_STACK_OVERFLOW, 0x0503) -GLENUM(GL_STACK_UNDERFLOW, 0x0504) -GLENUM(GL_OUT_OF_MEMORY, 0x0505) -GLENUM(GL_EXP, 0x0800) -GLENUM(GL_EXP2, 0x0801) -GLENUM(GL_CW, 0x0900) -GLENUM(GL_CCW, 0x0901) -GLENUM(GL_POINT_SMOOTH, 0x0B10) -GLENUM(GL_SMOOTH_POINT_SIZE_RANGE, 0x0B12) -GLENUM(GL_LINE_SMOOTH, 0x0B20) -GLENUM(GL_SMOOTH_LINE_WIDTH_RANGE, 0x0B22) -GLENUM(GL_CULL_FACE, 0x0B44) -GLENUM(GL_LIGHTING, 0x0B50) -GLENUM(GL_LIGHT_MODEL_TWO_SIDE, 0x0B52) -GLENUM(GL_LIGHT_MODEL_AMBIENT, 0x0B53) -GLENUM(GL_COLOR_MATERIAL, 0x0B57) -GLENUM(GL_FOG, 0x0B60) -GLENUM(GL_FOG_DENSITY, 0x0B62) -GLENUM(GL_FOG_START, 0x0B63) -GLENUM(GL_FOG_END, 0x0B64) -GLENUM(GL_FOG_MODE, 0x0B65) -GLENUM(GL_FOG_COLOR, 0x0B66) -GLENUM(GL_DEPTH_TEST, 0x0B71) -GLENUM(GL_STENCIL_TEST, 0x0B90) -GLENUM(GL_NORMALIZE, 0x0BA1) -GLENUM(GL_ALPHA_TEST, 0x0BC0) -GLENUM(GL_DITHER, 0x0BD0) -GLENUM(GL_BLEND, 0x0BE2) -GLENUM(GL_COLOR_LOGIC_OP, 0x0BF2) -GLENUM(GL_SCISSOR_TEST, 0x0C11) -GLENUM(GL_PERSPECTIVE_CORRECTION_HINT, 0x0C50) -GLENUM(GL_POINT_SMOOTH_HINT, 0x0C51) -GLENUM(GL_LINE_SMOOTH_HINT, 0x0C52) -GLENUM(GL_POLYGON_SMOOTH_HINT, 0x0C53) -GLENUM(GL_FOG_HINT, 0x0C54) -GLENUM(GL_UNPACK_ALIGNMENT, 0x0CF5) -GLENUM(GL_PACK_ALIGNMENT, 0x0D05) -GLENUM(GL_MAX_LIGHTS, 0x0D31) -GLENUM(GL_MAX_CLIP_PLANES, 0x0D32) -GLENUM(GL_MAX_TEXTURE_SIZE, 0x0D33) -GLENUM(GL_MAX_MODELVIEW_STACK_DEPTH, 0x0D36) -GLENUM(GL_MAX_PROJECTION_STACK_DEPTH, 0x0D38) -GLENUM(GL_MAX_TEXTURE_STACK_DEPTH, 0x0D39) -GLENUM(GL_MAX_VIEWPORT_DIMS, 0x0D3A) -GLENUM(GL_RED_BITS, 0x0D52) -GLENUM(GL_GREEN_BITS, 0x0D53) -GLENUM(GL_BLUE_BITS, 0x0D54) -GLENUM(GL_ALPHA_BITS, 0x0D55) -GLENUM(GL_DEPTH_BITS, 0x0D56) -GLENUM(GL_STENCIL_BITS, 0x0D57) -GLENUM(GL_TEXTURE_2D, 0x0DE1) -GLENUM(GL_DONT_CARE, 0x1100) -GLENUM(GL_FASTEST, 0x1101) -GLENUM(GL_NICEST, 0x1102) -GLENUM(GL_AMBIENT, 0x1200) -GLENUM(GL_DIFFUSE, 0x1201) -GLENUM(GL_SPECULAR, 0x1202) -GLENUM(GL_POSITION, 0x1203) -GLENUM(GL_SPOT_DIRECTION, 0x1204) -GLENUM(GL_SPOT_EXPONENT, 0x1205) -GLENUM(GL_SPOT_CUTOFF, 0x1206) -GLENUM(GL_CONSTANT_ATTENUATION, 0x1207) -GLENUM(GL_LINEAR_ATTENUATION, 0x1208) -GLENUM(GL_QUADRATIC_ATTENUATION, 0x1209) -GLENUM(GL_BYTE, 0x1400) -GLENUM(GL_UNSIGNED_BYTE, 0x1401) -GLENUM(GL_SHORT, 0x1402) -GLENUM(GL_UNSIGNED_SHORT, 0x1403) -GLENUM(GL_FLOAT, 0x1406) -GLENUM(GL_FIXED, 0x140C) -GLENUM(GL_CLEAR, 0x1500) -GLENUM(GL_AND, 0x1501) -GLENUM(GL_AND_REVERSE, 0x1502) -GLENUM(GL_COPY, 0x1503) -GLENUM(GL_AND_INVERTED, 0x1504) -GLENUM(GL_NOOP, 0x1505) -GLENUM(GL_XOR, 0x1506) -GLENUM(GL_OR, 0x1507) -GLENUM(GL_NOR, 0x1508) -GLENUM(GL_EQUIV, 0x1509) -GLENUM(GL_INVERT, 0x150A) -GLENUM(GL_OR_REVERSE, 0x150B) -GLENUM(GL_COPY_INVERTED, 0x150C) -GLENUM(GL_OR_INVERTED, 0x150D) -GLENUM(GL_NAND, 0x150E) -GLENUM(GL_SET, 0x150F) -GLENUM(GL_EMISSION, 0x1600) -GLENUM(GL_SHININESS, 0x1601) -GLENUM(GL_AMBIENT_AND_DIFFUSE, 0x1602) -GLENUM(GL_MODELVIEW, 0x1700) -GLENUM(GL_PROJECTION, 0x1701) -GLENUM(GL_TEXTURE, 0x1702) -GLENUM(GL_ALPHA, 0x1906) -GLENUM(GL_RGB, 0x1907) -GLENUM(GL_RGBA, 0x1908) -GLENUM(GL_LUMINANCE, 0x1909) -GLENUM(GL_LUMINANCE_ALPHA, 0x190A) -GLENUM(GL_FLAT, 0x1D00) -GLENUM(GL_SMOOTH, 0x1D01) -GLENUM(GL_KEEP, 0x1E00) -GLENUM(GL_REPLACE, 0x1E01) -GLENUM(GL_REPLACE, 0x1E01) -GLENUM(GL_INCR, 0x1E02) -GLENUM(GL_DECR, 0x1E03) -GLENUM(GL_VENDOR, 0x1F00) -GLENUM(GL_RENDERER, 0x1F01) -GLENUM(GL_VERSION, 0x1F02) -GLENUM(GL_EXTENSIONS, 0x1F03) -GLENUM(GL_MODULATE, 0x2100) -GLENUM(GL_DECAL, 0x2101) -GLENUM(GL_TEXTURE_ENV_MODE, 0x2200) -GLENUM(GL_TEXTURE_ENV_COLOR, 0x2201) -GLENUM(GL_TEXTURE_ENV, 0x2300) -GLENUM(GL_NEAREST, 0x2600) -GLENUM(GL_LINEAR, 0x2601) -GLENUM(GL_NEAREST_MIPMAP_NEAREST, 0x2700) -GLENUM(GL_LINEAR_MIPMAP_NEAREST, 0x2701) -GLENUM(GL_NEAREST_MIPMAP_LINEAR, 0x2702) -GLENUM(GL_LINEAR_MIPMAP_LINEAR, 0x2703) -GLENUM(GL_TEXTURE_MAG_FILTER, 0x2800) -GLENUM(GL_TEXTURE_MIN_FILTER, 0x2801) -GLENUM(GL_TEXTURE_WRAP_S, 0x2802) -GLENUM(GL_TEXTURE_WRAP_T, 0x2803) -GLENUM(GL_CLAMP, 0x2900) -GLENUM(GL_REPEAT, 0x2901) -GLENUM(GL_CLIP_PLANE0, 0x3000) -GLENUM(GL_CLIP_PLANE1, 0x3001) -GLENUM(GL_CLIP_PLANE2, 0x3002) -GLENUM(GL_CLIP_PLANE3, 0x3003) -GLENUM(GL_CLIP_PLANE4, 0x3004) -GLENUM(GL_CLIP_PLANE5, 0x3005) -GLENUM(GL_LIGHT0, 0x4000) -GLENUM(GL_LIGHT1, 0x4001) -GLENUM(GL_LIGHT2, 0x4002) -GLENUM(GL_LIGHT3, 0x4003) -GLENUM(GL_LIGHT4, 0x4004) -GLENUM(GL_LIGHT5, 0x4005) -GLENUM(GL_LIGHT6, 0x4006) -GLENUM(GL_LIGHT7, 0x4007) -GLENUM(GL_DIRECT_TEXTURE_2D_QUALCOMM, 0x7E80) -GLENUM(GL_UNSIGNED_SHORT_4_4_4_4, 0x8033) -GLENUM(GL_UNSIGNED_SHORT_5_5_5_1, 0x8034) -GLENUM(GL_POLYGON_OFFSET_FILL, 0x8037) -GLENUM(GL_RESCALE_NORMAL, 0x803A) -GLENUM(GL_VERTEX_ARRAY, 0x8074) -GLENUM(GL_NORMAL_ARRAY, 0x8075) -GLENUM(GL_COLOR_ARRAY, 0x8076) -GLENUM(GL_TEXTURE_COORD_ARRAY, 0x8078) -GLENUM(GL_MULTISAMPLE, 0x809D) -GLENUM(GL_SAMPLE_ALPHA_TO_COVERAGE, 0x809E) -GLENUM(GL_SAMPLE_ALPHA_TO_ONE, 0x809F) -GLENUM(GL_SAMPLE_COVERAGE, 0x80A0) -GLENUM(GL_MAX_ELEMENTS_VERTICES, 0x80E8) -GLENUM(GL_MAX_ELEMENTS_INDICES, 0x80E9) -GLENUM(GL_CLAMP_TO_EDGE, 0x812F) -GLENUM(GL_GENERATE_MIPMAP, 0x8191) -GLENUM(GL_GENERATE_MIPMAP_HINT, 0x8192) -GLENUM(GL_UNSIGNED_SHORT_5_6_5, 0x8363) -GLENUM(GL_ALIASED_POINT_SIZE_RANGE, 0x846D) -GLENUM(GL_ALIASED_LINE_WIDTH_RANGE, 0x846E) -GLENUM(GL_TEXTURE0, 0x84C0) -GLENUM(GL_TEXTURE1, 0x84C1) -GLENUM(GL_TEXTURE2, 0x84C2) -GLENUM(GL_TEXTURE3, 0x84C3) -GLENUM(GL_TEXTURE4, 0x84C4) -GLENUM(GL_TEXTURE5, 0x84C5) -GLENUM(GL_TEXTURE6, 0x84C6) -GLENUM(GL_TEXTURE7, 0x84C7) -GLENUM(GL_TEXTURE8, 0x84C8) -GLENUM(GL_TEXTURE9, 0x84C9) -GLENUM(GL_TEXTURE10, 0x84CA) -GLENUM(GL_TEXTURE11, 0x84CB) -GLENUM(GL_TEXTURE12, 0x84CC) -GLENUM(GL_TEXTURE13, 0x84CD) -GLENUM(GL_TEXTURE14, 0x84CE) -GLENUM(GL_TEXTURE15, 0x84CF) -GLENUM(GL_TEXTURE16, 0x84D0) -GLENUM(GL_TEXTURE17, 0x84D1) -GLENUM(GL_TEXTURE18, 0x84D2) -GLENUM(GL_TEXTURE19, 0x84D3) -GLENUM(GL_TEXTURE20, 0x84D4) -GLENUM(GL_TEXTURE21, 0x84D5) -GLENUM(GL_TEXTURE22, 0x84D6) -GLENUM(GL_TEXTURE23, 0x84D7) -GLENUM(GL_TEXTURE24, 0x84D8) -GLENUM(GL_TEXTURE25, 0x84D9) -GLENUM(GL_TEXTURE26, 0x84DA) -GLENUM(GL_TEXTURE27, 0x84DB) -GLENUM(GL_TEXTURE28, 0x84DC) -GLENUM(GL_TEXTURE29, 0x84DD) -GLENUM(GL_TEXTURE30, 0x84DE) -GLENUM(GL_TEXTURE31, 0x84DF) -GLENUM(GL_MAX_TEXTURE_UNITS, 0x84E2) -GLENUM(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 0x86A2) -GLENUM(GL_COMPRESSED_TEXTURE_FORMATS, 0x86A3) -GLENUM(GL_BUFFER_SIZE, 0x8764) -GLENUM(GL_BUFFER_USAGE, 0x8765) -GLENUM(GL_POINT_SPRITE_OES, 0x8861) -GLENUM(GL_COORD_REPLACE_OES, 0x8862) -GLENUM(GL_ARRAY_BUFFER, 0x8892) -GLENUM(GL_ELEMENT_ARRAY_BUFFER, 0x8893) -GLENUM(GL_ARRAY_BUFFER_BINDING, 0x8894) -GLENUM(GL_ELEMENT_ARRAY_BUFFER_BINDING, 0x8895) -GLENUM(GL_VERTEX_ARRAY_BUFFER_BINDING, 0x8896) -GLENUM(GL_NORMAL_ARRAY_BUFFER_BINDING, 0x8897) -GLENUM(GL_COLOR_ARRAY_BUFFER_BINDING, 0x8898) -GLENUM(GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING, 0x889A) -GLENUM(GL_STATIC_DRAW, 0x88E4) -GLENUM(GL_DYNAMIC_DRAW, 0x88E8) -GLENUM(GL_POINT_SIZE_ARRAY_TYPE_OES, 0x898A) -GLENUM(GL_POINT_SIZE_ARRAY_STRIDE_OES, 0x898B) -GLENUM(GL_POINT_SIZE_ARRAY_POINTER_OES, 0x898C) -GLENUM(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES, 0x898D) -GLENUM(GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES, 0x898E) -GLENUM(GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES, 0x898F) -GLENUM(GL_PALETTE4_RGB8_OES, 0x8B90) -GLENUM(GL_PALETTE4_RGBA8_OES, 0x8B91) -GLENUM(GL_PALETTE4_R5_G6_B5_OES, 0x8B92) -GLENUM(GL_PALETTE4_RGBA4_OES, 0x8B93) -GLENUM(GL_PALETTE4_RGB5_A1_OES, 0x8B94) -GLENUM(GL_PALETTE8_RGB8_OES, 0x8B95) -GLENUM(GL_PALETTE8_RGBA8_OES, 0x8B96) -GLENUM(GL_PALETTE8_R5_G6_B5_OES, 0x8B97) -GLENUM(GL_PALETTE8_RGBA4_OES, 0x8B98) -GLENUM(GL_PALETTE8_RGB5_A1_OES, 0x8B99) -GLENUM(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, 0x8B9A) -GLENUM(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, 0x8B9B) -GLENUM(GL_POINT_SIZE_ARRAY_OES, 0x8B9C) -GLENUM(GL_TEXTURE_CROP_RECT_OES, 0x8B9D) -GLENUM(GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, 0x8B9F) diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h index fd97254..1257785 100644 --- a/opengl/libs/hooks.h +++ b/opengl/libs/hooks.h @@ -23,9 +23,13 @@ #include <EGL/egl.h> #include <EGL/eglext.h> + #include <GLES/gl.h> #include <GLES/glext.h> +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> + #if !defined(__arm__) #define USE_SLOW_BINDING 1 #else @@ -76,11 +80,15 @@ enum { struct gl_hooks_t { struct gl_t { - #include "gl_entries.in" - #include "glext_entries.in" + #include "GLES_CM/gl_entries.in" + #include "GLES_CM/glext_entries.in" } gl; + struct gl2_t { + #include "GLES2/gl2_entries.in" + #include "GLES2/gl2ext_entries.in" + } gl2; struct egl_t { - #include "egl_entries.in" + #include "EGL/egl_entries.in" } egl; struct gl_ext_t { void (*extensions[MAX_NUMBER_OF_GL_EXTENSIONS])(void); diff --git a/opengl/libs/tools/enumextract.sh b/opengl/libs/tools/enumextract.sh deleted file mode 100644 index 5707302..0000000 --- a/opengl/libs/tools/enumextract.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -awk ' -/^#define GL_/ { - names[count] = $2; - values[count] = $3; - sort[count] = $3 + 0; - count++; -} -END { - for (i = 1; i < count; i++) { - for (j = 0; j < i; j++) { - if (sort[i] < sort[j]) { - tn = names[i]; - tv = values[i]; - ts = sort[i]; - names[i] = names[j]; - values[i] = values[j]; - sort[i] = sort[j]; - names[j] = tn; - values[j] = tv; - sort[j] = ts; - } - } - } - - for (i = 0; i < count; i++) { - printf("GLENUM(%s, %s)\n", names[i], values[i]); - } -} -' < $1 - diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles index 107768b..4f8eda4 100755 --- a/opengl/libs/tools/genfiles +++ b/opengl/libs/tools/genfiles @@ -15,6 +15,13 @@ # limitations under the License. ./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in -./glentrygen ../../include/GLES/gl.h > ../gl_entries.in +./glentrygen ../../include/GLES/gl.h > ../GLES_CM/gl_entries.in + ./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in -./glentrygen ../../include/GLES/glext.h > ../glext_entries.in +./glentrygen ../../include/GLES/glext.h > ../GLES_CM/glext_entries.in + +./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in +./glentrygen ../../include/GLES2/gl2.h > ../GLES2/gl2_entries.in + +./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in +./glentrygen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_entries.in diff --git a/opengl/libs/tools/glapigen b/opengl/libs/tools/glapigen index a2c3a7b..bd8dda3 100755 --- a/opengl/libs/tools/glapigen +++ b/opengl/libs/tools/glapigen @@ -16,16 +16,23 @@ use strict; +sub rtrim($) +{ + my $string = shift; + $string =~ s/\s+$//; + return $string; +} + while (my $line = <>) { next if $line =~ /^\//; next if $line =~ /^#/; next if $line =~ /^\s*$/; - if ($line !~ /^GL_API\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { + if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { next; } - my $type = $1; - my $name = $2; - my $args = $3; + my $type = rtrim($2); + my $name = $3; + my $args = $4; #printf("%s", $line); diff --git a/opengl/libs/tools/glentrygen b/opengl/libs/tools/glentrygen index 5e0f7b6..170f041 100755 --- a/opengl/libs/tools/glentrygen +++ b/opengl/libs/tools/glentrygen @@ -16,16 +16,23 @@ use strict; +sub rtrim($) +{ + my $string = shift; + $string =~ s/\s+$//; + return $string; +} + while (my $line = <>) { next if $line =~ /^\//; next if $line =~ /^#/; next if $line =~ /^\s*$/; - if ($line !~ /^GL_API\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { + if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { next; } - my $type = $1; - my $name = $2; - my $args = $3; + my $type = rtrim($2); + my $name = $3; + my $args = $4; printf("GL_ENTRY(%s, %s, %s)\n", $type, $name, $args); } |