diff options
-rw-r--r-- | platform/android/src/gl_functions.cpp | 151 | ||||
-rw-r--r-- | platform/darwin/src/gl_functions.cpp | 180 | ||||
-rw-r--r-- | platform/linux/src/gl_functions.cpp | 166 | ||||
-rw-r--r-- | platform/qt/src/gl_functions.cpp | 566 |
4 files changed, 1063 insertions, 0 deletions
diff --git a/platform/android/src/gl_functions.cpp b/platform/android/src/gl_functions.cpp new file mode 100644 index 0000000000..168ae4c52e --- /dev/null +++ b/platform/android/src/gl_functions.cpp @@ -0,0 +1,151 @@ +#include <mbgl/platform/gl_functions.hpp> + +#define GL_GLEXT_PROTOTYPES +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> + +namespace mbgl { +namespace platform { + +void (* const glActiveTexture)(GLenum) = ::glActiveTexture; +void (* const glAttachShader)(GLuint, GLuint) = ::glAttachShader; +void (* const glBindAttribLocation)(GLuint, GLuint, const GLchar *) = ::glBindAttribLocation; +void (* const glBindBuffer)(GLenum, GLuint) = ::glBindBuffer; +void (* const glBindFramebuffer)(GLenum, GLuint) = ::glBindFramebuffer; +void (* const glBindRenderbuffer)(GLenum, GLuint) = ::glBindRenderbuffer; +void (* const glBindTexture)(GLenum, GLuint) = ::glBindTexture; +void (* const glBlendColor)(GLfloat, GLfloat, GLfloat, GLfloat) = ::glBlendColor; +void (* const glBlendEquation)(GLenum) = ::glBlendEquation; +void (* const glBlendEquationSeparate)(GLenum, GLenum) = ::glBlendEquationSeparate; +void (* const glBlendFunc)(GLenum, GLenum) = ::glBlendFunc; +void (* const glBlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum) = ::glBlendFuncSeparate; +void (* const glBufferData)(GLenum, GLsizeiptr, const void *, GLenum) = ::glBufferData; +void (* const glBufferSubData)(GLenum, GLintptr, GLsizeiptr, const void *) = ::glBufferSubData; +GLenum (* const glCheckFramebufferStatus)(GLenum) = ::glCheckFramebufferStatus; +void (* const glClear)(GLbitfield) = ::glClear; +void (* const glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat) = ::glClearColor; +void (* const glClearDepthf)(GLfloat) = ::glClearDepthf; +void (* const glClearStencil)(GLint) = ::glClearStencil; +void (* const glColorMask)(GLboolean, GLboolean, GLboolean, GLboolean) = ::glColorMask; +void (* const glCompileShader)(GLuint) = ::glCompileShader; +void (* const glCompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void *) = ::glCompressedTexImage2D; +void (* const glCompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void *) = ::glCompressedTexSubImage2D; +void (* const glCopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint) = ::glCopyTexImage2D; +void (* const glCopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) = ::glCopyTexSubImage2D; +GLuint (* const glCreateProgram)() = ::glCreateProgram; +GLuint (* const glCreateShader)(GLenum) = ::glCreateShader; +void (* const glCullFace)(GLenum) = ::glCullFace; +void (* const glDeleteBuffers)(GLsizei, const GLuint *) = ::glDeleteBuffers; +void (* const glDeleteFramebuffers)(GLsizei, const GLuint *) = ::glDeleteFramebuffers; +void (* const glDeleteProgram)(GLuint) = ::glDeleteProgram; +void (* const glDeleteRenderbuffers)(GLsizei, const GLuint *) = ::glDeleteRenderbuffers; +void (* const glDeleteShader)(GLuint) = ::glDeleteShader; +void (* const glDeleteTextures)(GLsizei, const GLuint *) = ::glDeleteTextures; +void (* const glDepthFunc)(GLenum) = ::glDepthFunc; +void (* const glDepthMask)(GLboolean) = ::glDepthMask; +void (* const glDepthRangef)(GLfloat, GLfloat) = ::glDepthRangef; +void (* const glDetachShader)(GLuint, GLuint) = ::glDetachShader; +void (* const glDisable)(GLenum) = ::glDisable; +void (* const glDisableVertexAttribArray)(GLuint) = ::glDisableVertexAttribArray; +void (* const glDrawArrays)(GLenum, GLint, GLsizei) = ::glDrawArrays; +void (* const glDrawElements)(GLenum, GLsizei, GLenum, const void *) = ::glDrawElements; +void (* const glEnable)(GLenum) = ::glEnable; +void (* const glEnableVertexAttribArray)(GLuint) = ::glEnableVertexAttribArray; +void (* const glFinish)() = ::glFinish; +void (* const glFlush)() = ::glFlush; +void (* const glFramebufferRenderbuffer)(GLenum, GLenum, GLenum, GLuint) = ::glFramebufferRenderbuffer; +void (* const glFramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint) = ::glFramebufferTexture2D; +void (* const glFrontFace)(GLenum) = ::glFrontFace; +void (* const glGenBuffers)(GLsizei, GLuint *) = ::glGenBuffers; +void (* const glGenerateMipmap)(GLenum) = ::glGenerateMipmap; +void (* const glGenFramebuffers)(GLsizei, GLuint *) = ::glGenFramebuffers; +void (* const glGenRenderbuffers)(GLsizei, GLuint *) = ::glGenRenderbuffers; +void (* const glGenTextures)(GLsizei, GLuint *) = ::glGenTextures; +void (* const glGetActiveAttrib)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = ::glGetActiveAttrib; +void (* const glGetActiveUniform)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = ::glGetActiveUniform; +void (* const glGetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *) = ::glGetAttachedShaders; +GLint (* const glGetAttribLocation)(GLuint, const GLchar *) = ::glGetAttribLocation; +void (* const glGetBooleanv)(GLenum, GLboolean *) = ::glGetBooleanv; +void (* const glGetBufferParameteriv)(GLenum, GLenum, GLint *) = ::glGetBufferParameteriv; +GLenum (* const glGetError)() = ::glGetError; +void (* const glGetFloatv)(GLenum, GLfloat *) = ::glGetFloatv; +void (* const glGetFramebufferAttachmentParameteriv)(GLenum, GLenum, GLenum, GLint *) = ::glGetFramebufferAttachmentParameteriv; +void (* const glGetIntegerv)(GLenum, GLint *) = ::glGetIntegerv; +void (* const glGetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetProgramInfoLog; +void (* const glGetProgramiv)(GLuint, GLenum, GLint *) = ::glGetProgramiv; +void (* const glGetRenderbufferParameteriv)(GLenum, GLenum, GLint *) = ::glGetRenderbufferParameteriv; +void (* const glGetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetShaderInfoLog; +void (* const glGetShaderiv)(GLuint, GLenum, GLint *) = ::glGetShaderiv; +void (* const glGetShaderSource)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetShaderSource; +const GLubyte *(*glGetString)(GLenum) = ::glGetString; +void (* const glGetTexParameterfv)(GLenum, GLenum, GLfloat *) = ::glGetTexParameterfv; +void (* const glGetTexParameteriv)(GLenum, GLenum, GLint *) = ::glGetTexParameteriv; +void (* const glGetUniformfv)(GLuint, GLint, GLfloat *) = ::glGetUniformfv; +void (* const glGetUniformiv)(GLuint, GLint, GLint *) = ::glGetUniformiv; +GLint (* const glGetUniformLocation)(GLuint, const GLchar *) = ::glGetUniformLocation; +void (* const glGetVertexAttribfv)(GLuint, GLenum, GLfloat *) = ::glGetVertexAttribfv; +void (* const glGetVertexAttribiv)(GLuint, GLenum, GLint *) = ::glGetVertexAttribiv; +void (* const glGetVertexAttribPointerv)(GLuint, GLenum, void **) = ::glGetVertexAttribPointerv; +void (* const glHint)(GLenum, GLenum) = ::glHint; +GLboolean (* const glIsBuffer)(GLuint) = ::glIsBuffer; +GLboolean (* const glIsEnabled)(GLenum) = ::glIsEnabled; +GLboolean (* const glIsFramebuffer)(GLuint) = ::glIsFramebuffer; +GLboolean (* const glIsProgram)(GLuint) = ::glIsProgram; +GLboolean (* const glIsRenderbuffer)(GLuint) = ::glIsRenderbuffer; +GLboolean (* const glIsShader)(GLuint) = ::glIsShader; +GLboolean (* const glIsTexture)(GLuint) = ::glIsTexture; +void (* const glLineWidth)(GLfloat) = ::glLineWidth; +void (* const glLinkProgram)(GLuint) = ::glLinkProgram; +void (* const glPixelStorei)(GLenum, GLint) = ::glPixelStorei; +void (* const glPolygonOffset)(GLfloat, GLfloat) = ::glPolygonOffset; +void (* const glReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void *) = ::glReadPixels; +void (* const glRenderbufferStorage)(GLenum, GLenum, GLsizei, GLsizei) = ::glRenderbufferStorage; +void (* const glSampleCoverage)(GLfloat, GLboolean) = ::glSampleCoverage; +void (* const glScissor)(GLint, GLint, GLsizei, GLsizei) = ::glScissor; +void (* const glShaderSource)(GLuint, GLsizei, const GLchar * const*, const GLint *) = ::glShaderSource; +void (* const glStencilFunc)(GLenum, GLint, GLuint) = ::glStencilFunc; +void (* const glStencilFuncSeparate)(GLenum, GLenum, GLint, GLuint) = ::glStencilFuncSeparate; +void (* const glStencilMask)(GLuint) = ::glStencilMask; +void (* const glStencilMaskSeparate)(GLenum, GLuint) = ::glStencilMaskSeparate; +void (* const glStencilOp)(GLenum, GLenum, GLenum) = ::glStencilOp; +void (* const glStencilOpSeparate)(GLenum, GLenum, GLenum, GLenum) = ::glStencilOpSeparate; +void (* const glTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) = ::glTexImage2D; +void (* const glTexParameterf)(GLenum, GLenum, GLfloat) = ::glTexParameterf; +void (* const glTexParameterfv)(GLenum, GLenum, const GLfloat *) = ::glTexParameterfv; +void (* const glTexParameteri)(GLenum, GLenum, GLint) = ::glTexParameteri; +void (* const glTexParameteriv)(GLenum, GLenum, const GLint *) = ::glTexParameteriv; +void (* const glTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void *) = ::glTexSubImage2D; +void (* const glUniform1f)(GLint, GLfloat) = ::glUniform1f; +void (* const glUniform1fv)(GLint, GLsizei, const GLfloat *) = ::glUniform1fv; +void (* const glUniform1i)(GLint, GLint) = ::glUniform1i; +void (* const glUniform1iv)(GLint, GLsizei, const GLint *) = ::glUniform1iv; +void (* const glUniform2f)(GLint, GLfloat, GLfloat) = ::glUniform2f; +void (* const glUniform2fv)(GLint, GLsizei, const GLfloat *) = ::glUniform2fv; +void (* const glUniform2i)(GLint, GLint, GLint) = ::glUniform2i; +void (* const glUniform2iv)(GLint, GLsizei, const GLint *) = ::glUniform2iv; +void (* const glUniform3f)(GLint, GLfloat, GLfloat, GLfloat) = ::glUniform3f; +void (* const glUniform3fv)(GLint, GLsizei, const GLfloat *) = ::glUniform3fv; +void (* const glUniform3i)(GLint, GLint, GLint, GLint) = ::glUniform3i; +void (* const glUniform3iv)(GLint, GLsizei, const GLint *) = ::glUniform3iv; +void (* const glUniform4f)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) = ::glUniform4f; +void (* const glUniform4fv)(GLint, GLsizei, const GLfloat *) = ::glUniform4fv; +void (* const glUniform4i)(GLint, GLint, GLint, GLint, GLint) = ::glUniform4i; +void (* const glUniform4iv)(GLint, GLsizei, const GLint *) = ::glUniform4iv; +void (* const glUniformMatrix2fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix2fv; +void (* const glUniformMatrix3fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix3fv; +void (* const glUniformMatrix4fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix4fv; +void (* const glUseProgram)(GLuint) = ::glUseProgram; +void (* const glValidateProgram)(GLuint) = ::glValidateProgram; +void (* const glVertexAttrib1f)(GLuint, GLfloat) = ::glVertexAttrib1f; +void (* const glVertexAttrib1fv)(GLuint, const GLfloat *) = ::glVertexAttrib1fv; +void (* const glVertexAttrib2f)(GLuint, GLfloat, GLfloat) = ::glVertexAttrib2f; +void (* const glVertexAttrib2fv)(GLuint, const GLfloat *) = ::glVertexAttrib2fv; +void (* const glVertexAttrib3f)(GLuint, GLfloat, GLfloat, GLfloat) = ::glVertexAttrib3f; +void (* const glVertexAttrib3fv)(GLuint, const GLfloat *) = ::glVertexAttrib3fv; +void (* const glVertexAttrib4f)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) = ::glVertexAttrib4f; +void (* const glVertexAttrib4fv)(GLuint, const GLfloat *) = ::glVertexAttrib4fv; +void (* const glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) = ::glVertexAttribPointer; +void (* const glViewport)(GLint, GLint, GLsizei, GLsizei) = ::glViewport; + +} // namespace platform +} // namespace mbgl
\ No newline at end of file diff --git a/platform/darwin/src/gl_functions.cpp b/platform/darwin/src/gl_functions.cpp new file mode 100644 index 0000000000..b8828d3117 --- /dev/null +++ b/platform/darwin/src/gl_functions.cpp @@ -0,0 +1,180 @@ +#include <mbgl/platform/gl_functions.hpp> + +#include "TargetConditionals.h" + +#if TARGET_OS_IPHONE + #include <OpenGLES/ES2/gl.h> + #include <OpenGLES/ES2/glext.h> +#elif TARGET_OS_SIMULATOR + #include <OpenGLES/ES2/gl.h> + #include <OpenGLES/ES2/glext.h> +#elif TARGET_OS_MAC + #include <OpenGL/OpenGL.h> + #include <OpenGL/gl.h> + #include <OpenGL/glext.h> +#else + #error Unsupported Apple platform +#endif + +namespace mbgl { +namespace platform { + +void (* const glActiveTexture)(GLenum) = ::glActiveTexture; +void (* const glAttachShader)(GLuint, GLuint) = ::glAttachShader; +void (* const glBindAttribLocation)(GLuint, GLuint, const GLchar *) = ::glBindAttribLocation; +void (* const glBindBuffer)(GLenum, GLuint) = ::glBindBuffer; +void (* const glBindFramebuffer)(GLenum, GLuint) = ::glBindFramebuffer; +void (* const glBindRenderbuffer)(GLenum, GLuint) = ::glBindRenderbuffer; +void (* const glBindTexture)(GLenum, GLuint) = ::glBindTexture; +void (* const glBlendColor)(GLfloat, GLfloat, GLfloat, GLfloat) = ::glBlendColor; +void (* const glBlendEquation)(GLenum) = ::glBlendEquation; +void (* const glBlendEquationSeparate)(GLenum, GLenum) = ::glBlendEquationSeparate; +void (* const glBlendFunc)(GLenum, GLenum) = ::glBlendFunc; +void (* const glBlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum) = ::glBlendFuncSeparate; +void (* const glBufferData)(GLenum, GLsizeiptr, const void *, GLenum) = ::glBufferData; +void (* const glBufferSubData)(GLenum, GLintptr, GLsizeiptr, const void *) = ::glBufferSubData; +GLenum (* const glCheckFramebufferStatus)(GLenum) = ::glCheckFramebufferStatus; +void (* const glClear)(GLbitfield) = ::glClear; +void (* const glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat) = ::glClearColor; +#if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && TARGET_OS_MAC +void (* const glClearDepthf)(GLfloat) = [](GLfloat depth) { return ::glClearDepth(depth); }; +#else +void (* const glClearDepthf)(GLfloat) = ::glClearDepthf; +#endif +void (* const glClearStencil)(GLint) = ::glClearStencil; +void (* const glColorMask)(GLboolean, GLboolean, GLboolean, GLboolean) = ::glColorMask; +void (* const glCompileShader)(GLuint) = ::glCompileShader; +void (* const glCompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void *) = ::glCompressedTexImage2D; +void (* const glCompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void *) = ::glCompressedTexSubImage2D; +void (* const glCopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint) = ::glCopyTexImage2D; +void (* const glCopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) = ::glCopyTexSubImage2D; +GLuint (* const glCreateProgram)() = ::glCreateProgram; +GLuint (* const glCreateShader)(GLenum) = ::glCreateShader; +void (* const glCullFace)(GLenum) = ::glCullFace; +void (* const glDeleteBuffers)(GLsizei, const GLuint *) = ::glDeleteBuffers; +void (* const glDeleteFramebuffers)(GLsizei, const GLuint *) = ::glDeleteFramebuffers; +void (* const glDeleteProgram)(GLuint) = ::glDeleteProgram; +void (* const glDeleteRenderbuffers)(GLsizei, const GLuint *) = ::glDeleteRenderbuffers; +void (* const glDeleteShader)(GLuint) = ::glDeleteShader; +void (* const glDeleteTextures)(GLsizei, const GLuint *) = ::glDeleteTextures; +void (* const glDepthFunc)(GLenum) = ::glDepthFunc; +void (* const glDepthMask)(GLboolean) = ::glDepthMask; +#if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && TARGET_OS_MAC +void (* const glDepthRangef)(GLfloat, GLfloat) = [](GLfloat nearVal, GLfloat farVal) { return ::glDepthRange(nearVal, farVal); }; +#else +void (* const glDepthRangef)(GLfloat, GLfloat) = ::glDepthRangef; +#endif +void (* const glDetachShader)(GLuint, GLuint) = ::glDetachShader; +void (* const glDisable)(GLenum) = ::glDisable; +void (* const glDisableVertexAttribArray)(GLuint) = ::glDisableVertexAttribArray; +void (* const glDrawArrays)(GLenum, GLint, GLsizei) = ::glDrawArrays; +void (* const glDrawElements)(GLenum, GLsizei, GLenum, const void *) = ::glDrawElements; +void (* const glEnable)(GLenum) = ::glEnable; +void (* const glEnableVertexAttribArray)(GLuint) = ::glEnableVertexAttribArray; +void (* const glFinish)() = ::glFinish; +void (* const glFlush)() = ::glFlush; +void (* const glFramebufferRenderbuffer)(GLenum, GLenum, GLenum, GLuint) = ::glFramebufferRenderbuffer; +void (* const glFramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint) = ::glFramebufferTexture2D; +void (* const glFrontFace)(GLenum) = ::glFrontFace; +void (* const glGenBuffers)(GLsizei, GLuint *) = ::glGenBuffers; +void (* const glGenerateMipmap)(GLenum) = ::glGenerateMipmap; +void (* const glGenFramebuffers)(GLsizei, GLuint *) = ::glGenFramebuffers; +void (* const glGenRenderbuffers)(GLsizei, GLuint *) = ::glGenRenderbuffers; +void (* const glGenTextures)(GLsizei, GLuint *) = ::glGenTextures; +void (* const glGetActiveAttrib)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = ::glGetActiveAttrib; +void (* const glGetActiveUniform)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = ::glGetActiveUniform; +void (* const glGetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *) = ::glGetAttachedShaders; +GLint (* const glGetAttribLocation)(GLuint, const GLchar *) = ::glGetAttribLocation; +void (* const glGetBooleanv)(GLenum, GLboolean *) = ::glGetBooleanv; +void (* const glGetBufferParameteriv)(GLenum, GLenum, GLint *) = ::glGetBufferParameteriv; +GLenum (* const glGetError)() = ::glGetError; +void (* const glGetFloatv)(GLenum, GLfloat *) = ::glGetFloatv; +void (* const glGetFramebufferAttachmentParameteriv)(GLenum, GLenum, GLenum, GLint *) = ::glGetFramebufferAttachmentParameteriv; +void (* const glGetIntegerv)(GLenum, GLint *) = ::glGetIntegerv; +void (* const glGetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetProgramInfoLog; +void (* const glGetProgramiv)(GLuint, GLenum, GLint *) = ::glGetProgramiv; +void (* const glGetRenderbufferParameteriv)(GLenum, GLenum, GLint *) = ::glGetRenderbufferParameteriv; +void (* const glGetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetShaderInfoLog; +void (* const glGetShaderiv)(GLuint, GLenum, GLint *) = ::glGetShaderiv; +void (* const glGetShaderSource)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetShaderSource; +const GLubyte *(*glGetString)(GLenum) = ::glGetString; +void (* const glGetTexParameterfv)(GLenum, GLenum, GLfloat *) = ::glGetTexParameterfv; +void (* const glGetTexParameteriv)(GLenum, GLenum, GLint *) = ::glGetTexParameteriv; +void (* const glGetUniformfv)(GLuint, GLint, GLfloat *) = ::glGetUniformfv; +void (* const glGetUniformiv)(GLuint, GLint, GLint *) = ::glGetUniformiv; +GLint (* const glGetUniformLocation)(GLuint, const GLchar *) = ::glGetUniformLocation; +void (* const glGetVertexAttribfv)(GLuint, GLenum, GLfloat *) = ::glGetVertexAttribfv; +void (* const glGetVertexAttribiv)(GLuint, GLenum, GLint *) = ::glGetVertexAttribiv; +void (* const glGetVertexAttribPointerv)(GLuint, GLenum, void **) = ::glGetVertexAttribPointerv; +void (* const glHint)(GLenum, GLenum) = ::glHint; +GLboolean (* const glIsBuffer)(GLuint) = ::glIsBuffer; +GLboolean (* const glIsEnabled)(GLenum) = ::glIsEnabled; +GLboolean (* const glIsFramebuffer)(GLuint) = ::glIsFramebuffer; +GLboolean (* const glIsProgram)(GLuint) = ::glIsProgram; +GLboolean (* const glIsRenderbuffer)(GLuint) = ::glIsRenderbuffer; +GLboolean (* const glIsShader)(GLuint) = ::glIsShader; +GLboolean (* const glIsTexture)(GLuint) = ::glIsTexture; +void (* const glLineWidth)(GLfloat) = ::glLineWidth; +void (* const glLinkProgram)(GLuint) = ::glLinkProgram; +void (* const glPixelStorei)(GLenum, GLint) = ::glPixelStorei; +void (* const glPolygonOffset)(GLfloat, GLfloat) = ::glPolygonOffset; +void (* const glReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void *) = ::glReadPixels; +void (* const glRenderbufferStorage)(GLenum, GLenum, GLsizei, GLsizei) = ::glRenderbufferStorage; +void (* const glSampleCoverage)(GLfloat, GLboolean) = ::glSampleCoverage; +void (* const glScissor)(GLint, GLint, GLsizei, GLsizei) = ::glScissor; +void (* const glShaderSource)(GLuint, GLsizei, const GLchar * const*, const GLint *) = ::glShaderSource; +void (* const glStencilFunc)(GLenum, GLint, GLuint) = ::glStencilFunc; +void (* const glStencilFuncSeparate)(GLenum, GLenum, GLint, GLuint) = ::glStencilFuncSeparate; +void (* const glStencilMask)(GLuint) = ::glStencilMask; +void (* const glStencilMaskSeparate)(GLenum, GLuint) = ::glStencilMaskSeparate; +void (* const glStencilOp)(GLenum, GLenum, GLenum) = ::glStencilOp; +void (* const glStencilOpSeparate)(GLenum, GLenum, GLenum, GLenum) = ::glStencilOpSeparate; +void (* const glTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) = ::glTexImage2D; +void (* const glTexParameterf)(GLenum, GLenum, GLfloat) = ::glTexParameterf; +void (* const glTexParameterfv)(GLenum, GLenum, const GLfloat *) = ::glTexParameterfv; +void (* const glTexParameteri)(GLenum, GLenum, GLint) = ::glTexParameteri; +void (* const glTexParameteriv)(GLenum, GLenum, const GLint *) = ::glTexParameteriv; +void (* const glTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void *) = ::glTexSubImage2D; +void (* const glUniform1f)(GLint, GLfloat) = ::glUniform1f; +void (* const glUniform1fv)(GLint, GLsizei, const GLfloat *) = ::glUniform1fv; +void (* const glUniform1i)(GLint, GLint) = ::glUniform1i; +void (* const glUniform1iv)(GLint, GLsizei, const GLint *) = ::glUniform1iv; +void (* const glUniform2f)(GLint, GLfloat, GLfloat) = ::glUniform2f; +void (* const glUniform2fv)(GLint, GLsizei, const GLfloat *) = ::glUniform2fv; +void (* const glUniform2i)(GLint, GLint, GLint) = ::glUniform2i; +void (* const glUniform2iv)(GLint, GLsizei, const GLint *) = ::glUniform2iv; +void (* const glUniform3f)(GLint, GLfloat, GLfloat, GLfloat) = ::glUniform3f; +void (* const glUniform3fv)(GLint, GLsizei, const GLfloat *) = ::glUniform3fv; +void (* const glUniform3i)(GLint, GLint, GLint, GLint) = ::glUniform3i; +void (* const glUniform3iv)(GLint, GLsizei, const GLint *) = ::glUniform3iv; +void (* const glUniform4f)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) = ::glUniform4f; +void (* const glUniform4fv)(GLint, GLsizei, const GLfloat *) = ::glUniform4fv; +void (* const glUniform4i)(GLint, GLint, GLint, GLint, GLint) = ::glUniform4i; +void (* const glUniform4iv)(GLint, GLsizei, const GLint *) = ::glUniform4iv; +void (* const glUniformMatrix2fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix2fv; +void (* const glUniformMatrix3fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix3fv; +void (* const glUniformMatrix4fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix4fv; +void (* const glUseProgram)(GLuint) = ::glUseProgram; +void (* const glValidateProgram)(GLuint) = ::glValidateProgram; +void (* const glVertexAttrib1f)(GLuint, GLfloat) = ::glVertexAttrib1f; +void (* const glVertexAttrib1fv)(GLuint, const GLfloat *) = ::glVertexAttrib1fv; +void (* const glVertexAttrib2f)(GLuint, GLfloat, GLfloat) = ::glVertexAttrib2f; +void (* const glVertexAttrib2fv)(GLuint, const GLfloat *) = ::glVertexAttrib2fv; +void (* const glVertexAttrib3f)(GLuint, GLfloat, GLfloat, GLfloat) = ::glVertexAttrib3f; +void (* const glVertexAttrib3fv)(GLuint, const GLfloat *) = ::glVertexAttrib3fv; +void (* const glVertexAttrib4f)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) = ::glVertexAttrib4f; +void (* const glVertexAttrib4fv)(GLuint, const GLfloat *) = ::glVertexAttrib4fv; +void (* const glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) = ::glVertexAttribPointer; +void (* const glViewport)(GLint, GLint, GLsizei, GLsizei) = ::glViewport; + +#ifndef MBGL_USE_GLES2 +void (* const glDrawPixels)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) = ::glDrawPixels; +void (* const glGetDoublev)(GLenum, GLdouble *) = ::glGetDoublev; +void (* const glPixelTransferf)(GLenum, GLfloat) = ::glPixelTransferf; +void (* const glPixelZoom)(GLfloat, GLfloat) = ::glPixelZoom; +void (* const glPointSize)(GLfloat) = ::glPointSize; +void (* const glRasterPos4d)(GLdouble, GLdouble, GLdouble, GLdouble) = ::glRasterPos4d; +#endif + +} // namespace platform +} // namespace mbgl diff --git a/platform/linux/src/gl_functions.cpp b/platform/linux/src/gl_functions.cpp new file mode 100644 index 0000000000..a5c7527935 --- /dev/null +++ b/platform/linux/src/gl_functions.cpp @@ -0,0 +1,166 @@ +#include <mbgl/platform/gl_functions.hpp> + +#define GL_GLEXT_PROTOTYPES + +#ifndef MBGL_USE_GLES2 +#include <GL/gl.h> +#include <GL/glext.h> +#else +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> +#endif + +namespace mbgl { +namespace platform { + +void (* const glActiveTexture)(GLenum) = ::glActiveTexture; +void (* const glAttachShader)(GLuint, GLuint) = ::glAttachShader; +void (* const glBindAttribLocation)(GLuint, GLuint, const GLchar *) = ::glBindAttribLocation; +void (* const glBindBuffer)(GLenum, GLuint) = ::glBindBuffer; +void (* const glBindFramebuffer)(GLenum, GLuint) = ::glBindFramebuffer; +void (* const glBindRenderbuffer)(GLenum, GLuint) = ::glBindRenderbuffer; +void (* const glBindTexture)(GLenum, GLuint) = ::glBindTexture; +void (* const glBlendColor)(GLfloat, GLfloat, GLfloat, GLfloat) = ::glBlendColor; +void (* const glBlendEquation)(GLenum) = ::glBlendEquation; +void (* const glBlendEquationSeparate)(GLenum, GLenum) = ::glBlendEquationSeparate; +void (* const glBlendFunc)(GLenum, GLenum) = ::glBlendFunc; +void (* const glBlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum) = ::glBlendFuncSeparate; +void (* const glBufferData)(GLenum, GLsizeiptr, const void *, GLenum) = ::glBufferData; +void (* const glBufferSubData)(GLenum, GLintptr, GLsizeiptr, const void *) = ::glBufferSubData; +GLenum (* const glCheckFramebufferStatus)(GLenum) = ::glCheckFramebufferStatus; +void (* const glClear)(GLbitfield) = ::glClear; +void (* const glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat) = ::glClearColor; +void (* const glClearDepthf)(GLfloat) = ::glClearDepthf; +void (* const glClearStencil)(GLint) = ::glClearStencil; +void (* const glColorMask)(GLboolean, GLboolean, GLboolean, GLboolean) = ::glColorMask; +void (* const glCompileShader)(GLuint) = ::glCompileShader; +void (* const glCompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void *) = ::glCompressedTexImage2D; +void (* const glCompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void *) = ::glCompressedTexSubImage2D; +void (* const glCopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint) = ::glCopyTexImage2D; +void (* const glCopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) = ::glCopyTexSubImage2D; +GLuint (* const glCreateProgram)() = ::glCreateProgram; +GLuint (* const glCreateShader)(GLenum) = ::glCreateShader; +void (* const glCullFace)(GLenum) = ::glCullFace; +void (* const glDeleteBuffers)(GLsizei, const GLuint *) = ::glDeleteBuffers; +void (* const glDeleteFramebuffers)(GLsizei, const GLuint *) = ::glDeleteFramebuffers; +void (* const glDeleteProgram)(GLuint) = ::glDeleteProgram; +void (* const glDeleteRenderbuffers)(GLsizei, const GLuint *) = ::glDeleteRenderbuffers; +void (* const glDeleteShader)(GLuint) = ::glDeleteShader; +void (* const glDeleteTextures)(GLsizei, const GLuint *) = ::glDeleteTextures; +void (* const glDepthFunc)(GLenum) = ::glDepthFunc; +void (* const glDepthMask)(GLboolean) = ::glDepthMask; +void (* const glDepthRangef)(GLfloat, GLfloat) = ::glDepthRangef; +void (* const glDetachShader)(GLuint, GLuint) = ::glDetachShader; +void (* const glDisable)(GLenum) = ::glDisable; +void (* const glDisableVertexAttribArray)(GLuint) = ::glDisableVertexAttribArray; +void (* const glDrawArrays)(GLenum, GLint, GLsizei) = ::glDrawArrays; +void (* const glDrawElements)(GLenum, GLsizei, GLenum, const void *) = ::glDrawElements; +void (* const glEnable)(GLenum) = ::glEnable; +void (* const glEnableVertexAttribArray)(GLuint) = ::glEnableVertexAttribArray; +void (* const glFinish)() = ::glFinish; +void (* const glFlush)() = ::glFlush; +void (* const glFramebufferRenderbuffer)(GLenum, GLenum, GLenum, GLuint) = ::glFramebufferRenderbuffer; +void (* const glFramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint) = ::glFramebufferTexture2D; +void (* const glFrontFace)(GLenum) = ::glFrontFace; +void (* const glGenBuffers)(GLsizei, GLuint *) = ::glGenBuffers; +void (* const glGenerateMipmap)(GLenum) = ::glGenerateMipmap; +void (* const glGenFramebuffers)(GLsizei, GLuint *) = ::glGenFramebuffers; +void (* const glGenRenderbuffers)(GLsizei, GLuint *) = ::glGenRenderbuffers; +void (* const glGenTextures)(GLsizei, GLuint *) = ::glGenTextures; +void (* const glGetActiveAttrib)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = ::glGetActiveAttrib; +void (* const glGetActiveUniform)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = ::glGetActiveUniform; +void (* const glGetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *) = ::glGetAttachedShaders; +GLint (* const glGetAttribLocation)(GLuint, const GLchar *) = ::glGetAttribLocation; +void (* const glGetBooleanv)(GLenum, GLboolean *) = ::glGetBooleanv; +void (* const glGetBufferParameteriv)(GLenum, GLenum, GLint *) = ::glGetBufferParameteriv; +GLenum (* const glGetError)() = ::glGetError; +void (* const glGetFloatv)(GLenum, GLfloat *) = ::glGetFloatv; +void (* const glGetFramebufferAttachmentParameteriv)(GLenum, GLenum, GLenum, GLint *) = ::glGetFramebufferAttachmentParameteriv; +void (* const glGetIntegerv)(GLenum, GLint *) = ::glGetIntegerv; +void (* const glGetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetProgramInfoLog; +void (* const glGetProgramiv)(GLuint, GLenum, GLint *) = ::glGetProgramiv; +void (* const glGetRenderbufferParameteriv)(GLenum, GLenum, GLint *) = ::glGetRenderbufferParameteriv; +void (* const glGetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetShaderInfoLog; +void (* const glGetShaderiv)(GLuint, GLenum, GLint *) = ::glGetShaderiv; +void (* const glGetShaderSource)(GLuint, GLsizei, GLsizei *, GLchar *) = ::glGetShaderSource; +const GLubyte *(*glGetString)(GLenum) = ::glGetString; +void (* const glGetTexParameterfv)(GLenum, GLenum, GLfloat *) = ::glGetTexParameterfv; +void (* const glGetTexParameteriv)(GLenum, GLenum, GLint *) = ::glGetTexParameteriv; +void (* const glGetUniformfv)(GLuint, GLint, GLfloat *) = ::glGetUniformfv; +void (* const glGetUniformiv)(GLuint, GLint, GLint *) = ::glGetUniformiv; +GLint (* const glGetUniformLocation)(GLuint, const GLchar *) = ::glGetUniformLocation; +void (* const glGetVertexAttribfv)(GLuint, GLenum, GLfloat *) = ::glGetVertexAttribfv; +void (* const glGetVertexAttribiv)(GLuint, GLenum, GLint *) = ::glGetVertexAttribiv; +void (* const glGetVertexAttribPointerv)(GLuint, GLenum, void **) = ::glGetVertexAttribPointerv; +void (* const glHint)(GLenum, GLenum) = ::glHint; +GLboolean (* const glIsBuffer)(GLuint) = ::glIsBuffer; +GLboolean (* const glIsEnabled)(GLenum) = ::glIsEnabled; +GLboolean (* const glIsFramebuffer)(GLuint) = ::glIsFramebuffer; +GLboolean (* const glIsProgram)(GLuint) = ::glIsProgram; +GLboolean (* const glIsRenderbuffer)(GLuint) = ::glIsRenderbuffer; +GLboolean (* const glIsShader)(GLuint) = ::glIsShader; +GLboolean (* const glIsTexture)(GLuint) = ::glIsTexture; +void (* const glLineWidth)(GLfloat) = ::glLineWidth; +void (* const glLinkProgram)(GLuint) = ::glLinkProgram; +void (* const glPixelStorei)(GLenum, GLint) = ::glPixelStorei; +void (* const glPolygonOffset)(GLfloat, GLfloat) = ::glPolygonOffset; +void (* const glReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void *) = ::glReadPixels; +void (* const glRenderbufferStorage)(GLenum, GLenum, GLsizei, GLsizei) = ::glRenderbufferStorage; +void (* const glSampleCoverage)(GLfloat, GLboolean) = ::glSampleCoverage; +void (* const glScissor)(GLint, GLint, GLsizei, GLsizei) = ::glScissor; +void (* const glShaderSource)(GLuint, GLsizei, const GLchar * const*, const GLint *) = ::glShaderSource; +void (* const glStencilFunc)(GLenum, GLint, GLuint) = ::glStencilFunc; +void (* const glStencilFuncSeparate)(GLenum, GLenum, GLint, GLuint) = ::glStencilFuncSeparate; +void (* const glStencilMask)(GLuint) = ::glStencilMask; +void (* const glStencilMaskSeparate)(GLenum, GLuint) = ::glStencilMaskSeparate; +void (* const glStencilOp)(GLenum, GLenum, GLenum) = ::glStencilOp; +void (* const glStencilOpSeparate)(GLenum, GLenum, GLenum, GLenum) = ::glStencilOpSeparate; +void (* const glTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) = ::glTexImage2D; +void (* const glTexParameterf)(GLenum, GLenum, GLfloat) = ::glTexParameterf; +void (* const glTexParameterfv)(GLenum, GLenum, const GLfloat *) = ::glTexParameterfv; +void (* const glTexParameteri)(GLenum, GLenum, GLint) = ::glTexParameteri; +void (* const glTexParameteriv)(GLenum, GLenum, const GLint *) = ::glTexParameteriv; +void (* const glTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void *) = ::glTexSubImage2D; +void (* const glUniform1f)(GLint, GLfloat) = ::glUniform1f; +void (* const glUniform1fv)(GLint, GLsizei, const GLfloat *) = ::glUniform1fv; +void (* const glUniform1i)(GLint, GLint) = ::glUniform1i; +void (* const glUniform1iv)(GLint, GLsizei, const GLint *) = ::glUniform1iv; +void (* const glUniform2f)(GLint, GLfloat, GLfloat) = ::glUniform2f; +void (* const glUniform2fv)(GLint, GLsizei, const GLfloat *) = ::glUniform2fv; +void (* const glUniform2i)(GLint, GLint, GLint) = ::glUniform2i; +void (* const glUniform2iv)(GLint, GLsizei, const GLint *) = ::glUniform2iv; +void (* const glUniform3f)(GLint, GLfloat, GLfloat, GLfloat) = ::glUniform3f; +void (* const glUniform3fv)(GLint, GLsizei, const GLfloat *) = ::glUniform3fv; +void (* const glUniform3i)(GLint, GLint, GLint, GLint) = ::glUniform3i; +void (* const glUniform3iv)(GLint, GLsizei, const GLint *) = ::glUniform3iv; +void (* const glUniform4f)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) = ::glUniform4f; +void (* const glUniform4fv)(GLint, GLsizei, const GLfloat *) = ::glUniform4fv; +void (* const glUniform4i)(GLint, GLint, GLint, GLint, GLint) = ::glUniform4i; +void (* const glUniform4iv)(GLint, GLsizei, const GLint *) = ::glUniform4iv; +void (* const glUniformMatrix2fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix2fv; +void (* const glUniformMatrix3fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix3fv; +void (* const glUniformMatrix4fv)(GLint, GLsizei, GLboolean, const GLfloat *) = ::glUniformMatrix4fv; +void (* const glUseProgram)(GLuint) = ::glUseProgram; +void (* const glValidateProgram)(GLuint) = ::glValidateProgram; +void (* const glVertexAttrib1f)(GLuint, GLfloat) = ::glVertexAttrib1f; +void (* const glVertexAttrib1fv)(GLuint, const GLfloat *) = ::glVertexAttrib1fv; +void (* const glVertexAttrib2f)(GLuint, GLfloat, GLfloat) = ::glVertexAttrib2f; +void (* const glVertexAttrib2fv)(GLuint, const GLfloat *) = ::glVertexAttrib2fv; +void (* const glVertexAttrib3f)(GLuint, GLfloat, GLfloat, GLfloat) = ::glVertexAttrib3f; +void (* const glVertexAttrib3fv)(GLuint, const GLfloat *) = ::glVertexAttrib3fv; +void (* const glVertexAttrib4f)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) = ::glVertexAttrib4f; +void (* const glVertexAttrib4fv)(GLuint, const GLfloat *) = ::glVertexAttrib4fv; +void (* const glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) = ::glVertexAttribPointer; +void (* const glViewport)(GLint, GLint, GLsizei, GLsizei) = ::glViewport; + +#ifndef MBGL_USE_GLES2 +void (* const glDrawPixels)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) = ::glDrawPixels; +void (* const glGetDoublev)(GLenum, GLdouble *) = ::glGetDoublev; +void (* const glPixelTransferf)(GLenum, GLfloat) = ::glPixelTransferf; +void (* const glPixelZoom)(GLfloat, GLfloat) = ::glPixelZoom; +void (* const glPointSize)(GLfloat) = ::glPointSize; +void (* const glRasterPos4d)(GLdouble, GLdouble, GLdouble, GLdouble) = ::glRasterPos4d; +#endif + +} // namespace platform +} // namespace mbgl diff --git a/platform/qt/src/gl_functions.cpp b/platform/qt/src/gl_functions.cpp new file mode 100644 index 0000000000..b9f1ac26de --- /dev/null +++ b/platform/qt/src/gl_functions.cpp @@ -0,0 +1,566 @@ +#include <mbgl/platform/gl_functions.hpp> + +#include <QOpenGLContext> +#include <QOpenGLFunctions> + +namespace mbgl { +namespace platform { + +void (* const glActiveTexture)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glActiveTexture(args...); +}; + +void (* const glAttachShader)(GLuint, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glAttachShader(args...); +}; + +void (* const glBindAttribLocation)(GLuint, GLuint, const GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBindAttribLocation(args...); +}; + +void (* const glBindBuffer)(GLenum, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBindBuffer(args...); +}; + +void (* const glBindFramebuffer)(GLenum, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBindFramebuffer(args...); +}; + +void (* const glBindRenderbuffer)(GLenum, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBindRenderbuffer(args...); +}; + +void (* const glBindTexture)(GLenum, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBindTexture(args...); +}; + +void (* const glBlendColor)(GLfloat, GLfloat, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBlendColor(args...); +}; + +void (* const glBlendEquation)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBlendEquation(args...); +}; + +void (* const glBlendEquationSeparate)(GLenum, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBlendEquationSeparate(args...); +}; + +void (* const glBlendFunc)(GLenum, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBlendFunc(args...); +}; + +void (* const glBlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBlendFuncSeparate(args...); +}; + +void (* const glBufferData)(GLenum, GLsizeiptr, const void *, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBufferData(args...); +}; + +void (* const glBufferSubData)(GLenum, GLintptr, GLsizeiptr, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glBufferSubData(args...); +}; + +GLenum (* const glCheckFramebufferStatus)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCheckFramebufferStatus(args...); +}; + +void (* const glClear)(GLbitfield) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glClear(args...); +}; + +void (* const glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glClearColor(args...); +}; + +void (* const glClearDepthf)(GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glClearDepthf(args...); +}; + +void (* const glClearStencil)(GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glClearStencil(args...); +}; + +void (* const glColorMask)(GLboolean, GLboolean, GLboolean, GLboolean) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glColorMask(args...); +}; + +void (* const glCompileShader)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCompileShader(args...); +}; + +void (* const glCompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCompressedTexImage2D(args...); +}; + +void (* const glCompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCompressedTexSubImage2D(args...); +}; + +void (* const glCopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCopyTexImage2D(args...); +}; + +void (* const glCopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCopyTexSubImage2D(args...); +}; + +GLuint (* const glCreateProgram)() = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCreateProgram(args...); +}; + +GLuint (* const glCreateShader)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCreateShader(args...); +}; + +void (* const glCullFace)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glCullFace(args...); +}; + +void (* const glDeleteBuffers)(GLsizei, const GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDeleteBuffers(args...); +}; + +void (* const glDeleteFramebuffers)(GLsizei, const GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDeleteFramebuffers(args...); +}; + +void (* const glDeleteProgram)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDeleteProgram(args...); +}; + +void (* const glDeleteRenderbuffers)(GLsizei, const GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDeleteRenderbuffers(args...); +}; + +void (* const glDeleteShader)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDeleteShader(args...); +}; + +void (* const glDeleteTextures)(GLsizei, const GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDeleteTextures(args...); +}; + +void (* const glDepthFunc)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDepthFunc(args...); +}; + +void (* const glDepthMask)(GLboolean) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDepthMask(args...); +}; + +void (* const glDepthRangef)(GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDepthRangef(args...); +}; + +void (* const glDetachShader)(GLuint, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDetachShader(args...); +}; + +void (* const glDisable)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDisable(args...); +}; + +void (* const glDisableVertexAttribArray)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDisableVertexAttribArray(args...); +}; + +void (* const glDrawArrays)(GLenum, GLint, GLsizei) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDrawArrays(args...); +}; + +void (* const glDrawElements)(GLenum, GLsizei, GLenum, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glDrawElements(args...); +}; + +void (* const glEnable)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glEnable(args...); +}; + +void (* const glEnableVertexAttribArray)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glEnableVertexAttribArray(args...); +}; + +void (* const glFinish)() = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glFinish(args...); +}; + +void (* const glFlush)() = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glFlush(args...); +}; + +void (* const glFramebufferRenderbuffer)(GLenum, GLenum, GLenum, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glFramebufferRenderbuffer(args...); +}; + +void (* const glFramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glFramebufferTexture2D(args...); +}; + +void (* const glFrontFace)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glFrontFace(args...); +}; + +void (* const glGenBuffers)(GLsizei, GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGenBuffers(args...); +}; + +void (* const glGenerateMipmap)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGenerateMipmap(args...); +}; + +void (* const glGenFramebuffers)(GLsizei, GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGenFramebuffers(args...); +}; + +void (* const glGenRenderbuffers)(GLsizei, GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGenRenderbuffers(args...); +}; + +void (* const glGenTextures)(GLsizei, GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGenTextures(args...); +}; + +void (* const glGetActiveAttrib)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetActiveAttrib(args...); +}; + +void (* const glGetActiveUniform)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetActiveUniform(args...); +}; + +void (* const glGetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetAttachedShaders(args...); +}; + +GLint (* const glGetAttribLocation)(GLuint, const GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetAttribLocation(args...); +}; + +void (* const glGetBooleanv)(GLenum, GLboolean *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetBooleanv(args...); +}; + +void (* const glGetBufferParameteriv)(GLenum, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetBufferParameteriv(args...); +}; + +GLenum (* const glGetError)() = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetError(args...); +}; + +void (* const glGetFloatv)(GLenum, GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetFloatv(args...); +}; + +void (* const glGetFramebufferAttachmentParameteriv)(GLenum, GLenum, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetFramebufferAttachmentParameteriv(args...); +}; + +void (* const glGetIntegerv)(GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetIntegerv(args...); +}; + +void (* const glGetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetProgramInfoLog(args...); +}; + +void (* const glGetProgramiv)(GLuint, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetProgramiv(args...); +}; + +void (* const glGetRenderbufferParameteriv)(GLenum, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetRenderbufferParameteriv(args...); +}; + +void (* const glGetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetShaderInfoLog(args...); +}; + +void (* const glGetShaderiv)(GLuint, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetShaderiv(args...); +}; + +void (* const glGetShaderSource)(GLuint, GLsizei, GLsizei *, GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetShaderSource(args...); +}; + +const GLubyte *(*glGetString)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetString(args...); +}; + +void (* const glGetTexParameterfv)(GLenum, GLenum, GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetTexParameterfv(args...); +}; + +void (* const glGetTexParameteriv)(GLenum, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetTexParameteriv(args...); +}; + +void (* const glGetUniformfv)(GLuint, GLint, GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetUniformfv(args...); +}; + +void (* const glGetUniformiv)(GLuint, GLint, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetUniformiv(args...); +}; + +GLint (* const glGetUniformLocation)(GLuint, const GLchar *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetUniformLocation(args...); +}; + +void (* const glGetVertexAttribfv)(GLuint, GLenum, GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetVertexAttribfv(args...); +}; + +void (* const glGetVertexAttribiv)(GLuint, GLenum, GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetVertexAttribiv(args...); +}; + +void (* const glGetVertexAttribPointerv)(GLuint, GLenum, void **) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glGetVertexAttribPointerv(args...); +}; + +void (* const glHint)(GLenum, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glHint(args...); +}; + +GLboolean (* const glIsBuffer)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsBuffer(args...); +}; + +GLboolean (* const glIsEnabled)(GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsEnabled(args...); +}; + +GLboolean (* const glIsFramebuffer)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsFramebuffer(args...); +}; + +GLboolean (* const glIsProgram)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsProgram(args...); +}; + +GLboolean (* const glIsRenderbuffer)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsRenderbuffer(args...); +}; + +GLboolean (* const glIsShader)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsShader(args...); +}; + +GLboolean (* const glIsTexture)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glIsTexture(args...); +}; + +void (* const glLineWidth)(GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glLineWidth(args...); +}; + +void (* const glLinkProgram)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glLinkProgram(args...); +}; + +void (* const glPixelStorei)(GLenum, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glPixelStorei(args...); +}; + +void (* const glPolygonOffset)(GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glPolygonOffset(args...); +}; + +void (* const glReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glReadPixels(args...); +}; + +void (* const glRenderbufferStorage)(GLenum, GLenum, GLsizei, GLsizei) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glRenderbufferStorage(args...); +}; + +void (* const glSampleCoverage)(GLfloat, GLboolean) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glSampleCoverage(args...); +}; + +void (* const glScissor)(GLint, GLint, GLsizei, GLsizei) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glScissor(args...); +}; + +void (* const glShaderSource)(GLuint, GLsizei, const GLchar * const*, const GLint *) = [](GLuint shader, GLsizei count, const GLchar * const * string, const GLint *length) { + return QOpenGLContext::currentContext()->functions()->glShaderSource(shader, count, const_cast<const GLchar **>(string), length); +}; + +void (* const glStencilFunc)(GLenum, GLint, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glStencilFunc(args...); +}; + +void (* const glStencilFuncSeparate)(GLenum, GLenum, GLint, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glStencilFuncSeparate(args...); +}; + +void (* const glStencilMask)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glStencilMask(args...); +}; + +void (* const glStencilMaskSeparate)(GLenum, GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glStencilMaskSeparate(args...); +}; + +void (* const glStencilOp)(GLenum, GLenum, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glStencilOp(args...); +}; + +void (* const glStencilOpSeparate)(GLenum, GLenum, GLenum, GLenum) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glStencilOpSeparate(args...); +}; + +void (* const glTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glTexImage2D(args...); +}; + +void (* const glTexParameterf)(GLenum, GLenum, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glTexParameterf(args...); +}; + +void (* const glTexParameterfv)(GLenum, GLenum, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glTexParameterfv(args...); +}; + +void (* const glTexParameteri)(GLenum, GLenum, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glTexParameteri(args...); +}; + +void (* const glTexParameteriv)(GLenum, GLenum, const GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glTexParameteriv(args...); +}; + +void (* const glTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glTexSubImage2D(args...); +}; + +void (* const glUniform1f)(GLint, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform1f(args...); +}; + +void (* const glUniform1fv)(GLint, GLsizei, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform1fv(args...); +}; + +void (* const glUniform1i)(GLint, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform1i(args...); +}; + +void (* const glUniform1iv)(GLint, GLsizei, const GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform1iv(args...); +}; + +void (* const glUniform2f)(GLint, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform2f(args...); +}; + +void (* const glUniform2fv)(GLint, GLsizei, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform2fv(args...); +}; + +void (* const glUniform2i)(GLint, GLint, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform2i(args...); +}; + +void (* const glUniform2iv)(GLint, GLsizei, const GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform2iv(args...); +}; + +void (* const glUniform3f)(GLint, GLfloat, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform3f(args...); +}; + +void (* const glUniform3fv)(GLint, GLsizei, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform3fv(args...); +}; + +void (* const glUniform3i)(GLint, GLint, GLint, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform3i(args...); +}; + +void (* const glUniform3iv)(GLint, GLsizei, const GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform3iv(args...); +}; + +void (* const glUniform4f)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform4f(args...); +}; + +void (* const glUniform4fv)(GLint, GLsizei, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform4fv(args...); +}; + +void (* const glUniform4i)(GLint, GLint, GLint, GLint, GLint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform4i(args...); +}; + +void (* const glUniform4iv)(GLint, GLsizei, const GLint *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniform4iv(args...); +}; + +void (* const glUniformMatrix2fv)(GLint, GLsizei, GLboolean, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniformMatrix2fv(args...); +}; + +void (* const glUniformMatrix3fv)(GLint, GLsizei, GLboolean, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniformMatrix3fv(args...); +}; + +void (* const glUniformMatrix4fv)(GLint, GLsizei, GLboolean, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUniformMatrix4fv(args...); +}; + +void (* const glUseProgram)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glUseProgram(args...); +}; + +void (* const glValidateProgram)(GLuint) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glValidateProgram(args...); +}; + +void (* const glVertexAttrib1f)(GLuint, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib1f(args...); +}; + +void (* const glVertexAttrib1fv)(GLuint, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib1fv(args...); +}; + +void (* const glVertexAttrib2f)(GLuint, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib2f(args...); +}; + +void (* const glVertexAttrib2fv)(GLuint, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib2fv(args...); +}; + +void (* const glVertexAttrib3f)(GLuint, GLfloat, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib3f(args...); +}; + +void (* const glVertexAttrib3fv)(GLuint, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib3fv(args...); +}; + +void (* const glVertexAttrib4f)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib4f(args...); +}; + +void (* const glVertexAttrib4fv)(GLuint, const GLfloat *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttrib4fv(args...); +}; + +void (* const glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glVertexAttribPointer(args...); +}; + +void (* const glViewport)(GLint, GLint, GLsizei, GLsizei) = [](auto... args) { + return QOpenGLContext::currentContext()->functions()->glViewport(args...); +}; + +} // namespace platform +} // namespace mbgl
\ No newline at end of file |