OSDN Git Service

Use a trampoline for all GL entry functions.
authorNicolas Capens <capn@google.com>
Thu, 2 Aug 2018 17:56:32 +0000 (13:56 -0400)
committerNicolas Capens <nicolascapens@google.com>
Wed, 24 Oct 2018 13:39:20 +0000 (13:39 +0000)
Bug swiftshader:64

Change-Id: Ice0e96934bae8628a14d628fd02046fc81f7a0ab
Reviewed-on: https://swiftshader-review.googlesource.com/c/19608
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
src/OpenGL/libGLES_CM/libGLES_CM.def
src/OpenGL/libGLES_CM/libGLES_CM.lds
src/OpenGL/libGLES_CM/main.cpp
src/OpenGL/libGLESv2/entry_points.cpp
src/OpenGL/libGLESv2/entry_points.h [new file with mode: 0644]
src/OpenGL/libGLESv2/libGLESv2.cpp
src/OpenGL/libGLESv2/libGLESv2.def
src/OpenGL/libGLESv2/libGLESv2.lds
src/OpenGL/libGLESv2/libGLESv2.vcxproj
src/OpenGL/libGLESv2/libGLESv2.vcxproj.filters
src/OpenGL/libGLESv2/libGLESv3.cpp

index cf15c8b..9c9d032 100644 (file)
@@ -210,5 +210,3 @@ EXPORTS
     eglGetSyncAttribKHR
 
        libGLES_CM_swiftshader
-
-       Register
index dcf548f..a169b99 100644 (file)
@@ -212,8 +212,6 @@ global:
 
     libGLES_CM_swiftshader;
 
-    Register;
-
 local:
     *;
 };
index f2bd0b7..8ba8247 100644 (file)
@@ -1411,11 +1411,6 @@ GL_API void GL_APIENTRY glDrawTexfvOES(const GLfloat *coords)
 {
        return es1::DrawTexfvOES(coords);
 }
-
-void GL_APIENTRY Register(const char *licenseKey)
-{
-       // Nothing to do, SwiftShader is open-source
-}
 }
 
 LibGLES_CMexports::LibGLES_CMexports()
index 5460bcd..7a6479d 100644 (file)
 // entry_points.cpp: GL entry points exports and definition
 
 #include "main.h"
-
+#include "entry_points.h"
 #include "libEGL/main.h"
 
-namespace es2
-{
-void ActiveTexture(GLenum texture);
-void AttachShader(GLuint program, GLuint shader);
-void BeginQueryEXT(GLenum target, GLuint name);
-void BindAttribLocation(GLuint program, GLuint index, const GLchar* name);
-void BindBuffer(GLenum target, GLuint buffer);
-void BindFramebuffer(GLenum target, GLuint framebuffer);
-void BindRenderbuffer(GLenum target, GLuint renderbuffer);
-void BindTexture(GLenum target, GLuint texture);
-void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-void BlendEquation(GLenum mode);
-void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
-void BlendFunc(GLenum sfactor, GLenum dfactor);
-void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GLenum CheckFramebufferStatus(GLenum target);
-void Clear(GLbitfield mask);
-void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-void ClearDepthf(GLclampf depth);
-void ClearStencil(GLint s);
-void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-void CompileShader(GLuint shader);
-void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
-                          GLint border, GLsizei imageSize, const GLvoid* data);
-void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
-                             GLenum format, GLsizei imageSize, const GLvoid* data);
-void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLuint CreateProgram(void);
-GLuint CreateShader(GLenum type);
-void CullFace(GLenum mode);
-void DeleteBuffers(GLsizei n, const GLuint* buffers);
-void DeleteFencesNV(GLsizei n, const GLuint* fences);
-void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
-void DeleteProgram(GLuint program);
-void DeleteQueriesEXT(GLsizei n, const GLuint *ids);
-void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
-void DeleteShader(GLuint shader);
-void DeleteTextures(GLsizei n, const GLuint* textures);
-void DepthFunc(GLenum func);
-void DepthMask(GLboolean flag);
-void DepthRangef(GLclampf zNear, GLclampf zFar);
-void DetachShader(GLuint program, GLuint shader);
-void Disable(GLenum cap);
-void DisableVertexAttribArray(GLuint index);
-void DrawArrays(GLenum mode, GLint first, GLsizei count);
-void DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-void DrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
-void DrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
-void VertexAttribDivisorEXT(GLuint index, GLuint divisor);
-void DrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
-void DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
-void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
-void Enable(GLenum cap);
-void EnableVertexAttribArray(GLuint index);
-void EndQueryEXT(GLenum target);
-void FinishFenceNV(GLuint fence);
-void Finish(void);
-void Flush(void);
-void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-void FrontFace(GLenum mode);
-void GenBuffers(GLsizei n, GLuint* buffers);
-void GenerateMipmap(GLenum target);
-void GenFencesNV(GLsizei n, GLuint* fences);
-void GenFramebuffers(GLsizei n, GLuint* framebuffers);
-void GenQueriesEXT(GLsizei n, GLuint* ids);
-void GenRenderbuffers(GLsizei n, GLuint* renderbuffers);
-void GenTextures(GLsizei n, GLuint* textures);
-void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-int GetAttribLocation(GLuint program, const GLchar* name);
-void GetBooleanv(GLenum pname, GLboolean* params);
-void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
-GLenum GetError(void);
-void GetFenceivNV(GLuint fence, GLenum pname, GLint *params);
-void GetFloatv(GLenum pname, GLfloat* params);
-void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GLenum GetGraphicsResetStatusEXT(void);
-void GetIntegerv(GLenum pname, GLint* params);
-void GetProgramiv(GLuint program, GLenum pname, GLint* params);
-void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-void GetQueryivEXT(GLenum target, GLenum pname, GLint *params);
-void GetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params);
-void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
-void GetShaderiv(GLuint shader, GLenum pname, GLint* params);
-void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-const GLubyte* GetString(GLenum name);
-void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
-void GetTexParameteriv(GLenum target, GLenum pname, GLint* params);
-void GetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
-void GetUniformfv(GLuint program, GLint location, GLfloat* params);
-void GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params);
-void GetUniformiv(GLuint program, GLint location, GLint* params);
-int GetUniformLocation(GLuint program, const GLchar* name);
-void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
-void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
-void GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
-void Hint(GLenum target, GLenum mode);
-GLboolean IsBuffer(GLuint buffer);
-GLboolean IsEnabled(GLenum cap);
-GLboolean IsFenceNV(GLuint fence);
-GLboolean IsFramebuffer(GLuint framebuffer);
-GLboolean IsProgram(GLuint program);
-GLboolean IsQueryEXT(GLuint name);
-GLboolean IsRenderbuffer(GLuint renderbuffer);
-GLboolean IsShader(GLuint shader);
-GLboolean IsTexture(GLuint texture);
-void LineWidth(GLfloat width);
-void LinkProgram(GLuint program);
-void PixelStorei(GLenum pname, GLint param);
-void PolygonOffset(GLfloat factor, GLfloat units);
-void ReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
-                    GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
-void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-void ReleaseShaderCompiler(void);
-void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-void RenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-void SampleCoverage(GLclampf value, GLboolean invert);
-void SetFenceNV(GLuint fence, GLenum condition);
-void Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
-void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-void ShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length);
-void StencilFunc(GLenum func, GLint ref, GLuint mask);
-void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
-void StencilMask(GLuint mask);
-void StencilMaskSeparate(GLenum face, GLuint mask);
-void StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
-void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GLboolean TestFenceNV(GLuint fence);
-void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
-                GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-void TexParameterf(GLenum target, GLenum pname, GLfloat param);
-void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
-void TexParameteri(GLenum target, GLenum pname, GLint param);
-void TexParameteriv(GLenum target, GLenum pname, const GLint* params);
-void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
-                   GLenum format, GLenum type, const GLvoid* pixels);
-void Uniform1f(GLint location, GLfloat x);
-void Uniform1fv(GLint location, GLsizei count, const GLfloat* v);
-void Uniform1i(GLint location, GLint x);
-void Uniform1iv(GLint location, GLsizei count, const GLint* v);
-void Uniform2f(GLint location, GLfloat x, GLfloat y);
-void Uniform2fv(GLint location, GLsizei count, const GLfloat* v);
-void Uniform2i(GLint location, GLint x, GLint y);
-void Uniform2iv(GLint location, GLsizei count, const GLint* v);
-void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
-void Uniform3fv(GLint location, GLsizei count, const GLfloat* v);
-void Uniform3i(GLint location, GLint x, GLint y, GLint z);
-void Uniform3iv(GLint location, GLsizei count, const GLint* v);
-void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void Uniform4fv(GLint location, GLsizei count, const GLfloat* v);
-void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
-void Uniform4iv(GLint location, GLsizei count, const GLint* v);
-void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void UseProgram(GLuint program);
-void ValidateProgram(GLuint program);
-void VertexAttrib1f(GLuint index, GLfloat x);
-void VertexAttrib1fv(GLuint index, const GLfloat* values);
-void VertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
-void VertexAttrib2fv(GLuint index, const GLfloat* values);
-void VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
-void VertexAttrib3fv(GLuint index, const GLfloat* values);
-void VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void VertexAttrib4fv(GLuint index, const GLfloat* values);
-GL_APICALL void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void BlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GL_APICALL void BlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
-                                     GLbitfield mask, GLenum filter);
-GL_APICALL void TexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
-                              GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void TexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void CopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void CompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void CompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void FramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-GL_APICALL void EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
-GL_APICALL void EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
-GL_APICALL GLboolean IsRenderbufferOES(GLuint renderbuffer);
-GL_APICALL void BindRenderbufferOES(GLenum target, GLuint renderbuffer);
-GL_APICALL void DeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void GenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
-GL_APICALL void RenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLboolean IsFramebufferOES(GLuint framebuffer);
-GL_APICALL void BindFramebufferOES(GLenum target, GLuint framebuffer);
-GL_APICALL void DeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
-GL_APICALL void GenFramebuffersOES(GLsizei n, GLuint* framebuffers);
-GL_APICALL GLenum CheckFramebufferStatusOES(GLenum target);
-GL_APICALL void FramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void FramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void GenerateMipmapOES(GLenum target);
-GL_APICALL void DrawBuffersEXT(GLsizei n, const GLenum *bufs);
-}
-
 extern "C"
 {
 GL_APICALL void GL_APIENTRY glActiveTexture(GLenum texture)
 {
-       return es2::ActiveTexture(texture);
+       return gl::ActiveTexture(texture);
 }
 
 GL_APICALL void GL_APIENTRY glAttachShader(GLuint program, GLuint shader)
 {
-       return es2::AttachShader(program, shader);
+       return gl::AttachShader(program, shader);
 }
 
 GL_APICALL void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint name)
 {
-       return es2::BeginQueryEXT(target, name);
+       return gl::BeginQueryEXT(target, name);
 }
 
 GL_APICALL void GL_APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
 {
-       return es2::BindAttribLocation(program, index, name);
+       return gl::BindAttribLocation(program, index, name);
 }
 
 GL_APICALL void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
 {
-       return es2::BindBuffer(target, buffer);
+       return gl::BindBuffer(target, buffer);
 }
 
 GL_APICALL void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
 {
-       return es2::BindFramebuffer(target, framebuffer);
+       return gl::BindFramebuffer(target, framebuffer);
 }
 
 GL_APICALL void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
 {
-       return es2::BindFramebuffer(target, framebuffer);
+       return gl::BindFramebuffer(target, framebuffer);
 }
 
 GL_APICALL void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer)
 {
-       return es2::BindRenderbuffer(target, renderbuffer);
+       return gl::BindRenderbuffer(target, renderbuffer);
 }
 
 GL_APICALL void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
 {
-       return es2::BindRenderbuffer(target, renderbuffer);
+       return gl::BindRenderbuffer(target, renderbuffer);
 }
 
 GL_APICALL void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
 {
-       return es2::BindTexture(target, texture);
+       return gl::BindTexture(target, texture);
 }
 
 GL_APICALL void GL_APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 {
-       return es2::BlendColor(red, green, blue, alpha);
+       return gl::BlendColor(red, green, blue, alpha);
 }
 
 GL_APICALL void GL_APIENTRY glBlendEquation(GLenum mode)
 {
-       return es2::BlendEquation(mode);
+       return gl::BlendEquation(mode);
 }
 
 GL_APICALL void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
 {
-       return es2::BlendEquationSeparate(modeRGB, modeAlpha);
+       return gl::BlendEquationSeparate(modeRGB, modeAlpha);
 }
 
 GL_APICALL void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
 {
-       return es2::BlendFunc(sfactor, dfactor);
+       return gl::BlendFunc(sfactor, dfactor);
 }
 
 GL_APICALL void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
 {
-       return es2::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+       return gl::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
 }
 
 GL_APICALL void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
 {
-       return es2::BufferData(target, size, data, usage);
+       return gl::BufferData(target, size, data, usage);
 }
 
 GL_APICALL void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
 {
-       return es2::BufferSubData(target, offset, size, data);
+       return gl::BufferSubData(target, offset, size, data);
 }
 
 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target)
 {
-       return es2::CheckFramebufferStatus(target);
+       return gl::CheckFramebufferStatus(target);
 }
 
 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target)
 {
-       return es2::CheckFramebufferStatus(target);
+       return gl::CheckFramebufferStatus(target);
 }
 
 GL_APICALL void GL_APIENTRY glClear(GLbitfield mask)
 {
-       return es2::Clear(mask);
+       return gl::Clear(mask);
 }
 
 GL_APICALL void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 {
-       return es2::ClearColor(red, green, blue, alpha);
+       return gl::ClearColor(red, green, blue, alpha);
 }
 
 GL_APICALL void GL_APIENTRY glClearDepthf(GLclampf depth)
 {
-       return es2::ClearDepthf(depth);
+       return gl::ClearDepthf(depth);
 }
 
 GL_APICALL void GL_APIENTRY glClearStencil(GLint s)
 {
-       return es2::ClearStencil(s);
+       return gl::ClearStencil(s);
 }
 
 GL_APICALL void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
 {
-       return es2::ColorMask(red, green, blue, alpha);
+       return gl::ColorMask(red, green, blue, alpha);
 }
 
 GL_APICALL void GL_APIENTRY glCompileShader(GLuint shader)
 {
-       return es2::CompileShader(shader);
+       return gl::CompileShader(shader);
 }
 
 GL_APICALL void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
                                                    GLint border, GLsizei imageSize, const GLvoid* data)
 {
-       return es2::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+       return gl::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
 }
 
 GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
                                                       GLenum format, GLsizei imageSize, const GLvoid* data)
 {
-       return es2::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+       return gl::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
 }
 
 GL_APICALL void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 {
-       return es2::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+       return gl::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
 }
 
 GL_APICALL void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 {
-       return es2::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+       return gl::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
 }
 
 GL_APICALL GLuint GL_APIENTRY glCreateProgram(void)
 {
-       return es2::CreateProgram();
+       return gl::CreateProgram();
 }
 
 GL_APICALL GLuint GL_APIENTRY glCreateShader(GLenum type)
 {
-       return es2::CreateShader(type);
+       return gl::CreateShader(type);
 }
 
 GL_APICALL void GL_APIENTRY glCullFace(GLenum mode)
 {
-       return es2::CullFace(mode);
+       return gl::CullFace(mode);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
 {
-       return es2::DeleteBuffers(n, buffers);
+       return gl::DeleteBuffers(n, buffers);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteFencesNV(GLsizei n, const GLuint* fences)
 {
-       return es2::DeleteFencesNV(n, fences);
+       return gl::DeleteFencesNV(n, fences);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
 {
-       return es2::DeleteFramebuffers(n, framebuffers);
+       return gl::DeleteFramebuffers(n, framebuffers);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers)
 {
-       return es2::DeleteFramebuffers(n, framebuffers);
+       return gl::DeleteFramebuffers(n, framebuffers);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteProgram(GLuint program)
 {
-       return es2::DeleteProgram(program);
+       return gl::DeleteProgram(program);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint *ids)
 {
-       return es2::DeleteQueriesEXT(n, ids);
+       return gl::DeleteQueriesEXT(n, ids);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
 {
-       return es2::DeleteRenderbuffers(n, renderbuffers);
+       return gl::DeleteRenderbuffers(n, renderbuffers);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers)
 {
-       return es2::DeleteRenderbuffers(n, renderbuffers);
+       return gl::DeleteRenderbuffers(n, renderbuffers);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteShader(GLuint shader)
 {
-       return es2::DeleteShader(shader);
+       return gl::DeleteShader(shader);
 }
 
 GL_APICALL void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures)
 {
-       return es2::DeleteTextures(n, textures);
+       return gl::DeleteTextures(n, textures);
 }
 
 GL_APICALL void GL_APIENTRY glDepthFunc(GLenum func)
 {
-       return es2::DepthFunc(func);
+       return gl::DepthFunc(func);
 }
 
 GL_APICALL void GL_APIENTRY glDepthMask(GLboolean flag)
 {
-       return es2::DepthMask(flag);
+       return gl::DepthMask(flag);
 }
 
 GL_APICALL void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
 {
-       return es2::DepthRangef(zNear, zFar);
+       return gl::DepthRangef(zNear, zFar);
 }
 
 GL_APICALL void GL_APIENTRY glDetachShader(GLuint program, GLuint shader)
 {
-       return es2::DetachShader(program, shader);
+       return gl::DetachShader(program, shader);
 }
 
 GL_APICALL void GL_APIENTRY glDisable(GLenum cap)
 {
-       return es2::Disable(cap);
+       return gl::Disable(cap);
 }
 
 GL_APICALL void GL_APIENTRY glDisableVertexAttribArray(GLuint index)
 {
-       return es2::DisableVertexAttribArray(index);
+       return gl::DisableVertexAttribArray(index);
 }
 
 GL_APICALL void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
 {
-       return es2::DrawArrays(mode, first, count);
+       return gl::DrawArrays(mode, first, count);
 }
 
 GL_APICALL void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
 {
-       return es2::DrawElements(mode, count, type, indices);
+       return gl::DrawElements(mode, count, type, indices);
 }
 
 GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
 {
-       return es2::DrawArraysInstancedEXT(mode, first, count, instanceCount);
+       return gl::DrawArraysInstancedEXT(mode, first, count, instanceCount);
 }
 
 GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
 {
-       return es2::DrawElementsInstancedEXT(mode, count, type, indices, instanceCount);
+       return gl::DrawElementsInstancedEXT(mode, count, type, indices, instanceCount);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT(GLuint index, GLuint divisor)
 {
-       return es2::VertexAttribDivisorEXT(index, divisor);
+       return gl::VertexAttribDivisorEXT(index, divisor);
 }
 
 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
 {
-       return es2::DrawArraysInstancedANGLE(mode, first, count, instanceCount);
+       return gl::DrawArraysInstancedANGLE(mode, first, count, instanceCount);
 }
 
 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
 {
-       return es2::DrawElementsInstancedANGLE(mode, count, type, indices, instanceCount);
+       return gl::DrawElementsInstancedANGLE(mode, count, type, indices, instanceCount);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor)
 {
-       return es2::VertexAttribDivisorANGLE(index, divisor);
+       return gl::VertexAttribDivisorANGLE(index, divisor);
 }
 
 GL_APICALL void GL_APIENTRY glEnable(GLenum cap)
 {
-       return es2::Enable(cap);
+       return gl::Enable(cap);
 }
 
 GL_APICALL void GL_APIENTRY glEnableVertexAttribArray(GLuint index)
 {
-       return es2::EnableVertexAttribArray(index);
+       return gl::EnableVertexAttribArray(index);
 }
 
 GL_APICALL void GL_APIENTRY glEndQueryEXT(GLenum target)
 {
-       return es2::EndQueryEXT(target);
+       return gl::EndQueryEXT(target);
 }
 
 GL_APICALL void GL_APIENTRY glFinishFenceNV(GLuint fence)
 {
-       return es2::FinishFenceNV(fence);
+       return gl::FinishFenceNV(fence);
 }
 
 GL_APICALL void GL_APIENTRY glFinish(void)
 {
-       return es2::Finish();
+       return gl::Finish();
 }
 
 GL_APICALL void GL_APIENTRY glFlush(void)
 {
-       return es2::Flush();
+       return gl::Flush();
 }
 
 GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 {
-       return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+       return gl::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
 }
 
 GL_APICALL void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 {
-       return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+       return gl::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
 }
 
 GL_APICALL void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 {
-       return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
+       return gl::FramebufferTexture2D(target, attachment, textarget, texture, level);
 }
 
 GL_APICALL void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 {
-       return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
+       return gl::FramebufferTexture2D(target, attachment, textarget, texture, level);
 }
 
 GL_APICALL void GL_APIENTRY glFrontFace(GLenum mode)
 {
-       return es2::FrontFace(mode);
+       return gl::FrontFace(mode);
 }
 
 GL_APICALL void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
 {
-       return es2::GenBuffers(n, buffers);
+       return gl::GenBuffers(n, buffers);
 }
 
 GL_APICALL void GL_APIENTRY glGenerateMipmap(GLenum target)
 {
-       return es2::GenerateMipmap(target);
+       return gl::GenerateMipmap(target);
 }
 
 GL_APICALL void GL_APIENTRY glGenerateMipmapOES(GLenum target)
 {
-       return es2::GenerateMipmap(target);
+       return gl::GenerateMipmap(target);
 }
 
 GL_APICALL void GL_APIENTRY glGenFencesNV(GLsizei n, GLuint* fences)
 {
-       return es2::GenFencesNV(n, fences);
+       return gl::GenFencesNV(n, fences);
 }
 
 GL_APICALL void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers)
 {
-       return es2::GenFramebuffers(n, framebuffers);
+       return gl::GenFramebuffers(n, framebuffers);
 }
 
 GL_APICALL void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers)
 {
-       return es2::GenFramebuffers(n, framebuffers);
+       return gl::GenFramebuffers(n, framebuffers);
 }
 
 GL_APICALL void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* ids)
 {
-       return es2::GenQueriesEXT(n, ids);
+       return gl::GenQueriesEXT(n, ids);
 }
 
 GL_APICALL void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
 {
-       return es2::GenRenderbuffers(n, renderbuffers);
+       return gl::GenRenderbuffers(n, renderbuffers);
 }
 
 GL_APICALL void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers)
 {
-       return es2::GenRenderbuffers(n, renderbuffers);
+       return gl::GenRenderbuffers(n, renderbuffers);
 }
 
 GL_APICALL void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures)
 {
-       return es2::GenTextures(n, textures);
+       return gl::GenTextures(n, textures);
 }
 
 GL_APICALL void GL_APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
 {
-       return es2::GetActiveAttrib(program, index, bufsize, length, size, type, name);
+       return gl::GetActiveAttrib(program, index, bufsize, length, size, type, name);
 }
 
 GL_APICALL void GL_APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
 {
-       return es2::GetActiveUniform(program, index, bufsize, length, size, type, name);
+       return gl::GetActiveUniform(program, index, bufsize, length, size, type, name);
 }
 
 GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
 {
-       return es2::GetAttachedShaders(program, maxcount, count, shaders);
+       return gl::GetAttachedShaders(program, maxcount, count, shaders);
 }
 
 GL_APICALL int GL_APIENTRY glGetAttribLocation(GLuint program, const GLchar* name)
 {
-       return es2::GetAttribLocation(program, name);
+       return gl::GetAttribLocation(program, name);
 }
 
 GL_APICALL void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
 {
-       return es2::GetBooleanv(pname, params);
+       return gl::GetBooleanv(pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
 {
-       return es2::GetBufferParameteriv(target, pname, params);
+       return gl::GetBufferParameteriv(target, pname, params);
 }
 
 GL_APICALL GLenum GL_APIENTRY glGetError(void)
 {
-       return es2::GetError();
+       return gl::GetError();
 }
 
 GL_APICALL void GL_APIENTRY glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
 {
-       return es2::GetFenceivNV(fence, pname, params);
+       return gl::GetFenceivNV(fence, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
 {
-       return es2::GetFloatv(pname, params);
+       return gl::GetFloatv(pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
 {
-       return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+       return gl::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params)
 {
-       return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+       return gl::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
 }
 
 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT(void)
 {
-       return es2::GetGraphicsResetStatusEXT();
+       return gl::GetGraphicsResetStatusEXT();
 }
 
 GL_APICALL void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
 {
-       return es2::GetIntegerv(pname, params);
+       return gl::GetIntegerv(pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params)
 {
-       return es2::GetProgramiv(program, pname, params);
+       return gl::GetProgramiv(program, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
 {
-       return es2::GetProgramInfoLog(program, bufsize, length, infolog);
+       return gl::GetProgramInfoLog(program, bufsize, length, infolog);
 }
 
 GL_APICALL void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint *params)
 {
-       return es2::GetQueryivEXT(target, pname, params);
+       return gl::GetQueryivEXT(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params)
 {
-       return es2::GetQueryObjectuivEXT(name, pname, params);
+       return gl::GetQueryObjectuivEXT(name, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
 {
-       return es2::GetRenderbufferParameteriv(target, pname, params);
+       return gl::GetRenderbufferParameteriv(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params)
 {
-       return es2::GetRenderbufferParameteriv(target, pname, params);
+       return gl::GetRenderbufferParameteriv(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
 {
-       return es2::GetShaderiv(shader, pname, params);
+       return gl::GetShaderiv(shader, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
 {
-       return es2::GetShaderInfoLog(shader, bufsize, length, infolog);
+       return gl::GetShaderInfoLog(shader, bufsize, length, infolog);
 }
 
 GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
 {
-       return es2::GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+       return gl::GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
 }
 
 GL_APICALL void GL_APIENTRY glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
 {
-       return es2::GetShaderSource(shader, bufsize, length, source);
+       return gl::GetShaderSource(shader, bufsize, length, source);
 }
 
 GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name)
 {
-       return es2::GetString(name);
+       return gl::GetString(name);
 }
 
 GL_APICALL void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
 {
-       return es2::GetTexParameterfv(target, pname, params);
+       return gl::GetTexParameterfv(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
 {
-       return es2::GetTexParameteriv(target, pname, params);
+       return gl::GetTexParameteriv(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params)
 {
-       return es2::GetnUniformfvEXT(program, location, bufSize, params);
+       return gl::GetnUniformfvEXT(program, location, bufSize, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params)
 {
-       return es2::GetUniformfv(program, location, params);
+       return gl::GetUniformfv(program, location, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params)
 {
-       return es2::GetnUniformivEXT(program, location, bufSize, params);
+       return gl::GetnUniformivEXT(program, location, bufSize, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params)
 {
-       return es2::GetUniformiv(program, location, params);
+       return gl::GetUniformiv(program, location, params);
 }
 
 GL_APICALL int GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar* name)
 {
-       return es2::GetUniformLocation(program, name);
+       return gl::GetUniformLocation(program, name);
 }
 
 GL_APICALL void GL_APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
 {
-       return es2::GetVertexAttribfv(index, pname, params);
+       return gl::GetVertexAttribfv(index, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
 {
-       return es2::GetVertexAttribiv(index, pname, params);
+       return gl::GetVertexAttribiv(index, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
 {
-       return es2::GetVertexAttribPointerv(index, pname, pointer);
+       return gl::GetVertexAttribPointerv(index, pname, pointer);
 }
 
 GL_APICALL void GL_APIENTRY glHint(GLenum target, GLenum mode)
 {
-       return es2::Hint(target, mode);
+       return gl::Hint(target, mode);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsBuffer(GLuint buffer)
 {
-       return es2::IsBuffer(buffer);
+       return gl::IsBuffer(buffer);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsEnabled(GLenum cap)
 {
-       return es2::IsEnabled(cap);
+       return gl::IsEnabled(cap);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV(GLuint fence)
 {
-       return es2::IsFenceNV(fence);
+       return gl::IsFenceNV(fence);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer)
 {
-       return es2::IsFramebuffer(framebuffer);
+       return gl::IsFramebuffer(framebuffer);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer)
 {
-       return es2::IsFramebuffer(framebuffer);
+       return gl::IsFramebuffer(framebuffer);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsProgram(GLuint program)
 {
-       return es2::IsProgram(program);
+       return gl::IsProgram(program);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT(GLuint name)
 {
-       return es2::IsQueryEXT(name);
+       return gl::IsQueryEXT(name);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer)
 {
-       return es2::IsRenderbuffer(renderbuffer);
+       return gl::IsRenderbuffer(renderbuffer);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
 {
-       return es2::IsRenderbuffer(renderbuffer);
+       return gl::IsRenderbuffer(renderbuffer);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsShader(GLuint shader)
 {
-       return es2::IsShader(shader);
+       return gl::IsShader(shader);
 }
 
 GL_APICALL GLboolean GL_APIENTRY glIsTexture(GLuint texture)
 {
-       return es2::IsTexture(texture);
+       return gl::IsTexture(texture);
 }
 
 GL_APICALL void GL_APIENTRY glLineWidth(GLfloat width)
 {
-       return es2::LineWidth(width);
+       return gl::LineWidth(width);
 }
 
 GL_APICALL void GL_APIENTRY glLinkProgram(GLuint program)
 {
-       return es2::LinkProgram(program);
+       return gl::LinkProgram(program);
 }
 
 GL_APICALL void GL_APIENTRY glPixelStorei(GLenum pname, GLint param)
 {
-       return es2::PixelStorei(pname, param);
+       return gl::PixelStorei(pname, param);
 }
 
 GL_APICALL void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
 {
-       return es2::PolygonOffset(factor, units);
+       return gl::PolygonOffset(factor, units);
 }
 
 GL_APICALL void GL_APIENTRY glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
                                              GLenum format, GLenum type, GLsizei bufSize, GLvoid *data)
 {
-       return es2::ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
+       return gl::ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
 }
 
 GL_APICALL void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
 {
-       return es2::ReadPixels(x, y, width, height, format, type, pixels);
+       return gl::ReadPixels(x, y, width, height, format, type, pixels);
 }
 
 GL_APICALL void GL_APIENTRY glReleaseShaderCompiler(void)
 {
-       return es2::ReleaseShaderCompiler();
+       return gl::ReleaseShaderCompiler();
 }
 
 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
 {
-       return es2::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+       return gl::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
 {
-       return es2::RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
+       return gl::RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 {
-       return es2::RenderbufferStorage(target, internalformat, width, height);
+       return gl::RenderbufferStorage(target, internalformat, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 {
-       return es2::RenderbufferStorage(target, internalformat, width, height);
+       return gl::RenderbufferStorage(target, internalformat, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
 {
-       return es2::SampleCoverage(value, invert);
+       return gl::SampleCoverage(value, invert);
 }
 
 GL_APICALL void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition)
 {
-       return es2::SetFenceNV(fence, condition);
+       return gl::SetFenceNV(fence, condition);
 }
 
 GL_APICALL void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
 {
-       return es2::Scissor(x, y, width, height);
+       return gl::Scissor(x, y, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
 {
-       return es2::ShaderBinary(n, shaders, binaryformat, binary, length);
+       return gl::ShaderBinary(n, shaders, binaryformat, binary, length);
 }
 
 GL_APICALL void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
 {
-       return es2::ShaderSource(shader, count, string, length);
+       return gl::ShaderSource(shader, count, string, length);
 }
 
 GL_APICALL void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
 {
-       return es2::StencilFunc(func, ref, mask);
+       return gl::StencilFunc(func, ref, mask);
 }
 
 GL_APICALL void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
 {
-       return es2::StencilFuncSeparate(face, func, ref, mask);
+       return gl::StencilFuncSeparate(face, func, ref, mask);
 }
 
 GL_APICALL void GL_APIENTRY glStencilMask(GLuint mask)
 {
-       return es2::StencilMask(mask);
+       return gl::StencilMask(mask);
 }
 
 GL_APICALL void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
 {
-       return es2::StencilMaskSeparate(face, mask);
+       return gl::StencilMaskSeparate(face, mask);
 }
 
 GL_APICALL void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
 {
-       return es2::StencilOp(fail, zfail, zpass);
+       return gl::StencilOp(fail, zfail, zpass);
 }
 
 GL_APICALL void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
 {
-       return es2::StencilOpSeparate(face, fail, zfail, zpass);
+       return gl::StencilOpSeparate(face, fail, zfail, zpass);
 }
 
 GLboolean GL_APIENTRY glTestFenceNV(GLuint fence)
 {
-       return es2::TestFenceNV(fence);
+       return gl::TestFenceNV(fence);
 }
 
 GL_APICALL void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
                                          GLint border, GLenum format, GLenum type, const GLvoid* pixels)
 {
-       return es2::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+       return gl::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
 }
 
 GL_APICALL void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
 {
-       return es2::TexParameterf(target, pname, param);
+       return gl::TexParameterf(target, pname, param);
 }
 
 GL_APICALL void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
 {
-       return es2::TexParameterfv(target, pname, params);
+       return gl::TexParameterfv(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
 {
-       return es2::TexParameteri(target, pname, param);
+       return gl::TexParameteri(target, pname, param);
 }
 
 GL_APICALL void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
 {
-       return es2::TexParameteriv(target, pname, params);
+       return gl::TexParameteriv(target, pname, params);
 }
 
 GL_APICALL void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
                                             GLenum format, GLenum type, const GLvoid* pixels)
 {
-       return es2::TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+       return gl::TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
 }
 
 GL_APICALL void GL_APIENTRY glUniform1f(GLint location, GLfloat x)
 {
-       return es2::Uniform1f(location, x);
+       return gl::Uniform1f(location, x);
 }
 
 GL_APICALL void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
 {
-       return es2::Uniform1fv(location, count, v);
+       return gl::Uniform1fv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform1i(GLint location, GLint x)
 {
-       return es2::Uniform1i(location, x);
+       return gl::Uniform1i(location, x);
 }
 
 GL_APICALL void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v)
 {
-       return es2::Uniform1iv(location, count, v);
+       return gl::Uniform1iv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y)
 {
-       return es2::Uniform2f(location, x, y);
+       return gl::Uniform2f(location, x, y);
 }
 
 GL_APICALL void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
 {
-       return es2::Uniform2fv(location, count, v);
+       return gl::Uniform2fv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y)
 {
-       return es2::Uniform2i(location, x, y);
+       return gl::Uniform2i(location, x, y);
 }
 
 GL_APICALL void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v)
 {
-       return es2::Uniform2iv(location, count, v);
+       return gl::Uniform2iv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
 {
-       return es2::Uniform3f(location, x, y, z);
+       return gl::Uniform3f(location, x, y, z);
 }
 
 GL_APICALL void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
 {
-       return es2::Uniform3fv(location, count, v);
+       return gl::Uniform3fv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z)
 {
-       return es2::Uniform3i(location, x, y, z);
+       return gl::Uniform3i(location, x, y, z);
 }
 
 GL_APICALL void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v)
 {
-       return es2::Uniform3iv(location, count, v);
+       return gl::Uniform3iv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
-       return es2::Uniform4f(location, x, y, z, w);
+       return gl::Uniform4f(location, x, y, z, w);
 }
 
 GL_APICALL void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
 {
-       return es2::Uniform4fv(location, count, v);
+       return gl::Uniform4fv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
 {
-       return es2::Uniform4i(location, x, y, z, w);
+       return gl::Uniform4i(location, x, y, z, w);
 }
 
 GL_APICALL void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v)
 {
-       return es2::Uniform4iv(location, count, v);
+       return gl::Uniform4iv(location, count, v);
 }
 
 GL_APICALL void GL_APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
 {
-       return es2::UniformMatrix2fv(location, count, transpose, value);
+       return gl::UniformMatrix2fv(location, count, transpose, value);
 }
 
 GL_APICALL void GL_APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
 {
-       return es2::UniformMatrix3fv(location, count, transpose, value);
+       return gl::UniformMatrix3fv(location, count, transpose, value);
 }
 
 GL_APICALL void GL_APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
 {
-       return es2::UniformMatrix4fv(location, count, transpose, value);
+       return gl::UniformMatrix4fv(location, count, transpose, value);
 }
 
 GL_APICALL void GL_APIENTRY glUseProgram(GLuint program)
 {
-       return es2::UseProgram(program);
+       return gl::UseProgram(program);
 }
 
 GL_APICALL void GL_APIENTRY glValidateProgram(GLuint program)
 {
-       return es2::ValidateProgram(program);
+       return gl::ValidateProgram(program);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib1f(GLuint index, GLfloat x)
 {
-       return es2::VertexAttrib1f(index, x);
+       return gl::VertexAttrib1f(index, x);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat* values)
 {
-       return es2::VertexAttrib1fv(index, values);
+       return gl::VertexAttrib1fv(index, values);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
 {
-       return es2::VertexAttrib2f(index, x, y);
+       return gl::VertexAttrib2f(index, x, y);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat* values)
 {
-       return es2::VertexAttrib2fv(index, values);
+       return gl::VertexAttrib2fv(index, values);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
 {
-       return es2::VertexAttrib3f(index, x, y, z);
+       return gl::VertexAttrib3f(index, x, y, z);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat* values)
 {
-       return es2::VertexAttrib3fv(index, values);
+       return gl::VertexAttrib3fv(index, values);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
-       return es2::VertexAttrib4f(index, x, y, z, w);
+       return gl::VertexAttrib4f(index, x, y, z, w);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat* values)
 {
-       return es2::VertexAttrib4fv(index, values);
+       return gl::VertexAttrib4fv(index, values);
 }
 
 GL_APICALL void GL_APIENTRY glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
 {
-       return es2::VertexAttribPointer(index, size, type, normalized, stride, ptr);
+       return gl::VertexAttribPointer(index, size, type, normalized, stride, ptr);
 }
 
 GL_APICALL void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
 {
-       return es2::Viewport(x, y, width, height);
+       return gl::Viewport(x, y, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
 {
-       return es2::BlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+       return gl::BlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
 }
 
 GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
                                                    GLbitfield mask, GLenum filter)
 {
-       return es2::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+       return gl::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
 }
 
 GL_APICALL void GL_APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
                                             GLint border, GLenum format, GLenum type, const GLvoid* pixels)
 {
-       return es2::TexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
+       return gl::TexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
 }
 
 GL_APICALL void GL_APIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
 {
-       return es2::TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+       return gl::TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
 }
 
 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 {
-       return es2::CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+       return gl::CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
 }
 
 GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
 {
-       return es2::CompressedTexImage3DOES(target, level,internalformat, width, height, depth, border, imageSize, data);
+       return gl::CompressedTexImage3DOES(target, level,internalformat, width, height, depth, border, imageSize, data);
 }
 
 GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
 {
-       return es2::CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+       return gl::CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
 }
 
 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
 {
-       return es2::FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
+       return gl::FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
 }
 
 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
 {
-       return es2::EGLImageTargetTexture2DOES(target, image);
+       return gl::EGLImageTargetTexture2DOES(target, image);
 }
 
 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
 {
-       return es2::EGLImageTargetRenderbufferStorageOES(target, image);
+       return gl::EGLImageTargetRenderbufferStorageOES(target, image);
 }
 
 GL_APICALL void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs)
 {
-       return es2::DrawBuffersEXT(n, bufs);
+       return gl::DrawBuffersEXT(n, bufs);
+}
+
+GL_APICALL void GL_APIENTRY glReadBuffer(GLenum src)
+{
+       return gl::ReadBuffer(src);
+}
+
+GL_APICALL void GL_APIENTRY glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
+{
+       return gl::DrawRangeElements(mode, start, end, count, type, indices);
+}
+
+GL_APICALL void GL_APIENTRY glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *data)
+{
+       return gl::TexImage3D(target, level, internalformat, width, height, depth, border, format, type, data);
+}
+
+GL_APICALL void GL_APIENTRY glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
+{
+       return gl::TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
+}
+
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+       return gl::CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+GL_APICALL void GL_APIENTRY glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
+{
+       return gl::CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+       return gl::CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+GL_APICALL void GL_APIENTRY glGenQueries(GLsizei n, GLuint *ids)
+{
+       return gl::GenQueries(n, ids);
+}
+
+GL_APICALL void GL_APIENTRY glDeleteQueries(GLsizei n, const GLuint *ids)
+{
+       return gl::DeleteQueries(n, ids);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glIsQuery(GLuint id)
+{
+       return gl::IsQuery(id);
+}
+
+GL_APICALL void GL_APIENTRY glBeginQuery(GLenum target, GLuint id)
+{
+       return gl::BeginQuery(target, id);
+}
+
+GL_APICALL void GL_APIENTRY glEndQuery(GLenum target)
+{
+       return gl::EndQuery(target);
+}
+
+GL_APICALL void GL_APIENTRY glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+{
+       return gl::GetQueryiv(target, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+{
+       return gl::GetQueryObjectuiv(id, pname, params);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer(GLenum target)
+{
+       return gl::UnmapBuffer(target);
+}
+
+GL_APICALL void GL_APIENTRY glGetBufferPointerv(GLenum target, GLenum pname, void **params)
+{
+       return gl::GetBufferPointerv(target, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glDrawBuffers(GLsizei n, const GLenum *bufs)
+{
+       return gl::DrawBuffers(n, bufs);
+}
+
+GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+       return gl::UniformMatrix2x3fv(location, count, transpose, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+       return gl::UniformMatrix3x2fv(location, count, transpose, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+       return gl::UniformMatrix2x4fv(location, count, transpose, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+       return gl::UniformMatrix4x2fv(location, count, transpose, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+       return gl::UniformMatrix3x4fv(location, count, transpose, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+       return gl::UniformMatrix4x3fv(location, count, transpose, value);
+}
+
+GL_APICALL void GL_APIENTRY glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+       return gl::BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+GL_APICALL void GL_APIENTRY glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+       return gl::FramebufferTextureLayer(target, attachment, texture, level, layer);
+}
+
+GL_APICALL void *GL_APIENTRY glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+       return gl::MapBufferRange(target, offset, length, access);
+}
+
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+       return gl::FlushMappedBufferRange(target, offset, length);
+}
+
+GL_APICALL void GL_APIENTRY glBindVertexArray(GLuint array)
+{
+       return gl::BindVertexArray(array);
+}
+
+GL_APICALL void GL_APIENTRY glBindVertexArrayOES(GLuint array)
+{
+       return gl::BindVertexArrayOES(array);
+}
+
+GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+{
+       return gl::DeleteVertexArrays(n, arrays);
+}
+
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays)
+{
+       return gl::DeleteFramebuffersOES(n, arrays);
+}
+
+GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays)
+{
+       return gl::GenVertexArrays(n, arrays);
+}
+
+GL_APICALL void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint *arrays)
+{
+       return gl::GenVertexArraysOES(n, arrays);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array)
+{
+       return gl::IsVertexArray(array);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array)
+{
+       return gl::IsVertexArrayOES(array);
+}
+
+GL_APICALL void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
+{
+       return gl::GetIntegeri_v(target, index, data);
+}
+
+GL_APICALL void GL_APIENTRY glBeginTransformFeedback(GLenum primitiveMode)
+{
+       return gl::BeginTransformFeedback(primitiveMode);
+}
+
+GL_APICALL void GL_APIENTRY glEndTransformFeedback(void)
+{
+       return gl::EndTransformFeedback();
+}
+
+GL_APICALL void GL_APIENTRY glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+       return gl::BindBufferRange(target, index, buffer, offset, size);
+}
+
+GL_APICALL void GL_APIENTRY glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+       return gl::BindBufferBase(target, index, buffer);
+}
+
+GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const *varyings, GLenum bufferMode)
+{
+       return gl::TransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+       return gl::GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
+}
+
+GL_APICALL void GL_APIENTRY glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+       return gl::VertexAttribIPointer(index, size, type, stride, pointer);
+}
+
+GL_APICALL void GL_APIENTRY glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+       return gl::GetVertexAttribIiv(index, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+       return gl::GetVertexAttribIuiv(index, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+       return gl::VertexAttribI4i(index, x, y, z, w);
+}
+
+GL_APICALL void GL_APIENTRY glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+       return gl::VertexAttribI4ui(index, x, y, z, w);
+}
+
+GL_APICALL void GL_APIENTRY glVertexAttribI4iv(GLuint index, const GLint *v)
+{
+       return gl::VertexAttribI4iv(index, v);
+}
+
+GL_APICALL void GL_APIENTRY glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+       return gl::VertexAttribI4uiv(index, v);
+}
+
+GL_APICALL void GL_APIENTRY glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+{
+       return gl::GetUniformuiv(program, location, params);
+}
+
+GL_APICALL GLint GL_APIENTRY glGetFragDataLocation(GLuint program, const GLchar *name)
+{
+       return gl::GetFragDataLocation(program, name);
+}
+
+GL_APICALL void GL_APIENTRY glUniform1ui(GLint location, GLuint v0)
+{
+       return gl::Uniform1ui(location, v0);
+}
+
+GL_APICALL void GL_APIENTRY glUniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+       return gl::Uniform2ui(location, v0, v1);
+}
+
+GL_APICALL void GL_APIENTRY glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+       return gl::Uniform3ui(location, v0, v1, v2);
+}
+
+GL_APICALL void GL_APIENTRY glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+       return gl::Uniform4ui(location, v0, v1, v2, v3);
+}
+
+GL_APICALL void GL_APIENTRY glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+       return gl::Uniform1uiv(location, count, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+       return gl::Uniform2uiv(location, count, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+       return gl::Uniform3uiv(location, count, value);
+}
+
+GL_APICALL void GL_APIENTRY glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+       return gl::Uniform4uiv(location, count, value);
+}
+
+GL_APICALL void GL_APIENTRY glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+       return gl::ClearBufferiv(buffer, drawbuffer, value);
+}
+
+GL_APICALL void GL_APIENTRY glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+       return gl::ClearBufferuiv(buffer, drawbuffer, value);
+}
+
+GL_APICALL void GL_APIENTRY glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+       return gl::ClearBufferfv(buffer, drawbuffer, value);
+}
+
+GL_APICALL void GL_APIENTRY glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+{
+       return gl::ClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+GL_APICALL const GLubyte *GL_APIENTRY glGetStringi(GLenum name, GLuint index)
+{
+       return gl::GetStringi(name, index);
+}
+
+GL_APICALL void GL_APIENTRY glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+       return gl::CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+GL_APICALL void GL_APIENTRY glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices)
+{
+       return gl::GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
+}
+
+GL_APICALL void GL_APIENTRY glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+{
+       return gl::GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
+}
+
+GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+{
+       return gl::GetUniformBlockIndex(program, uniformBlockName);
+}
+
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+{
+       return gl::GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+{
+       return gl::GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+GL_APICALL void GL_APIENTRY glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+       return gl::UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+GL_APICALL void GL_APIENTRY glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
+{
+       return gl::DrawArraysInstanced(mode, first, count, instanceCount);
+}
+
+GL_APICALL void GL_APIENTRY glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
+{
+       return gl::DrawElementsInstanced(mode, count, type, indices, instanceCount);
+}
+
+GL_APICALL GLsync GL_APIENTRY glFenceSync(GLenum condition, GLbitfield flags)
+{
+       return gl::FenceSync(condition, flags);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glIsSync(GLsync sync)
+{
+       return gl::IsSync(sync);
+}
+
+GL_APICALL void GL_APIENTRY glDeleteSync(GLsync sync)
+{
+       return gl::DeleteSync(sync);
+}
+
+GL_APICALL GLenum GL_APIENTRY glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+       return gl::ClientWaitSync(sync, flags, timeout);
+}
+
+GL_APICALL void GL_APIENTRY glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+       return gl::WaitSync(sync, flags, timeout);
+}
+
+GL_APICALL void GL_APIENTRY glGetInteger64v(GLenum pname, GLint64 *data)
+{
+       return gl::GetInteger64v(pname, data);
+}
+
+GL_APICALL void GL_APIENTRY glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+       return gl::GetSynciv(sync, pname, bufSize, length, values);
+}
+
+GL_APICALL void GL_APIENTRY glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
+{
+       return gl::GetInteger64i_v(target, index, data);
+}
+
+GL_APICALL void GL_APIENTRY glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+       return gl::GetBufferParameteri64v(target, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glGenSamplers(GLsizei count, GLuint *samplers)
+{
+       return gl::GenSamplers(count, samplers);
+}
+
+GL_APICALL void GL_APIENTRY glDeleteSamplers(GLsizei count, const GLuint *samplers)
+{
+       return gl::DeleteSamplers(count, samplers);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glIsSampler(GLuint sampler)
+{
+       return gl::IsSampler(sampler);
+}
+
+GL_APICALL void GL_APIENTRY glBindSampler(GLuint unit, GLuint sampler)
+{
+       return gl::BindSampler(unit, sampler);
+}
+
+GL_APICALL void GL_APIENTRY glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+       return gl::SamplerParameteri(sampler, pname, param);
+}
+
+GL_APICALL void GL_APIENTRY glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+{
+       return gl::SamplerParameteriv(sampler, pname, param);
+}
+
+GL_APICALL void GL_APIENTRY glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+       return gl::SamplerParameterf(sampler, pname, param);
+}
+
+GL_APICALL void GL_APIENTRY glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+{
+       return gl::SamplerParameterfv(sampler, pname, param);
+}
+
+GL_APICALL void GL_APIENTRY glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+{
+       return gl::GetSamplerParameteriv(sampler, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+{
+       return gl::GetSamplerParameterfv(sampler, pname, params);
+}
+
+GL_APICALL void GL_APIENTRY glVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+       return gl::VertexAttribDivisor(index, divisor);
+}
+
+GL_APICALL void GL_APIENTRY glBindTransformFeedback(GLenum target, GLuint id)
+{
+       return gl::BindTransformFeedback(target, id);
+}
+
+GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+       return gl::DeleteTransformFeedbacks(n, ids);
+}
+
+GL_APICALL void GL_APIENTRY glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+       return gl::GenTransformFeedbacks(n, ids);
+}
+
+GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback(GLuint id)
+{
+       return gl::IsTransformFeedback(id);
+}
+
+GL_APICALL void GL_APIENTRY glPauseTransformFeedback(void)
+{
+       return gl::PauseTransformFeedback();
+}
+
+GL_APICALL void GL_APIENTRY glResumeTransformFeedback(void)
+{
+       return gl::ResumeTransformFeedback();
+}
+
+GL_APICALL void GL_APIENTRY glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
+{
+       return gl::GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
+{
+       return gl::ProgramBinary(program, binaryFormat, binary, length);
+}
+
+GL_APICALL void GL_APIENTRY glProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+       return gl::ProgramParameteri(program, pname, value);
+}
+
+GL_APICALL void GL_APIENTRY glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+       return gl::InvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+       return gl::InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
+}
+
+GL_APICALL void GL_APIENTRY glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+       return gl::TexStorage2D(target, levels, internalformat, width, height);
+}
+
+GL_APICALL void GL_APIENTRY glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+       return gl::TexStorage3D(target, levels, internalformat, width, height, depth);
 }
 
-void GL_APIENTRY Register(const char *licenseKey)
+GL_APICALL void GL_APIENTRY glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
 {
-       // Nothing to do, SwiftShader is open-source
+       return gl::GetInternalformativ(target, internalformat, pname, bufSize, params);
 }
 }
 
@@ -1217,200 +1542,200 @@ sw::FrameBuffer *createFrameBuffer(void *nativeDisplay, EGLNativeWindowType wind
 
 LibGLESv2exports::LibGLESv2exports()
 {
-       this->glActiveTexture = es2::ActiveTexture;
-       this->glAttachShader = es2::AttachShader;
-       this->glBeginQueryEXT = es2::BeginQueryEXT;
-       this->glBindAttribLocation = es2::BindAttribLocation;
-       this->glBindBuffer = es2::BindBuffer;
-       this->glBindFramebuffer = es2::BindFramebuffer;
-       this->glBindRenderbuffer = es2::BindRenderbuffer;
-       this->glBindTexture = es2::BindTexture;
-       this->glBlendColor = es2::BlendColor;
-       this->glBlendEquation = es2::BlendEquation;
-       this->glBlendEquationSeparate = es2::BlendEquationSeparate;
-       this->glBlendFunc = es2::BlendFunc;
-       this->glBlendFuncSeparate = es2::BlendFuncSeparate;
-       this->glBufferData = es2::BufferData;
-       this->glBufferSubData = es2::BufferSubData;
-       this->glCheckFramebufferStatus = es2::CheckFramebufferStatus;
-       this->glClear = es2::Clear;
-       this->glClearColor = es2::ClearColor;
-       this->glClearDepthf = es2::ClearDepthf;
-       this->glClearStencil = es2::ClearStencil;
-       this->glColorMask = es2::ColorMask;
-       this->glCompileShader = es2::CompileShader;
-       this->glCompressedTexImage2D = es2::CompressedTexImage2D;
-       this->glCompressedTexSubImage2D = es2::CompressedTexSubImage2D;
-       this->glCopyTexImage2D = es2::CopyTexImage2D;
-       this->glCopyTexSubImage2D = es2::CopyTexSubImage2D;
-       this->glCreateProgram = es2::CreateProgram;
-       this->glCreateShader = es2::CreateShader;
-       this->glCullFace = es2::CullFace;
-       this->glDeleteBuffers = es2::DeleteBuffers;
-       this->glDeleteFencesNV = es2::DeleteFencesNV;
-       this->glDeleteFramebuffers = es2::DeleteFramebuffers;
-       this->glDeleteProgram = es2::DeleteProgram;
-       this->glDeleteQueriesEXT = es2::DeleteQueriesEXT;
-       this->glDeleteRenderbuffers = es2::DeleteRenderbuffers;
-       this->glDeleteShader = es2::DeleteShader;
-       this->glDeleteTextures = es2::DeleteTextures;
-       this->glDepthFunc = es2::DepthFunc;
-       this->glDepthMask = es2::DepthMask;
-       this->glDepthRangef = es2::DepthRangef;
-       this->glDetachShader = es2::DetachShader;
-       this->glDisable = es2::Disable;
-       this->glDisableVertexAttribArray = es2::DisableVertexAttribArray;
-       this->glDrawArrays = es2::DrawArrays;
-       this->glDrawElements = es2::DrawElements;
-       this->glDrawArraysInstancedEXT = es2::DrawArraysInstancedEXT;
-       this->glDrawElementsInstancedEXT = es2::DrawElementsInstancedEXT;
-       this->glVertexAttribDivisorEXT = es2::VertexAttribDivisorEXT;
-       this->glDrawArraysInstancedANGLE = es2::DrawArraysInstancedANGLE;
-       this->glDrawElementsInstancedANGLE = es2::DrawElementsInstancedANGLE;
-       this->glVertexAttribDivisorANGLE = es2::VertexAttribDivisorANGLE;
-       this->glEnable = es2::Enable;
-       this->glEnableVertexAttribArray = es2::EnableVertexAttribArray;
-       this->glEndQueryEXT = es2::EndQueryEXT;
-       this->glFinishFenceNV = es2::FinishFenceNV;
-       this->glFinish = es2::Finish;
-       this->glFlush = es2::Flush;
-       this->glFramebufferRenderbuffer = es2::FramebufferRenderbuffer;
-       this->glFramebufferTexture2D = es2::FramebufferTexture2D;
-       this->glFrontFace = es2::FrontFace;
-       this->glGenBuffers = es2::GenBuffers;
-       this->glGenerateMipmap = es2::GenerateMipmap;
-       this->glGenFencesNV = es2::GenFencesNV;
-       this->glGenFramebuffers = es2::GenFramebuffers;
-       this->glGenQueriesEXT = es2::GenQueriesEXT;
-       this->glGenRenderbuffers = es2::GenRenderbuffers;
-       this->glGenTextures = es2::GenTextures;
-       this->glGetActiveAttrib = es2::GetActiveAttrib;
-       this->glGetActiveUniform = es2::GetActiveUniform;
-       this->glGetAttachedShaders = es2::GetAttachedShaders;
-       this->glGetAttribLocation = es2::GetAttribLocation;
-       this->glGetBooleanv = es2::GetBooleanv;
-       this->glGetBufferParameteriv = es2::GetBufferParameteriv;
-       this->glGetError = es2::GetError;
-       this->glGetFenceivNV = es2::GetFenceivNV;
-       this->glGetFloatv = es2::GetFloatv;
-       this->glGetFramebufferAttachmentParameteriv = es2::GetFramebufferAttachmentParameteriv;
-       this->glGetGraphicsResetStatusEXT = es2::GetGraphicsResetStatusEXT;
-       this->glGetIntegerv = es2::GetIntegerv;
-       this->glGetProgramiv = es2::GetProgramiv;
-       this->glGetProgramInfoLog = es2::GetProgramInfoLog;
-       this->glGetQueryivEXT = es2::GetQueryivEXT;
-       this->glGetQueryObjectuivEXT = es2::GetQueryObjectuivEXT;
-       this->glGetRenderbufferParameteriv = es2::GetRenderbufferParameteriv;
-       this->glGetShaderiv = es2::GetShaderiv;
-       this->glGetShaderInfoLog = es2::GetShaderInfoLog;
-       this->glGetShaderPrecisionFormat = es2::GetShaderPrecisionFormat;
-       this->glGetShaderSource = es2::GetShaderSource;
-       this->glGetString = es2::GetString;
-       this->glGetTexParameterfv = es2::GetTexParameterfv;
-       this->glGetTexParameteriv = es2::GetTexParameteriv;
-       this->glGetnUniformfvEXT = es2::GetnUniformfvEXT;
-       this->glGetUniformfv = es2::GetUniformfv;
-       this->glGetnUniformivEXT = es2::GetnUniformivEXT;
-       this->glGetUniformiv = es2::GetUniformiv;
-       this->glGetUniformLocation = es2::GetUniformLocation;
-       this->glGetVertexAttribfv = es2::GetVertexAttribfv;
-       this->glGetVertexAttribiv = es2::GetVertexAttribiv;
-       this->glGetVertexAttribPointerv = es2::GetVertexAttribPointerv;
-       this->glHint = es2::Hint;
-       this->glIsBuffer = es2::IsBuffer;
-       this->glIsEnabled = es2::IsEnabled;
-       this->glIsFenceNV = es2::IsFenceNV;
-       this->glIsFramebuffer = es2::IsFramebuffer;
-       this->glIsProgram = es2::IsProgram;
-       this->glIsQueryEXT = es2::IsQueryEXT;
-       this->glIsRenderbuffer = es2::IsRenderbuffer;
-       this->glIsShader = es2::IsShader;
-       this->glIsTexture = es2::IsTexture;
-       this->glLineWidth = es2::LineWidth;
-       this->glLinkProgram = es2::LinkProgram;
-       this->glPixelStorei = es2::PixelStorei;
-       this->glPolygonOffset = es2::PolygonOffset;
-       this->glReadnPixelsEXT = es2::ReadnPixelsEXT;
-       this->glReadPixels = es2::ReadPixels;
-       this->glReleaseShaderCompiler = es2::ReleaseShaderCompiler;
-       this->glRenderbufferStorageMultisample = es2::RenderbufferStorageMultisample;
-       this->glRenderbufferStorageMultisampleANGLE = es2::RenderbufferStorageMultisampleANGLE;
-       this->glRenderbufferStorage = es2::RenderbufferStorage;
-       this->glSampleCoverage = es2::SampleCoverage;
-       this->glSetFenceNV = es2::SetFenceNV;
-       this->glScissor = es2::Scissor;
-       this->glShaderBinary = es2::ShaderBinary;
-       this->glShaderSource = es2::ShaderSource;
-       this->glStencilFunc = es2::StencilFunc;
-       this->glStencilFuncSeparate = es2::StencilFuncSeparate;
-       this->glStencilMask = es2::StencilMask;
-       this->glStencilMaskSeparate = es2::StencilMaskSeparate;
-       this->glStencilOp = es2::StencilOp;
-       this->glStencilOpSeparate = es2::StencilOpSeparate;
-       this->glTestFenceNV = es2::TestFenceNV;
-       this->glTexImage2D = es2::TexImage2D;
-       this->glTexParameterf = es2::TexParameterf;
-       this->glTexParameterfv = es2::TexParameterfv;
-       this->glTexParameteri = es2::TexParameteri;
-       this->glTexParameteriv = es2::TexParameteriv;
-       this->glTexSubImage2D = es2::TexSubImage2D;
-       this->glUniform1f = es2::Uniform1f;
-       this->glUniform1fv = es2::Uniform1fv;
-       this->glUniform1i = es2::Uniform1i;
-       this->glUniform1iv = es2::Uniform1iv;
-       this->glUniform2f = es2::Uniform2f;
-       this->glUniform2fv = es2::Uniform2fv;
-       this->glUniform2i = es2::Uniform2i;
-       this->glUniform2iv = es2::Uniform2iv;
-       this->glUniform3f = es2::Uniform3f;
-       this->glUniform3fv = es2::Uniform3fv;
-       this->glUniform3i = es2::Uniform3i;
-       this->glUniform3iv = es2::Uniform3iv;
-       this->glUniform4f = es2::Uniform4f;
-       this->glUniform4fv = es2::Uniform4fv;
-       this->glUniform4i = es2::Uniform4i;
-       this->glUniform4iv = es2::Uniform4iv;
-       this->glUniformMatrix2fv = es2::UniformMatrix2fv;
-       this->glUniformMatrix3fv = es2::UniformMatrix3fv;
-       this->glUniformMatrix4fv = es2::UniformMatrix4fv;
-       this->glUseProgram = es2::UseProgram;
-       this->glValidateProgram = es2::ValidateProgram;
-       this->glVertexAttrib1f = es2::VertexAttrib1f;
-       this->glVertexAttrib1fv = es2::VertexAttrib1fv;
-       this->glVertexAttrib2f = es2::VertexAttrib2f;
-       this->glVertexAttrib2fv = es2::VertexAttrib2fv;
-       this->glVertexAttrib3f = es2::VertexAttrib3f;
-       this->glVertexAttrib3fv = es2::VertexAttrib3fv;
-       this->glVertexAttrib4f = es2::VertexAttrib4f;
-       this->glVertexAttrib4fv = es2::VertexAttrib4fv;
-       this->glVertexAttribPointer = es2::VertexAttribPointer;
-       this->glViewport = es2::Viewport;
-       this->glBlitFramebufferNV = es2::BlitFramebufferNV;
-       this->glBlitFramebufferANGLE = es2::BlitFramebufferANGLE;
-       this->glTexImage3DOES = es2::TexImage3DOES;
-       this->glTexSubImage3DOES = es2::TexSubImage3DOES;
-       this->glCopyTexSubImage3DOES = es2::CopyTexSubImage3DOES;
-       this->glCompressedTexImage3DOES = es2::CompressedTexImage3DOES;
-       this->glCompressedTexSubImage3DOES = es2::CompressedTexSubImage3DOES;
-       this->glFramebufferTexture3DOES = es2::FramebufferTexture3DOES;
-       this->glEGLImageTargetTexture2DOES = es2::EGLImageTargetTexture2DOES;
-       this->glEGLImageTargetRenderbufferStorageOES = es2::EGLImageTargetRenderbufferStorageOES;
-       this->glIsRenderbufferOES = es2::IsRenderbufferOES;
-       this->glBindRenderbufferOES = es2::BindRenderbufferOES;
-       this->glDeleteRenderbuffersOES = es2::DeleteRenderbuffersOES;
-       this->glGenRenderbuffersOES = es2::GenRenderbuffersOES;
-       this->glRenderbufferStorageOES = es2::RenderbufferStorageOES;
-       this->glGetRenderbufferParameterivOES = es2::GetRenderbufferParameterivOES;
-       this->glIsFramebufferOES = es2::IsFramebufferOES;
-       this->glBindFramebufferOES = es2::BindFramebufferOES;
-       this->glDeleteFramebuffersOES = es2::DeleteFramebuffersOES;
-       this->glGenFramebuffersOES = es2::GenFramebuffersOES;
-       this->glCheckFramebufferStatusOES = es2::CheckFramebufferStatusOES;
-       this->glFramebufferRenderbufferOES = es2::FramebufferRenderbufferOES;
-       this->glFramebufferTexture2DOES = es2::FramebufferTexture2DOES;
-       this->glGetFramebufferAttachmentParameterivOES = es2::GetFramebufferAttachmentParameterivOES;
-       this->glGenerateMipmapOES = es2::GenerateMipmapOES;
-       this->glDrawBuffersEXT = es2::DrawBuffersEXT;
+       this->glActiveTexture = gl::ActiveTexture;
+       this->glAttachShader = gl::AttachShader;
+       this->glBeginQueryEXT = gl::BeginQueryEXT;
+       this->glBindAttribLocation = gl::BindAttribLocation;
+       this->glBindBuffer = gl::BindBuffer;
+       this->glBindFramebuffer = gl::BindFramebuffer;
+       this->glBindRenderbuffer = gl::BindRenderbuffer;
+       this->glBindTexture = gl::BindTexture;
+       this->glBlendColor = gl::BlendColor;
+       this->glBlendEquation = gl::BlendEquation;
+       this->glBlendEquationSeparate = gl::BlendEquationSeparate;
+       this->glBlendFunc = gl::BlendFunc;
+       this->glBlendFuncSeparate = gl::BlendFuncSeparate;
+       this->glBufferData = gl::BufferData;
+       this->glBufferSubData = gl::BufferSubData;
+       this->glCheckFramebufferStatus = gl::CheckFramebufferStatus;
+       this->glClear = gl::Clear;
+       this->glClearColor = gl::ClearColor;
+       this->glClearDepthf = gl::ClearDepthf;
+       this->glClearStencil = gl::ClearStencil;
+       this->glColorMask = gl::ColorMask;
+       this->glCompileShader = gl::CompileShader;
+       this->glCompressedTexImage2D = gl::CompressedTexImage2D;
+       this->glCompressedTexSubImage2D = gl::CompressedTexSubImage2D;
+       this->glCopyTexImage2D = gl::CopyTexImage2D;
+       this->glCopyTexSubImage2D = gl::CopyTexSubImage2D;
+       this->glCreateProgram = gl::CreateProgram;
+       this->glCreateShader = gl::CreateShader;
+       this->glCullFace = gl::CullFace;
+       this->glDeleteBuffers = gl::DeleteBuffers;
+       this->glDeleteFencesNV = gl::DeleteFencesNV;
+       this->glDeleteFramebuffers = gl::DeleteFramebuffers;
+       this->glDeleteProgram = gl::DeleteProgram;
+       this->glDeleteQueriesEXT = gl::DeleteQueriesEXT;
+       this->glDeleteRenderbuffers = gl::DeleteRenderbuffers;
+       this->glDeleteShader = gl::DeleteShader;
+       this->glDeleteTextures = gl::DeleteTextures;
+       this->glDepthFunc = gl::DepthFunc;
+       this->glDepthMask = gl::DepthMask;
+       this->glDepthRangef = gl::DepthRangef;
+       this->glDetachShader = gl::DetachShader;
+       this->glDisable = gl::Disable;
+       this->glDisableVertexAttribArray = gl::DisableVertexAttribArray;
+       this->glDrawArrays = gl::DrawArrays;
+       this->glDrawElements = gl::DrawElements;
+       this->glDrawArraysInstancedEXT = gl::DrawArraysInstancedEXT;
+       this->glDrawElementsInstancedEXT = gl::DrawElementsInstancedEXT;
+       this->glVertexAttribDivisorEXT = gl::VertexAttribDivisorEXT;
+       this->glDrawArraysInstancedANGLE = gl::DrawArraysInstancedANGLE;
+       this->glDrawElementsInstancedANGLE = gl::DrawElementsInstancedANGLE;
+       this->glVertexAttribDivisorANGLE = gl::VertexAttribDivisorANGLE;
+       this->glEnable = gl::Enable;
+       this->glEnableVertexAttribArray = gl::EnableVertexAttribArray;
+       this->glEndQueryEXT = gl::EndQueryEXT;
+       this->glFinishFenceNV = gl::FinishFenceNV;
+       this->glFinish = gl::Finish;
+       this->glFlush = gl::Flush;
+       this->glFramebufferRenderbuffer = gl::FramebufferRenderbuffer;
+       this->glFramebufferTexture2D = gl::FramebufferTexture2D;
+       this->glFrontFace = gl::FrontFace;
+       this->glGenBuffers = gl::GenBuffers;
+       this->glGenerateMipmap = gl::GenerateMipmap;
+       this->glGenFencesNV = gl::GenFencesNV;
+       this->glGenFramebuffers = gl::GenFramebuffers;
+       this->glGenQueriesEXT = gl::GenQueriesEXT;
+       this->glGenRenderbuffers = gl::GenRenderbuffers;
+       this->glGenTextures = gl::GenTextures;
+       this->glGetActiveAttrib = gl::GetActiveAttrib;
+       this->glGetActiveUniform = gl::GetActiveUniform;
+       this->glGetAttachedShaders = gl::GetAttachedShaders;
+       this->glGetAttribLocation = gl::GetAttribLocation;
+       this->glGetBooleanv = gl::GetBooleanv;
+       this->glGetBufferParameteriv = gl::GetBufferParameteriv;
+       this->glGetError = gl::GetError;
+       this->glGetFenceivNV = gl::GetFenceivNV;
+       this->glGetFloatv = gl::GetFloatv;
+       this->glGetFramebufferAttachmentParameteriv = gl::GetFramebufferAttachmentParameteriv;
+       this->glGetGraphicsResetStatusEXT = gl::GetGraphicsResetStatusEXT;
+       this->glGetIntegerv = gl::GetIntegerv;
+       this->glGetProgramiv = gl::GetProgramiv;
+       this->glGetProgramInfoLog = gl::GetProgramInfoLog;
+       this->glGetQueryivEXT = gl::GetQueryivEXT;
+       this->glGetQueryObjectuivEXT = gl::GetQueryObjectuivEXT;
+       this->glGetRenderbufferParameteriv = gl::GetRenderbufferParameteriv;
+       this->glGetShaderiv = gl::GetShaderiv;
+       this->glGetShaderInfoLog = gl::GetShaderInfoLog;
+       this->glGetShaderPrecisionFormat = gl::GetShaderPrecisionFormat;
+       this->glGetShaderSource = gl::GetShaderSource;
+       this->glGetString = gl::GetString;
+       this->glGetTexParameterfv = gl::GetTexParameterfv;
+       this->glGetTexParameteriv = gl::GetTexParameteriv;
+       this->glGetnUniformfvEXT = gl::GetnUniformfvEXT;
+       this->glGetUniformfv = gl::GetUniformfv;
+       this->glGetnUniformivEXT = gl::GetnUniformivEXT;
+       this->glGetUniformiv = gl::GetUniformiv;
+       this->glGetUniformLocation = gl::GetUniformLocation;
+       this->glGetVertexAttribfv = gl::GetVertexAttribfv;
+       this->glGetVertexAttribiv = gl::GetVertexAttribiv;
+       this->glGetVertexAttribPointerv = gl::GetVertexAttribPointerv;
+       this->glHint = gl::Hint;
+       this->glIsBuffer = gl::IsBuffer;
+       this->glIsEnabled = gl::IsEnabled;
+       this->glIsFenceNV = gl::IsFenceNV;
+       this->glIsFramebuffer = gl::IsFramebuffer;
+       this->glIsProgram = gl::IsProgram;
+       this->glIsQueryEXT = gl::IsQueryEXT;
+       this->glIsRenderbuffer = gl::IsRenderbuffer;
+       this->glIsShader = gl::IsShader;
+       this->glIsTexture = gl::IsTexture;
+       this->glLineWidth = gl::LineWidth;
+       this->glLinkProgram = gl::LinkProgram;
+       this->glPixelStorei = gl::PixelStorei;
+       this->glPolygonOffset = gl::PolygonOffset;
+       this->glReadnPixelsEXT = gl::ReadnPixelsEXT;
+       this->glReadPixels = gl::ReadPixels;
+       this->glReleaseShaderCompiler = gl::ReleaseShaderCompiler;
+       this->glRenderbufferStorageMultisample = gl::RenderbufferStorageMultisample;
+       this->glRenderbufferStorageMultisampleANGLE = gl::RenderbufferStorageMultisampleANGLE;
+       this->glRenderbufferStorage = gl::RenderbufferStorage;
+       this->glSampleCoverage = gl::SampleCoverage;
+       this->glSetFenceNV = gl::SetFenceNV;
+       this->glScissor = gl::Scissor;
+       this->glShaderBinary = gl::ShaderBinary;
+       this->glShaderSource = gl::ShaderSource;
+       this->glStencilFunc = gl::StencilFunc;
+       this->glStencilFuncSeparate = gl::StencilFuncSeparate;
+       this->glStencilMask = gl::StencilMask;
+       this->glStencilMaskSeparate = gl::StencilMaskSeparate;
+       this->glStencilOp = gl::StencilOp;
+       this->glStencilOpSeparate = gl::StencilOpSeparate;
+       this->glTestFenceNV = gl::TestFenceNV;
+       this->glTexImage2D = gl::TexImage2D;
+       this->glTexParameterf = gl::TexParameterf;
+       this->glTexParameterfv = gl::TexParameterfv;
+       this->glTexParameteri = gl::TexParameteri;
+       this->glTexParameteriv = gl::TexParameteriv;
+       this->glTexSubImage2D = gl::TexSubImage2D;
+       this->glUniform1f = gl::Uniform1f;
+       this->glUniform1fv = gl::Uniform1fv;
+       this->glUniform1i = gl::Uniform1i;
+       this->glUniform1iv = gl::Uniform1iv;
+       this->glUniform2f = gl::Uniform2f;
+       this->glUniform2fv = gl::Uniform2fv;
+       this->glUniform2i = gl::Uniform2i;
+       this->glUniform2iv = gl::Uniform2iv;
+       this->glUniform3f = gl::Uniform3f;
+       this->glUniform3fv = gl::Uniform3fv;
+       this->glUniform3i = gl::Uniform3i;
+       this->glUniform3iv = gl::Uniform3iv;
+       this->glUniform4f = gl::Uniform4f;
+       this->glUniform4fv = gl::Uniform4fv;
+       this->glUniform4i = gl::Uniform4i;
+       this->glUniform4iv = gl::Uniform4iv;
+       this->glUniformMatrix2fv = gl::UniformMatrix2fv;
+       this->glUniformMatrix3fv = gl::UniformMatrix3fv;
+       this->glUniformMatrix4fv = gl::UniformMatrix4fv;
+       this->glUseProgram = gl::UseProgram;
+       this->glValidateProgram = gl::ValidateProgram;
+       this->glVertexAttrib1f = gl::VertexAttrib1f;
+       this->glVertexAttrib1fv = gl::VertexAttrib1fv;
+       this->glVertexAttrib2f = gl::VertexAttrib2f;
+       this->glVertexAttrib2fv = gl::VertexAttrib2fv;
+       this->glVertexAttrib3f = gl::VertexAttrib3f;
+       this->glVertexAttrib3fv = gl::VertexAttrib3fv;
+       this->glVertexAttrib4f = gl::VertexAttrib4f;
+       this->glVertexAttrib4fv = gl::VertexAttrib4fv;
+       this->glVertexAttribPointer = gl::VertexAttribPointer;
+       this->glViewport = gl::Viewport;
+       this->glBlitFramebufferNV = gl::BlitFramebufferNV;
+       this->glBlitFramebufferANGLE = gl::BlitFramebufferANGLE;
+       this->glTexImage3DOES = gl::TexImage3DOES;
+       this->glTexSubImage3DOES = gl::TexSubImage3DOES;
+       this->glCopyTexSubImage3DOES = gl::CopyTexSubImage3DOES;
+       this->glCompressedTexImage3DOES = gl::CompressedTexImage3DOES;
+       this->glCompressedTexSubImage3DOES = gl::CompressedTexSubImage3DOES;
+       this->glFramebufferTexture3DOES = gl::FramebufferTexture3DOES;
+       this->glEGLImageTargetTexture2DOES = gl::EGLImageTargetTexture2DOES;
+       this->glEGLImageTargetRenderbufferStorageOES = gl::EGLImageTargetRenderbufferStorageOES;
+       this->glIsRenderbufferOES = gl::IsRenderbufferOES;
+       this->glBindRenderbufferOES = gl::BindRenderbufferOES;
+       this->glDeleteRenderbuffersOES = gl::DeleteRenderbuffersOES;
+       this->glGenRenderbuffersOES = gl::GenRenderbuffersOES;
+       this->glRenderbufferStorageOES = gl::RenderbufferStorageOES;
+       this->glGetRenderbufferParameterivOES = gl::GetRenderbufferParameterivOES;
+       this->glIsFramebufferOES = gl::IsFramebufferOES;
+       this->glBindFramebufferOES = gl::BindFramebufferOES;
+       this->glDeleteFramebuffersOES = gl::DeleteFramebuffersOES;
+       this->glGenFramebuffersOES = gl::GenFramebuffersOES;
+       this->glCheckFramebufferStatusOES = gl::CheckFramebufferStatusOES;
+       this->glFramebufferRenderbufferOES = gl::FramebufferRenderbufferOES;
+       this->glFramebufferTexture2DOES = gl::FramebufferTexture2DOES;
+       this->glGetFramebufferAttachmentParameterivOES = gl::GetFramebufferAttachmentParameterivOES;
+       this->glGenerateMipmapOES = gl::GenerateMipmapOES;
+       this->glDrawBuffersEXT = gl::DrawBuffersEXT;
 
        this->es2CreateContext = ::es2CreateContext;
        this->es2GetProcAddress = ::es2GetProcAddress;
diff --git a/src/OpenGL/libGLESv2/entry_points.h b/src/OpenGL/libGLESv2/entry_points.h
new file mode 100644 (file)
index 0000000..b72c6cd
--- /dev/null
@@ -0,0 +1,334 @@
+// Copyright 2018 The SwiftShader Authors. All Rights Reserved.
+//
+// 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.
+
+#ifndef LIBGLESV2_ENTRY_POINTS_H_
+#define LIBGLESV2_ENTRY_POINTS_H_
+
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#include <GLES3/gl3.h>
+
+namespace gl
+{
+       void ActiveTexture(GLenum texture);
+       void AttachShader(GLuint program, GLuint shader);
+       void BeginQueryEXT(GLenum target, GLuint name);
+       void BindAttribLocation(GLuint program, GLuint index, const GLchar* name);
+       void BindBuffer(GLenum target, GLuint buffer);
+       void BindFramebuffer(GLenum target, GLuint framebuffer);
+       void BindRenderbuffer(GLenum target, GLuint renderbuffer);
+       void BindTexture(GLenum target, GLuint texture);
+       void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+       void BlendEquation(GLenum mode);
+       void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+       void BlendFunc(GLenum sfactor, GLenum dfactor);
+       void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+       void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
+       void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
+       GLenum CheckFramebufferStatus(GLenum target);
+       void Clear(GLbitfield mask);
+       void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+       void ClearDepthf(GLclampf depth);
+       void ClearStencil(GLint s);
+       void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+       void CompileShader(GLuint shader);
+       void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
+               GLint border, GLsizei imageSize, const GLvoid* data);
+       void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
+               GLenum format, GLsizei imageSize, const GLvoid* data);
+       void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+       void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+       GLuint CreateProgram(void);
+       GLuint CreateShader(GLenum type);
+       void CullFace(GLenum mode);
+       void DeleteBuffers(GLsizei n, const GLuint* buffers);
+       void DeleteFencesNV(GLsizei n, const GLuint* fences);
+       void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
+       void DeleteProgram(GLuint program);
+       void DeleteQueriesEXT(GLsizei n, const GLuint *ids);
+       void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
+       void DeleteShader(GLuint shader);
+       void DeleteTextures(GLsizei n, const GLuint* textures);
+       void DepthFunc(GLenum func);
+       void DepthMask(GLboolean flag);
+       void DepthRangef(GLclampf zNear, GLclampf zFar);
+       void DetachShader(GLuint program, GLuint shader);
+       void Disable(GLenum cap);
+       void DisableVertexAttribArray(GLuint index);
+       void DrawArrays(GLenum mode, GLint first, GLsizei count);
+       void DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+       void DrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
+       void DrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
+       void VertexAttribDivisorEXT(GLuint index, GLuint divisor);
+       void DrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
+       void DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
+       void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+       void Enable(GLenum cap);
+       void EnableVertexAttribArray(GLuint index);
+       void EndQueryEXT(GLenum target);
+       void FinishFenceNV(GLuint fence);
+       void Finish(void);
+       void Flush(void);
+       void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+       void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+       void FrontFace(GLenum mode);
+       void GenBuffers(GLsizei n, GLuint* buffers);
+       void GenerateMipmap(GLenum target);
+       void GenFencesNV(GLsizei n, GLuint* fences);
+       void GenFramebuffers(GLsizei n, GLuint* framebuffers);
+       void GenQueriesEXT(GLsizei n, GLuint* ids);
+       void GenRenderbuffers(GLsizei n, GLuint* renderbuffers);
+       void GenTextures(GLsizei n, GLuint* textures);
+       void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+       void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+       void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+       int GetAttribLocation(GLuint program, const GLchar* name);
+       void GetBooleanv(GLenum pname, GLboolean* params);
+       void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
+       GLenum GetError(void);
+       void GetFenceivNV(GLuint fence, GLenum pname, GLint *params);
+       void GetFloatv(GLenum pname, GLfloat* params);
+       void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
+       GLenum GetGraphicsResetStatusEXT(void);
+       void GetIntegerv(GLenum pname, GLint* params);
+       void GetProgramiv(GLuint program, GLenum pname, GLint* params);
+       void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+       void GetQueryivEXT(GLenum target, GLenum pname, GLint *params);
+       void GetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params);
+       void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
+       void GetShaderiv(GLuint shader, GLenum pname, GLint* params);
+       void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+       void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+       void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+       const GLubyte* GetString(GLenum name);
+       void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
+       void GetTexParameteriv(GLenum target, GLenum pname, GLint* params);
+       void GetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
+       void GetUniformfv(GLuint program, GLint location, GLfloat* params);
+       void GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params);
+       void GetUniformiv(GLuint program, GLint location, GLint* params);
+       int GetUniformLocation(GLuint program, const GLchar* name);
+       void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
+       void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
+       void GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
+       void Hint(GLenum target, GLenum mode);
+       GLboolean IsBuffer(GLuint buffer);
+       GLboolean IsEnabled(GLenum cap);
+       GLboolean IsFenceNV(GLuint fence);
+       GLboolean IsFramebuffer(GLuint framebuffer);
+       GLboolean IsProgram(GLuint program);
+       GLboolean IsQueryEXT(GLuint name);
+       GLboolean IsRenderbuffer(GLuint renderbuffer);
+       GLboolean IsShader(GLuint shader);
+       GLboolean IsTexture(GLuint texture);
+       void LineWidth(GLfloat width);
+       void LinkProgram(GLuint program);
+       void PixelStorei(GLenum pname, GLint param);
+       void PolygonOffset(GLfloat factor, GLfloat units);
+       void ReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
+               GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+       void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+       void ReleaseShaderCompiler(void);
+       void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+       void RenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+       void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+       void SampleCoverage(GLclampf value, GLboolean invert);
+       void SetFenceNV(GLuint fence, GLenum condition);
+       void Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
+       void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
+       void ShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length);
+       void StencilFunc(GLenum func, GLint ref, GLuint mask);
+       void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+       void StencilMask(GLuint mask);
+       void StencilMaskSeparate(GLenum face, GLuint mask);
+       void StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+       void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+       GLboolean TestFenceNV(GLuint fence);
+       void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
+               GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+       void TexParameterf(GLenum target, GLenum pname, GLfloat param);
+       void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
+       void TexParameteri(GLenum target, GLenum pname, GLint param);
+       void TexParameteriv(GLenum target, GLenum pname, const GLint* params);
+       void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
+               GLenum format, GLenum type, const GLvoid* pixels);
+       void Uniform1f(GLint location, GLfloat x);
+       void Uniform1fv(GLint location, GLsizei count, const GLfloat* v);
+       void Uniform1i(GLint location, GLint x);
+       void Uniform1iv(GLint location, GLsizei count, const GLint* v);
+       void Uniform2f(GLint location, GLfloat x, GLfloat y);
+       void Uniform2fv(GLint location, GLsizei count, const GLfloat* v);
+       void Uniform2i(GLint location, GLint x, GLint y);
+       void Uniform2iv(GLint location, GLsizei count, const GLint* v);
+       void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
+       void Uniform3fv(GLint location, GLsizei count, const GLfloat* v);
+       void Uniform3i(GLint location, GLint x, GLint y, GLint z);
+       void Uniform3iv(GLint location, GLsizei count, const GLint* v);
+       void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+       void Uniform4fv(GLint location, GLsizei count, const GLfloat* v);
+       void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
+       void Uniform4iv(GLint location, GLsizei count, const GLint* v);
+       void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+       void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+       void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+       void UseProgram(GLuint program);
+       void ValidateProgram(GLuint program);
+       void VertexAttrib1f(GLuint index, GLfloat x);
+       void VertexAttrib1fv(GLuint index, const GLfloat* values);
+       void VertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+       void VertexAttrib2fv(GLuint index, const GLfloat* values);
+       void VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+       void VertexAttrib3fv(GLuint index, const GLfloat* values);
+       void VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+       void VertexAttrib4fv(GLuint index, const GLfloat* values);
+       void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
+       void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
+       void BlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+       void BlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+               GLbitfield mask, GLenum filter);
+       void TexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
+               GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+       void TexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+       void CopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+       void CompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+       void CompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+       void FramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+       void EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
+       void EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
+       GLboolean IsRenderbufferOES(GLuint renderbuffer);
+       void BindRenderbufferOES(GLenum target, GLuint renderbuffer);
+       void DeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
+       void GenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
+       void RenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+       void GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
+       GLboolean IsFramebufferOES(GLuint framebuffer);
+       void BindFramebufferOES(GLenum target, GLuint framebuffer);
+       void DeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
+       void GenFramebuffersOES(GLsizei n, GLuint* framebuffers);
+       GLenum CheckFramebufferStatusOES(GLenum target);
+       void FramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+       void FramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+       void GetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
+       void GenerateMipmapOES(GLenum target);
+       void DrawBuffersEXT(GLsizei n, const GLenum *bufs);
+       void ReadBuffer(GLenum src);
+       void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+       void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *data);
+       void TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+       void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+       void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+       void CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+       void GenQueries(GLsizei n, GLuint *ids);
+       void DeleteQueries(GLsizei n, const GLuint *ids);
+       GLboolean IsQuery(GLuint id);
+       void BeginQuery(GLenum target, GLuint id);
+       void EndQuery(GLenum target);
+       void GetQueryiv(GLenum target, GLenum pname, GLint *params);
+       void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
+       GLboolean UnmapBuffer(GLenum target);
+       void GetBufferPointerv(GLenum target, GLenum pname, void **params);
+       void DrawBuffers(GLsizei n, const GLenum *bufs);
+       void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+       void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+       void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+       void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+       void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+       void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+       void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+       void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+       void *MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+       void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
+       void BindVertexArray(GLuint array);
+       void BindVertexArrayOES(GLuint array);
+       void DeleteVertexArrays(GLsizei n, const GLuint *arrays);
+       void DeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
+       void GenVertexArrays(GLsizei n, GLuint *arrays);
+       void GenVertexArraysOES(GLsizei n, GLuint *arrays);
+       GLboolean IsVertexArray(GLuint array);
+       GLboolean IsVertexArrayOES(GLuint array);
+       void GetIntegeri_v(GLenum target, GLuint index, GLint *data);
+       void BeginTransformFeedback(GLenum primitiveMode);
+       void EndTransformFeedback(void);
+       void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+       void BindBufferBase(GLenum target, GLuint index, GLuint buffer);
+       void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
+       void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+       void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+       void GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
+       void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
+       void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
+       void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+       void VertexAttribI4iv(GLuint index, const GLint *v);
+       void VertexAttribI4uiv(GLuint index, const GLuint *v);
+       void GetUniformuiv(GLuint program, GLint location, GLuint *params);
+       GLint GetFragDataLocation(GLuint program, const GLchar *name);
+       void Uniform1ui(GLint location, GLuint v0);
+       void Uniform2ui(GLint location, GLuint v0, GLuint v1);
+       void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+       void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+       void Uniform1uiv(GLint location, GLsizei count, const GLuint *value);
+       void Uniform2uiv(GLint location, GLsizei count, const GLuint *value);
+       void Uniform3uiv(GLint location, GLsizei count, const GLuint *value);
+       void Uniform4uiv(GLint location, GLsizei count, const GLuint *value);
+       void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
+       void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
+       void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+       void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+       const GLubyte *GetStringi(GLenum name, GLuint index);
+       void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+       void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
+       void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+       GLuint GetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
+       void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+       void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+       void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+       void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
+       void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
+       GLsync FenceSync(GLenum condition, GLbitfield flags);
+       GLboolean IsSync(GLsync sync);
+       void DeleteSync(GLsync sync);
+       GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+       void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+       void GetInteger64v(GLenum pname, GLint64 *data);
+       void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+       void GetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
+       void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
+       void GenSamplers(GLsizei count, GLuint *samplers);
+       void DeleteSamplers(GLsizei count, const GLuint *samplers);
+       GLboolean IsSampler(GLuint sampler);
+       void BindSampler(GLuint unit, GLuint sampler);
+       void SamplerParameteri(GLuint sampler, GLenum pname, GLint param);
+       void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
+       void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
+       void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
+       void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
+       void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
+       void VertexAttribDivisor(GLuint index, GLuint divisor);
+       void BindTransformFeedback(GLenum target, GLuint id);
+       void DeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
+       void GenTransformFeedbacks(GLsizei n, GLuint *ids);
+       GLboolean IsTransformFeedback(GLuint id);
+       void PauseTransformFeedback(void);
+       void ResumeTransformFeedback(void);
+       void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+       void ProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+       void ProgramParameteri(GLuint program, GLenum pname, GLint value);
+       void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+       void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+       void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+       void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+       void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+}
+
+#endif   // LIBGLESV2_ENTRY_POINTS_H_
index 209853a..ef00cc3 100644 (file)
@@ -42,7 +42,7 @@ namespace es2
 
 static bool validImageSize(GLint level, GLsizei width, GLsizei height)
 {
-       if(level < 0 || level >= es2::IMPLEMENTATION_MAX_TEXTURE_LEVELS || width < 0 || height < 0)
+       if(level < 0 || level >= IMPLEMENTATION_MAX_TEXTURE_LEVELS || width < 0 || height < 0)
        {
                return false;
        }
@@ -50,6 +50,13 @@ static bool validImageSize(GLint level, GLsizei width, GLsizei height)
        return true;
 }
 
+}
+
+namespace gl
+{
+
+using namespace es2;
+
 void ActiveTexture(GLenum texture)
 {
        TRACE("(GLenum texture = 0x%X)", texture);
@@ -311,11 +318,6 @@ void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
        }
 }
 
-void BlendEquation(GLenum mode)
-{
-       glBlendEquationSeparate(mode, mode);
-}
-
 void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
 {
        TRACE("(GLenum modeRGB = 0x%X, GLenum modeAlpha = 0x%X)", modeRGB, modeAlpha);
@@ -352,9 +354,9 @@ void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
        }
 }
 
-void BlendFunc(GLenum sfactor, GLenum dfactor)
+void BlendEquation(GLenum mode)
 {
-       glBlendFuncSeparate(sfactor, dfactor, sfactor, dfactor);
+       BlendEquationSeparate(mode, mode);
 }
 
 void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
@@ -460,6 +462,11 @@ void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dst
        }
 }
 
+void BlendFunc(GLenum sfactor, GLenum dfactor)
+{
+       BlendFuncSeparate(sfactor, dfactor, sfactor, dfactor);
+}
+
 void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
 {
        size = static_cast<GLint>(size);   // Work around issues with some 64-bit applications
@@ -4331,11 +4338,6 @@ void ShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, con
        }
 }
 
-void StencilFunc(GLenum func, GLint ref, GLuint mask)
-{
-       glStencilFuncSeparate(GL_FRONT_AND_BACK, func, ref, mask);
-}
-
 void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
 {
        TRACE("(GLenum face = 0x%X, GLenum func = 0x%X, GLint ref = %d, GLuint mask = %d)", face, func, ref, mask);
@@ -4381,9 +4383,9 @@ void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
        }
 }
 
-void StencilMask(GLuint mask)
+void StencilFunc(GLenum func, GLint ref, GLuint mask)
 {
-       glStencilMaskSeparate(GL_FRONT_AND_BACK, mask);
+       StencilFuncSeparate(GL_FRONT_AND_BACK, func, ref, mask);
 }
 
 void StencilMaskSeparate(GLenum face, GLuint mask)
@@ -4416,9 +4418,9 @@ void StencilMaskSeparate(GLenum face, GLuint mask)
        }
 }
 
-void StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+void StencilMask(GLuint mask)
 {
-       glStencilOpSeparate(GL_FRONT_AND_BACK, fail, zfail, zpass);
+       StencilMaskSeparate(GL_FRONT_AND_BACK, mask);
 }
 
 void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
@@ -4497,6 +4499,11 @@ void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
        }
 }
 
+void StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+       StencilOpSeparate(GL_FRONT_AND_BACK, fail, zfail, zpass);
+}
+
 GLboolean TestFenceNV(GLuint fence)
 {
        TRACE("(GLuint fence = %d)", fence);
@@ -4749,7 +4756,7 @@ void TexParameterf(GLenum target, GLenum pname, GLfloat param)
 
 void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
 {
-       glTexParameterf(target, pname, *params);
+       TexParameterf(target, pname, *params);
 }
 
 void TexParameteri(GLenum target, GLenum pname, GLint param)
@@ -4884,7 +4891,7 @@ void TexParameteri(GLenum target, GLenum pname, GLint param)
 
 void TexParameteriv(GLenum target, GLenum pname, const GLint* params)
 {
-       glTexParameteri(target, pname, *params);
+       TexParameteri(target, pname, *params);
 }
 
 void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
@@ -4959,11 +4966,6 @@ void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLs
        }
 }
 
-void Uniform1f(GLint location, GLfloat x)
-{
-       glUniform1fv(location, 1, &x);
-}
-
 void Uniform1fv(GLint location, GLsizei count, const GLfloat* v)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, const GLfloat* v = %p)", location, count, v);
@@ -4996,9 +4998,9 @@ void Uniform1fv(GLint location, GLsizei count, const GLfloat* v)
        }
 }
 
-void Uniform1i(GLint location, GLint x)
+void Uniform1f(GLint location, GLfloat x)
 {
-       glUniform1iv(location, 1, &x);
+       Uniform1fv(location, 1, &x);
 }
 
 void Uniform1iv(GLint location, GLsizei count, const GLint* v)
@@ -5033,11 +5035,9 @@ void Uniform1iv(GLint location, GLsizei count, const GLint* v)
        }
 }
 
-void Uniform2f(GLint location, GLfloat x, GLfloat y)
+void Uniform1i(GLint location, GLint x)
 {
-       GLfloat xy[2] = {x, y};
-
-       glUniform2fv(location, 1, (GLfloat*)&xy);
+       Uniform1iv(location, 1, &x);
 }
 
 void Uniform2fv(GLint location, GLsizei count, const GLfloat* v)
@@ -5072,11 +5072,11 @@ void Uniform2fv(GLint location, GLsizei count, const GLfloat* v)
        }
 }
 
-void Uniform2i(GLint location, GLint x, GLint y)
+void Uniform2f(GLint location, GLfloat x, GLfloat y)
 {
-       GLint xy[4] = {x, y};
+       GLfloat xy[2] = {x, y};
 
-       glUniform2iv(location, 1, (GLint*)&xy);
+       Uniform2fv(location, 1, (GLfloat*)&xy);
 }
 
 void Uniform2iv(GLint location, GLsizei count, const GLint* v)
@@ -5111,11 +5111,11 @@ void Uniform2iv(GLint location, GLsizei count, const GLint* v)
        }
 }
 
-void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
+void Uniform2i(GLint location, GLint x, GLint y)
 {
-       GLfloat xyz[3] = {x, y, z};
+       GLint xy[4] = {x, y};
 
-       glUniform3fv(location, 1, (GLfloat*)&xyz);
+       Uniform2iv(location, 1, (GLint*)&xy);
 }
 
 void Uniform3fv(GLint location, GLsizei count, const GLfloat* v)
@@ -5150,11 +5150,11 @@ void Uniform3fv(GLint location, GLsizei count, const GLfloat* v)
        }
 }
 
-void Uniform3i(GLint location, GLint x, GLint y, GLint z)
+void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
 {
-       GLint xyz[3] = {x, y, z};
+       GLfloat xyz[3] = {x, y, z};
 
-       glUniform3iv(location, 1, (GLint*)&xyz);
+       Uniform3fv(location, 1, (GLfloat*)&xyz);
 }
 
 void Uniform3iv(GLint location, GLsizei count, const GLint* v)
@@ -5189,11 +5189,11 @@ void Uniform3iv(GLint location, GLsizei count, const GLint* v)
        }
 }
 
-void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+void Uniform3i(GLint location, GLint x, GLint y, GLint z)
 {
-       GLfloat xyzw[4] = {x, y, z, w};
+       GLint xyz[3] = {x, y, z};
 
-       glUniform4fv(location, 1, (GLfloat*)&xyzw);
+       Uniform3iv(location, 1, (GLint*)&xyz);
 }
 
 void Uniform4fv(GLint location, GLsizei count, const GLfloat* v)
@@ -5228,11 +5228,11 @@ void Uniform4fv(GLint location, GLsizei count, const GLfloat* v)
        }
 }
 
-void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
+void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 {
-       GLint xyzw[4] = {x, y, z, w};
+       GLfloat xyzw[4] = {x, y, z, w};
 
-       glUniform4iv(location, 1, (GLint*)&xyzw);
+       Uniform4fv(location, 1, (GLfloat*)&xyzw);
 }
 
 void Uniform4iv(GLint location, GLsizei count, const GLint* v)
@@ -5267,6 +5267,13 @@ void Uniform4iv(GLint location, GLsizei count, const GLint* v)
        }
 }
 
+void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
+{
+       GLint xyzw[4] = {x, y, z, w};
+
+       Uniform4iv(location, 1, (GLint*)&xyzw);
+}
+
 void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat* value = %p)",
@@ -5650,7 +5657,7 @@ void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
        }
 }
 
-static void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter, bool allowPartialDepthStencilBlit)
+static void BlitFramebufferSW(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter, bool allowPartialDepthStencilBlit)
 {
        TRACE("(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, "
              "GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, "
@@ -5686,7 +5693,7 @@ static void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
 
 void BlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
 {
-       BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, true);
+       BlitFramebufferSW(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, true);
 }
 
 void BlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
@@ -5698,7 +5705,7 @@ void BlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GL
                return error(GL_INVALID_OPERATION);
        }
 
-       BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, false);
+       BlitFramebufferSW(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, false);
 }
 
 void TexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
@@ -6267,6 +6274,8 @@ void DrawBuffersEXT(GLsizei n, const GLenum *bufs)
 
 }
 
+#include "entry_points.h"
+
 extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetProcAddress(const char *procname)
 {
        struct Function
@@ -6277,300 +6286,299 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP
 
        static const Function glFunctions[] =
        {
-               #define FUNCTION(name) {#name, (__eglMustCastToProperFunctionPointerType)name}
-
-               FUNCTION(glActiveTexture),
-               FUNCTION(glAttachShader),
-               FUNCTION(glBeginQuery),
-               FUNCTION(glBeginQueryEXT),
-               FUNCTION(glBeginTransformFeedback),
-               FUNCTION(glBindAttribLocation),
-               FUNCTION(glBindBuffer),
-               FUNCTION(glBindBufferBase),
-               FUNCTION(glBindBufferRange),
-               FUNCTION(glBindFramebuffer),
-               FUNCTION(glBindFramebufferOES),
-               FUNCTION(glBindRenderbuffer),
-               FUNCTION(glBindRenderbufferOES),
-               FUNCTION(glBindSampler),
-               FUNCTION(glBindTexture),
-               FUNCTION(glBindTransformFeedback),
-               FUNCTION(glBindVertexArray),
-               FUNCTION(glBindVertexArrayOES),
-               FUNCTION(glBlendColor),
-               FUNCTION(glBlendEquation),
-               FUNCTION(glBlendEquationSeparate),
-               FUNCTION(glBlendFunc),
-               FUNCTION(glBlendFuncSeparate),
-               FUNCTION(glBlitFramebuffer),
-               FUNCTION(glBlitFramebufferANGLE),
-               FUNCTION(glBufferData),
-               FUNCTION(glBufferSubData),
-               FUNCTION(glCheckFramebufferStatus),
-               FUNCTION(glCheckFramebufferStatusOES),
-               FUNCTION(glClear),
-               FUNCTION(glClearBufferfi),
-               FUNCTION(glClearBufferfv),
-               FUNCTION(glClearBufferiv),
-               FUNCTION(glClearBufferuiv),
-               FUNCTION(glClearColor),
-               FUNCTION(glClearDepthf),
-               FUNCTION(glClearStencil),
-               FUNCTION(glClientWaitSync),
-               FUNCTION(glColorMask),
-               FUNCTION(glCompileShader),
-               FUNCTION(glCompressedTexImage2D),
-               FUNCTION(glCompressedTexImage3D),
-               FUNCTION(glCompressedTexSubImage2D),
-               FUNCTION(glCompressedTexSubImage3D),
-               FUNCTION(glCopyBufferSubData),
-               FUNCTION(glCopyTexImage2D),
-               FUNCTION(glCopyTexSubImage2D),
-               FUNCTION(glCopyTexSubImage3D),
-               FUNCTION(glCreateProgram),
-               FUNCTION(glCreateShader),
-               FUNCTION(glCullFace),
-               FUNCTION(glDeleteBuffers),
-               FUNCTION(glDeleteFencesNV),
-               FUNCTION(glDeleteFramebuffers),
-               FUNCTION(glDeleteFramebuffersOES),
-               FUNCTION(glDeleteProgram),
-               FUNCTION(glDeleteQueries),
-               FUNCTION(glDeleteQueriesEXT),
-               FUNCTION(glDeleteRenderbuffers),
-               FUNCTION(glDeleteRenderbuffersOES),
-               FUNCTION(glDeleteSamplers),
-               FUNCTION(glDeleteShader),
-               FUNCTION(glDeleteSync),
-               FUNCTION(glDeleteTextures),
-               FUNCTION(glDeleteTransformFeedbacks),
-               FUNCTION(glDeleteVertexArrays),
-               FUNCTION(glDeleteVertexArraysOES),
-               FUNCTION(glDepthFunc),
-               //FUNCTION(DepthFunc),
-               FUNCTION(glDepthMask),
-               FUNCTION(glDepthRangef),
-               FUNCTION(glDetachShader),
-               FUNCTION(glDisable),
-               FUNCTION(glDisableVertexAttribArray),
-               FUNCTION(glDrawArrays),
-               FUNCTION(glDrawArraysInstanced),
-               FUNCTION(glDrawBuffers),
-               FUNCTION(glDrawBuffersEXT),
-               FUNCTION(glDrawElements),
-               FUNCTION(glDrawElementsInstanced),
-               FUNCTION(glDrawRangeElements),
-               FUNCTION(glEGLImageTargetRenderbufferStorageOES),
-               FUNCTION(glEGLImageTargetTexture2DOES),
-               FUNCTION(glEnable),
-               FUNCTION(glEnableVertexAttribArray),
-               FUNCTION(glEndQuery),
-               FUNCTION(glEndQueryEXT),
-               FUNCTION(glEndTransformFeedback),
-               FUNCTION(glFenceSync),
-               FUNCTION(glFinish),
-               FUNCTION(glFinishFenceNV),
-               FUNCTION(glFlush),
-               FUNCTION(glFlushMappedBufferRange),
-               FUNCTION(glFramebufferRenderbuffer),
-               FUNCTION(glFramebufferRenderbufferOES),
-               FUNCTION(glFramebufferTexture2D),
-               FUNCTION(glFramebufferTexture2DOES),
-               FUNCTION(glFramebufferTextureLayer),
-               FUNCTION(glFrontFace),
-               FUNCTION(glGenBuffers),
-               FUNCTION(glGenFencesNV),
-               FUNCTION(glGenFramebuffers),
-               FUNCTION(glGenFramebuffersOES),
-               FUNCTION(glGenQueries),
-               FUNCTION(glGenQueriesEXT),
-               FUNCTION(glGenRenderbuffers),
-               FUNCTION(glGenRenderbuffersOES),
-               FUNCTION(glGenSamplers),
-               FUNCTION(glGenTextures),
-               FUNCTION(glGenTransformFeedbacks),
-               FUNCTION(glGenVertexArrays),
-               FUNCTION(glGenVertexArraysOES),
-               FUNCTION(glGenerateMipmap),
-               FUNCTION(glGenerateMipmapOES),
-               FUNCTION(glGetActiveAttrib),
-               FUNCTION(glGetActiveUniform),
-               FUNCTION(glGetActiveUniformBlockName),
-               FUNCTION(glGetActiveUniformBlockiv),
-               FUNCTION(glGetActiveUniformsiv),
-               FUNCTION(glGetAttachedShaders),
-               FUNCTION(glGetAttribLocation),
-               FUNCTION(glGetBooleanv),
-               FUNCTION(glGetBufferParameteri64v),
-               FUNCTION(glGetBufferParameteriv),
-               FUNCTION(glGetBufferPointerv),
-               FUNCTION(glGetError),
-               FUNCTION(glGetFenceivNV),
-               FUNCTION(glGetFloatv),
-               FUNCTION(glGetFragDataLocation),
-               FUNCTION(glGetFramebufferAttachmentParameteriv),
-               FUNCTION(glGetFramebufferAttachmentParameterivOES),
-               FUNCTION(glGetGraphicsResetStatusEXT),
-               FUNCTION(glGetInteger64i_v),
-               FUNCTION(glGetInteger64v),
-               FUNCTION(glGetIntegeri_v),
-               FUNCTION(glGetIntegerv),
-               FUNCTION(glGetInternalformativ),
-               FUNCTION(glGetProgramBinary),
-               FUNCTION(glGetProgramInfoLog),
-               FUNCTION(glGetProgramiv),
-               FUNCTION(glGetQueryObjectuiv),
-               FUNCTION(glGetQueryObjectuivEXT),
-               FUNCTION(glGetQueryiv),
-               FUNCTION(glGetQueryivEXT),
-               FUNCTION(glGetRenderbufferParameteriv),
-               FUNCTION(glGetRenderbufferParameterivOES),
-               FUNCTION(glGetSamplerParameterfv),
-               FUNCTION(glGetSamplerParameteriv),
-               FUNCTION(glGetShaderInfoLog),
-               FUNCTION(glGetShaderPrecisionFormat),
-               FUNCTION(glGetShaderSource),
-               FUNCTION(glGetShaderiv),
-               FUNCTION(glGetString),
-               FUNCTION(glGetStringi),
-               FUNCTION(glGetSynciv),
-               FUNCTION(glGetTexParameterfv),
-               FUNCTION(glGetTexParameteriv),
-               FUNCTION(glGetTransformFeedbackVarying),
-               FUNCTION(glGetUniformBlockIndex),
-               FUNCTION(glGetUniformIndices),
-               FUNCTION(glGetUniformLocation),
-               FUNCTION(glGetUniformfv),
-               FUNCTION(glGetUniformiv),
-               FUNCTION(glGetUniformuiv),
-               FUNCTION(glGetVertexAttribIiv),
-               FUNCTION(glGetVertexAttribIuiv),
-               FUNCTION(glGetVertexAttribPointerv),
-               FUNCTION(glGetVertexAttribfv),
-               FUNCTION(glGetVertexAttribiv),
-               FUNCTION(glGetnUniformfvEXT),
-               FUNCTION(glGetnUniformivEXT),
-               FUNCTION(glHint),
-               FUNCTION(glInvalidateFramebuffer),
-               FUNCTION(glInvalidateSubFramebuffer),
-               FUNCTION(glIsBuffer),
-               FUNCTION(glIsEnabled),
-               FUNCTION(glIsFenceNV),
-               FUNCTION(glIsFramebuffer),
-               FUNCTION(glIsFramebufferOES),
-               FUNCTION(glIsProgram),
-               FUNCTION(glIsQuery),
-               FUNCTION(glIsQueryEXT),
-               FUNCTION(glIsRenderbuffer),
-               FUNCTION(glIsRenderbufferOES),
-               FUNCTION(glIsSampler),
-               FUNCTION(glIsShader),
-               FUNCTION(glIsSync),
-               FUNCTION(glIsTexture),
-               FUNCTION(glIsTransformFeedback),
-               FUNCTION(glIsVertexArray),
-               FUNCTION(glIsVertexArrayOES),
-               FUNCTION(glLineWidth),
-               FUNCTION(glLinkProgram),
-               FUNCTION(glMapBufferRange),
-               FUNCTION(glPauseTransformFeedback),
-               FUNCTION(glPixelStorei),
-               FUNCTION(glPolygonOffset),
-               FUNCTION(glProgramBinary),
-               FUNCTION(glProgramParameteri),
-               FUNCTION(glReadBuffer),
-               FUNCTION(glReadPixels),
-               FUNCTION(glReadnPixelsEXT),
-               FUNCTION(glReleaseShaderCompiler),
-               FUNCTION(glRenderbufferStorage),
-               FUNCTION(glRenderbufferStorageMultisample),
-               FUNCTION(glRenderbufferStorageMultisampleANGLE),
-               FUNCTION(glRenderbufferStorageOES),
-               FUNCTION(glResumeTransformFeedback),
-               FUNCTION(glSampleCoverage),
-               FUNCTION(glSamplerParameterf),
-               FUNCTION(glSamplerParameterfv),
-               FUNCTION(glSamplerParameteri),
-               FUNCTION(glSamplerParameteriv),
-               FUNCTION(glScissor),
-               FUNCTION(glSetFenceNV),
-               FUNCTION(glShaderBinary),
-               FUNCTION(glShaderSource),
-               FUNCTION(glStencilFunc),
-               FUNCTION(glStencilFuncSeparate),
-               FUNCTION(glStencilMask),
-               FUNCTION(glStencilMaskSeparate),
-               FUNCTION(glStencilOp),
-               FUNCTION(glStencilOpSeparate),
-               FUNCTION(glTestFenceNV),
-               FUNCTION(glTexImage2D),
-               FUNCTION(glTexImage3D),
-               FUNCTION(glTexImage3DOES),
-               FUNCTION(glTexParameterf),
-               FUNCTION(glTexParameterfv),
-               FUNCTION(glTexParameteri),
-               FUNCTION(glTexParameteriv),
-               FUNCTION(glTexStorage2D),
-               FUNCTION(glTexStorage3D),
-               FUNCTION(glTexSubImage2D),
-               FUNCTION(glTexSubImage3D),
-               FUNCTION(glTransformFeedbackVaryings),
-               FUNCTION(glUniform1f),
-               FUNCTION(glUniform1fv),
-               FUNCTION(glUniform1i),
-               FUNCTION(glUniform1iv),
-               FUNCTION(glUniform1ui),
-               FUNCTION(glUniform1uiv),
-               FUNCTION(glUniform2f),
-               FUNCTION(glUniform2fv),
-               FUNCTION(glUniform2i),
-               FUNCTION(glUniform2iv),
-               FUNCTION(glUniform2ui),
-               FUNCTION(glUniform2uiv),
-               FUNCTION(glUniform3f),
-               FUNCTION(glUniform3fv),
-               FUNCTION(glUniform3i),
-               FUNCTION(glUniform3iv),
-               FUNCTION(glUniform3ui),
-               FUNCTION(glUniform3uiv),
-               FUNCTION(glUniform4f),
-               FUNCTION(glUniform4fv),
-               FUNCTION(glUniform4i),
-               FUNCTION(glUniform4iv),
-               FUNCTION(glUniform4ui),
-               FUNCTION(glUniform4uiv),
-               FUNCTION(glUniformBlockBinding),
-               FUNCTION(glUniformMatrix2fv),
-               FUNCTION(glUniformMatrix2x3fv),
-               FUNCTION(glUniformMatrix2x4fv),
-               FUNCTION(glUniformMatrix3fv),
-               FUNCTION(glUniformMatrix3x2fv),
-               FUNCTION(glUniformMatrix3x4fv),
-               FUNCTION(glUniformMatrix4fv),
-               FUNCTION(glUniformMatrix4x2fv),
-               FUNCTION(glUniformMatrix4x3fv),
-               FUNCTION(glUnmapBuffer),
-               FUNCTION(glUseProgram),
-               FUNCTION(glValidateProgram),
-               FUNCTION(glVertexAttrib1f),
-               FUNCTION(glVertexAttrib1fv),
-               FUNCTION(glVertexAttrib2f),
-               FUNCTION(glVertexAttrib2fv),
-               FUNCTION(glVertexAttrib3f),
-               FUNCTION(glVertexAttrib3fv),
-               FUNCTION(glVertexAttrib4f),
-               FUNCTION(glVertexAttrib4fv),
-               FUNCTION(glVertexAttribDivisor),
-               FUNCTION(glVertexAttribDivisorANGLE),
-               FUNCTION(glVertexAttribDivisorEXT),
-               FUNCTION(glVertexAttribI4i),
-               FUNCTION(glVertexAttribI4iv),
-               FUNCTION(glVertexAttribI4ui),
-               FUNCTION(glVertexAttribI4uiv),
-               FUNCTION(glVertexAttribIPointer),
-               FUNCTION(glVertexAttribPointer),
-               FUNCTION(glViewport),
-               FUNCTION(glWaitSync),
+               #define FUNCTION(name) {"gl" #name, (__eglMustCastToProperFunctionPointerType)gl::name}
+
+               FUNCTION(ActiveTexture),
+               FUNCTION(AttachShader),
+               FUNCTION(BeginQuery),
+               FUNCTION(BeginQueryEXT),
+               FUNCTION(BeginTransformFeedback),
+               FUNCTION(BindAttribLocation),
+               FUNCTION(BindBuffer),
+               FUNCTION(BindBufferBase),
+               FUNCTION(BindBufferRange),
+               FUNCTION(BindFramebuffer),
+               FUNCTION(BindFramebufferOES),
+               FUNCTION(BindRenderbuffer),
+               FUNCTION(BindRenderbufferOES),
+               FUNCTION(BindSampler),
+               FUNCTION(BindTexture),
+               FUNCTION(BindTransformFeedback),
+               FUNCTION(BindVertexArray),
+               FUNCTION(BindVertexArrayOES),
+               FUNCTION(BlendColor),
+               FUNCTION(BlendEquation),
+               FUNCTION(BlendEquationSeparate),
+               FUNCTION(BlendFunc),
+               FUNCTION(BlendFuncSeparate),
+               FUNCTION(BlitFramebuffer),
+               FUNCTION(BlitFramebufferANGLE),
+               FUNCTION(BufferData),
+               FUNCTION(BufferSubData),
+               FUNCTION(CheckFramebufferStatus),
+               FUNCTION(CheckFramebufferStatusOES),
+               FUNCTION(Clear),
+               FUNCTION(ClearBufferfi),
+               FUNCTION(ClearBufferfv),
+               FUNCTION(ClearBufferiv),
+               FUNCTION(ClearBufferuiv),
+               FUNCTION(ClearColor),
+               FUNCTION(ClearDepthf),
+               FUNCTION(ClearStencil),
+               FUNCTION(ClientWaitSync),
+               FUNCTION(ColorMask),
+               FUNCTION(CompileShader),
+               FUNCTION(CompressedTexImage2D),
+               FUNCTION(CompressedTexImage3D),
+               FUNCTION(CompressedTexSubImage2D),
+               FUNCTION(CompressedTexSubImage3D),
+               FUNCTION(CopyBufferSubData),
+               FUNCTION(CopyTexImage2D),
+               FUNCTION(CopyTexSubImage2D),
+               FUNCTION(CopyTexSubImage3D),
+               FUNCTION(CreateProgram),
+               FUNCTION(CreateShader),
+               FUNCTION(CullFace),
+               FUNCTION(DeleteBuffers),
+               FUNCTION(DeleteFencesNV),
+               FUNCTION(DeleteFramebuffers),
+               FUNCTION(DeleteFramebuffersOES),
+               FUNCTION(DeleteProgram),
+               FUNCTION(DeleteQueries),
+               FUNCTION(DeleteQueriesEXT),
+               FUNCTION(DeleteRenderbuffers),
+               FUNCTION(DeleteRenderbuffersOES),
+               FUNCTION(DeleteSamplers),
+               FUNCTION(DeleteShader),
+               FUNCTION(DeleteSync),
+               FUNCTION(DeleteTextures),
+               FUNCTION(DeleteTransformFeedbacks),
+               FUNCTION(DeleteVertexArrays),
+               FUNCTION(DeleteVertexArraysOES),
+               FUNCTION(DepthFunc),
+               FUNCTION(DepthMask),
+               FUNCTION(DepthRangef),
+               FUNCTION(DetachShader),
+               FUNCTION(Disable),
+               FUNCTION(DisableVertexAttribArray),
+               FUNCTION(DrawArrays),
+               FUNCTION(DrawArraysInstanced),
+               FUNCTION(DrawBuffers),
+               FUNCTION(DrawBuffersEXT),
+               FUNCTION(DrawElements),
+               FUNCTION(DrawElementsInstanced),
+               FUNCTION(DrawRangeElements),
+               FUNCTION(EGLImageTargetRenderbufferStorageOES),
+               FUNCTION(EGLImageTargetTexture2DOES),
+               FUNCTION(Enable),
+               FUNCTION(EnableVertexAttribArray),
+               FUNCTION(EndQuery),
+               FUNCTION(EndQueryEXT),
+               FUNCTION(EndTransformFeedback),
+               FUNCTION(FenceSync),
+               FUNCTION(Finish),
+               FUNCTION(FinishFenceNV),
+               FUNCTION(Flush),
+               FUNCTION(FlushMappedBufferRange),
+               FUNCTION(FramebufferRenderbuffer),
+               FUNCTION(FramebufferRenderbufferOES),
+               FUNCTION(FramebufferTexture2D),
+               FUNCTION(FramebufferTexture2DOES),
+               FUNCTION(FramebufferTextureLayer),
+               FUNCTION(FrontFace),
+               FUNCTION(GenBuffers),
+               FUNCTION(GenFencesNV),
+               FUNCTION(GenFramebuffers),
+               FUNCTION(GenFramebuffersOES),
+               FUNCTION(GenQueries),
+               FUNCTION(GenQueriesEXT),
+               FUNCTION(GenRenderbuffers),
+               FUNCTION(GenRenderbuffersOES),
+               FUNCTION(GenSamplers),
+               FUNCTION(GenTextures),
+               FUNCTION(GenTransformFeedbacks),
+               FUNCTION(GenVertexArrays),
+               FUNCTION(GenVertexArraysOES),
+               FUNCTION(GenerateMipmap),
+               FUNCTION(GenerateMipmapOES),
+               FUNCTION(GetActiveAttrib),
+               FUNCTION(GetActiveUniform),
+               FUNCTION(GetActiveUniformBlockName),
+               FUNCTION(GetActiveUniformBlockiv),
+               FUNCTION(GetActiveUniformsiv),
+               FUNCTION(GetAttachedShaders),
+               FUNCTION(GetAttribLocation),
+               FUNCTION(GetBooleanv),
+               FUNCTION(GetBufferParameteri64v),
+               FUNCTION(GetBufferParameteriv),
+               FUNCTION(GetBufferPointerv),
+               FUNCTION(GetError),
+               FUNCTION(GetFenceivNV),
+               FUNCTION(GetFloatv),
+               FUNCTION(GetFragDataLocation),
+               FUNCTION(GetFramebufferAttachmentParameteriv),
+               FUNCTION(GetFramebufferAttachmentParameterivOES),
+               FUNCTION(GetGraphicsResetStatusEXT),
+               FUNCTION(GetInteger64i_v),
+               FUNCTION(GetInteger64v),
+               FUNCTION(GetIntegeri_v),
+               FUNCTION(GetIntegerv),
+               FUNCTION(GetInternalformativ),
+               FUNCTION(GetProgramBinary),
+               FUNCTION(GetProgramInfoLog),
+               FUNCTION(GetProgramiv),
+               FUNCTION(GetQueryObjectuiv),
+               FUNCTION(GetQueryObjectuivEXT),
+               FUNCTION(GetQueryiv),
+               FUNCTION(GetQueryivEXT),
+               FUNCTION(GetRenderbufferParameteriv),
+               FUNCTION(GetRenderbufferParameterivOES),
+               FUNCTION(GetSamplerParameterfv),
+               FUNCTION(GetSamplerParameteriv),
+               FUNCTION(GetShaderInfoLog),
+               FUNCTION(GetShaderPrecisionFormat),
+               FUNCTION(GetShaderSource),
+               FUNCTION(GetShaderiv),
+               FUNCTION(GetString),
+               FUNCTION(GetStringi),
+               FUNCTION(GetSynciv),
+               FUNCTION(GetTexParameterfv),
+               FUNCTION(GetTexParameteriv),
+               FUNCTION(GetTransformFeedbackVarying),
+               FUNCTION(GetUniformBlockIndex),
+               FUNCTION(GetUniformIndices),
+               FUNCTION(GetUniformLocation),
+               FUNCTION(GetUniformfv),
+               FUNCTION(GetUniformiv),
+               FUNCTION(GetUniformuiv),
+               FUNCTION(GetVertexAttribIiv),
+               FUNCTION(GetVertexAttribIuiv),
+               FUNCTION(GetVertexAttribPointerv),
+               FUNCTION(GetVertexAttribfv),
+               FUNCTION(GetVertexAttribiv),
+               FUNCTION(GetnUniformfvEXT),
+               FUNCTION(GetnUniformivEXT),
+               FUNCTION(Hint),
+               FUNCTION(InvalidateFramebuffer),
+               FUNCTION(InvalidateSubFramebuffer),
+               FUNCTION(IsBuffer),
+               FUNCTION(IsEnabled),
+               FUNCTION(IsFenceNV),
+               FUNCTION(IsFramebuffer),
+               FUNCTION(IsFramebufferOES),
+               FUNCTION(IsProgram),
+               FUNCTION(IsQuery),
+               FUNCTION(IsQueryEXT),
+               FUNCTION(IsRenderbuffer),
+               FUNCTION(IsRenderbufferOES),
+               FUNCTION(IsSampler),
+               FUNCTION(IsShader),
+               FUNCTION(IsSync),
+               FUNCTION(IsTexture),
+               FUNCTION(IsTransformFeedback),
+               FUNCTION(IsVertexArray),
+               FUNCTION(IsVertexArrayOES),
+               FUNCTION(LineWidth),
+               FUNCTION(LinkProgram),
+               FUNCTION(MapBufferRange),
+               FUNCTION(PauseTransformFeedback),
+               FUNCTION(PixelStorei),
+               FUNCTION(PolygonOffset),
+               FUNCTION(ProgramBinary),
+               FUNCTION(ProgramParameteri),
+               FUNCTION(ReadBuffer),
+               FUNCTION(ReadPixels),
+               FUNCTION(ReadnPixelsEXT),
+               FUNCTION(ReleaseShaderCompiler),
+               FUNCTION(RenderbufferStorage),
+               FUNCTION(RenderbufferStorageMultisample),
+               FUNCTION(RenderbufferStorageMultisampleANGLE),
+               FUNCTION(RenderbufferStorageOES),
+               FUNCTION(ResumeTransformFeedback),
+               FUNCTION(SampleCoverage),
+               FUNCTION(SamplerParameterf),
+               FUNCTION(SamplerParameterfv),
+               FUNCTION(SamplerParameteri),
+               FUNCTION(SamplerParameteriv),
+               FUNCTION(Scissor),
+               FUNCTION(SetFenceNV),
+               FUNCTION(ShaderBinary),
+               FUNCTION(ShaderSource),
+               FUNCTION(StencilFunc),
+               FUNCTION(StencilFuncSeparate),
+               FUNCTION(StencilMask),
+               FUNCTION(StencilMaskSeparate),
+               FUNCTION(StencilOp),
+               FUNCTION(StencilOpSeparate),
+               FUNCTION(TestFenceNV),
+               FUNCTION(TexImage2D),
+               FUNCTION(TexImage3D),
+               FUNCTION(TexImage3DOES),
+               FUNCTION(TexParameterf),
+               FUNCTION(TexParameterfv),
+               FUNCTION(TexParameteri),
+               FUNCTION(TexParameteriv),
+               FUNCTION(TexStorage2D),
+               FUNCTION(TexStorage3D),
+               FUNCTION(TexSubImage2D),
+               FUNCTION(TexSubImage3D),
+               FUNCTION(TransformFeedbackVaryings),
+               FUNCTION(Uniform1f),
+               FUNCTION(Uniform1fv),
+               FUNCTION(Uniform1i),
+               FUNCTION(Uniform1iv),
+               FUNCTION(Uniform1ui),
+               FUNCTION(Uniform1uiv),
+               FUNCTION(Uniform2f),
+               FUNCTION(Uniform2fv),
+               FUNCTION(Uniform2i),
+               FUNCTION(Uniform2iv),
+               FUNCTION(Uniform2ui),
+               FUNCTION(Uniform2uiv),
+               FUNCTION(Uniform3f),
+               FUNCTION(Uniform3fv),
+               FUNCTION(Uniform3i),
+               FUNCTION(Uniform3iv),
+               FUNCTION(Uniform3ui),
+               FUNCTION(Uniform3uiv),
+               FUNCTION(Uniform4f),
+               FUNCTION(Uniform4fv),
+               FUNCTION(Uniform4i),
+               FUNCTION(Uniform4iv),
+               FUNCTION(Uniform4ui),
+               FUNCTION(Uniform4uiv),
+               FUNCTION(UniformBlockBinding),
+               FUNCTION(UniformMatrix2fv),
+               FUNCTION(UniformMatrix2x3fv),
+               FUNCTION(UniformMatrix2x4fv),
+               FUNCTION(UniformMatrix3fv),
+               FUNCTION(UniformMatrix3x2fv),
+               FUNCTION(UniformMatrix3x4fv),
+               FUNCTION(UniformMatrix4fv),
+               FUNCTION(UniformMatrix4x2fv),
+               FUNCTION(UniformMatrix4x3fv),
+               FUNCTION(UnmapBuffer),
+               FUNCTION(UseProgram),
+               FUNCTION(ValidateProgram),
+               FUNCTION(VertexAttrib1f),
+               FUNCTION(VertexAttrib1fv),
+               FUNCTION(VertexAttrib2f),
+               FUNCTION(VertexAttrib2fv),
+               FUNCTION(VertexAttrib3f),
+               FUNCTION(VertexAttrib3fv),
+               FUNCTION(VertexAttrib4f),
+               FUNCTION(VertexAttrib4fv),
+               FUNCTION(VertexAttribDivisor),
+               FUNCTION(VertexAttribDivisorANGLE),
+               FUNCTION(VertexAttribDivisorEXT),
+               FUNCTION(VertexAttribI4i),
+               FUNCTION(VertexAttribI4iv),
+               FUNCTION(VertexAttribI4ui),
+               FUNCTION(VertexAttribI4uiv),
+               FUNCTION(VertexAttribIPointer),
+               FUNCTION(VertexAttribPointer),
+               FUNCTION(Viewport),
+               FUNCTION(WaitSync),
 
                #undef FUNCTION
        };
index 8d07c32..485f6c3 100644 (file)
@@ -295,5 +295,3 @@ EXPORTS
     glGetInternalformativ           @308
 
     libGLESv2_swiftshader
-
-       Register
index 86da3a1..9544387 100644 (file)
@@ -302,8 +302,6 @@ global:
        _ZTS*;
        _ZTI*;
 
-       Register;
-
 local:
        *;
 };
index 7bb3c72..5c0e73e 100644 (file)
@@ -386,6 +386,7 @@ copy "$(OutDir)libGLESv2.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\tr
     <ClInclude Include="Buffer.h" />\r
     <ClInclude Include="Context.h" />\r
     <ClInclude Include="Device.hpp" />\r
+    <ClInclude Include="entry_points.h" />\r
     <ClInclude Include="Fence.h" />\r
     <ClInclude Include="Framebuffer.h" />\r
     <ClInclude Include="IndexDataManager.h" />\r
index 615363b..004a944 100644 (file)
     <ClInclude Include="..\common\Surface.hpp">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="entry_points.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="libGLESv2.rc" />\r
index ce2a3c8..2669739 100644 (file)
@@ -207,10 +207,10 @@ static bool ValidateSamplerObjectParameter(GLenum pname)
        }
 }
 
-extern "C"
+namespace gl
 {
 
-GL_APICALL void GL_APIENTRY glReadBuffer(GLenum src)
+void ReadBuffer(GLenum src)
 {
        TRACE("(GLenum src = 0x%X)", src);
 
@@ -283,7 +283,7 @@ GL_APICALL void GL_APIENTRY glReadBuffer(GLenum src)
        }
 }
 
-GL_APICALL void GL_APIENTRY glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
+void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
 {
        TRACE("(GLenum mode = 0x%X, GLuint start = %d, GLuint end = %d, "
                  "GLsizei count = %d, GLenum type = 0x%x, const void* indices = %p)",
@@ -332,7 +332,7 @@ GL_APICALL void GL_APIENTRY glDrawRangeElements(GLenum mode, GLuint start, GLuin
        }
 }
 
-GL_APICALL void GL_APIENTRY glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *data)
+void TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *data)
 {
        TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, "
              "GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLint border = %d, "
@@ -392,7 +392,7 @@ GL_APICALL void GL_APIENTRY glTexImage3D(GLenum target, GLint level, GLint inter
        }
 }
 
-GL_APICALL void GL_APIENTRY glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
+void TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
 {
        TRACE("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
                "GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
@@ -440,7 +440,7 @@ GL_APICALL void GL_APIENTRY glTexSubImage3D(GLenum target, GLint level, GLint xo
        }
 }
 
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 {
        TRACE("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
                "GLint zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
@@ -503,7 +503,7 @@ GL_APICALL void GL_APIENTRY glCopyTexSubImage3D(GLenum target, GLint level, GLin
        }
 }
 
-GL_APICALL void GL_APIENTRY glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
+void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
 {
        TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, "
                "GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLsizei imageSize = %d, const GLvoid* data = %p)",
@@ -560,7 +560,7 @@ GL_APICALL void GL_APIENTRY glCompressedTexImage3D(GLenum target, GLint level, G
        }
 }
 
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+void CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
 {
        TRACE("(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
              "GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
@@ -657,7 +657,7 @@ GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D(GLenum target, GLint level
        }
 }
 
-GL_APICALL void GL_APIENTRY glGenQueries(GLsizei n, GLuint *ids)
+void GenQueries(GLsizei n, GLuint *ids)
 {
        TRACE("(GLsizei n = %d, GLuint* ids = %p)", n, ids);
 
@@ -677,7 +677,7 @@ GL_APICALL void GL_APIENTRY glGenQueries(GLsizei n, GLuint *ids)
        }
 }
 
-GL_APICALL void GL_APIENTRY glDeleteQueries(GLsizei n, const GLuint *ids)
+void DeleteQueries(GLsizei n, const GLuint *ids)
 {
        TRACE("(GLsizei n = %d, GLuint* ids = %p)", n, ids);
 
@@ -697,7 +697,7 @@ GL_APICALL void GL_APIENTRY glDeleteQueries(GLsizei n, const GLuint *ids)
        }
 }
 
-GL_APICALL GLboolean GL_APIENTRY glIsQuery(GLuint id)
+GLboolean IsQuery(GLuint id)
 {
        TRACE("(GLuint id = %d)", id);
 
@@ -721,7 +721,7 @@ GL_APICALL GLboolean GL_APIENTRY glIsQuery(GLuint id)
        return GL_FALSE;
 }
 
-GL_APICALL void GL_APIENTRY glBeginQuery(GLenum target, GLuint id)
+void BeginQuery(GLenum target, GLuint id)
 {
        TRACE("(GLenum target = 0x%X, GLuint id = %d)", target, id);
 
@@ -743,7 +743,7 @@ GL_APICALL void GL_APIENTRY glBeginQuery(GLenum target, GLuint id)
        }
 }
 
-GL_APICALL void GL_APIENTRY glEndQuery(GLenum target)
+void EndQuery(GLenum target)
 {
        TRACE("(GLenum target = 0x%X)", target);
 
@@ -760,7 +760,7 @@ GL_APICALL void GL_APIENTRY glEndQuery(GLenum target)
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+void GetQueryiv(GLenum target, GLenum pname, GLint *params)
 {
        TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = %p)",
                  target, pname, params);
@@ -778,7 +778,7 @@ GL_APICALL void GL_APIENTRY glGetQueryiv(GLenum target, GLenum pname, GLint *par
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+void GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
 {
        TRACE("(GLuint id = %d, GLenum pname = 0x%X, GLint *params = %p)",
              id, pname, params);
@@ -822,7 +822,7 @@ GL_APICALL void GL_APIENTRY glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint
        }
 }
 
-GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer(GLenum target)
+GLboolean UnmapBuffer(GLenum target)
 {
        TRACE("(GLenum target = 0x%X)", target);
 
@@ -854,7 +854,7 @@ GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer(GLenum target)
        return GL_TRUE;
 }
 
-GL_APICALL void GL_APIENTRY glGetBufferPointerv(GLenum target, GLenum pname, void **params)
+void GetBufferPointerv(GLenum target, GLenum pname, void **params)
 {
        TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = %p)",
              target, pname, params);
@@ -884,7 +884,7 @@ GL_APICALL void GL_APIENTRY glGetBufferPointerv(GLenum target, GLenum pname, voi
        }
 }
 
-GL_APICALL void GL_APIENTRY glDrawBuffers(GLsizei n, const GLenum *bufs)
+void DrawBuffers(GLsizei n, const GLenum *bufs)
 {
        TRACE("(GLsizei n = %d, const GLenum *bufs = %p)", n, bufs);
 
@@ -976,7 +976,7 @@ GL_APICALL void GL_APIENTRY glDrawBuffers(GLsizei n, const GLenum *bufs)
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+void UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat *value = %p)", location, count, transpose, value);
 
@@ -1008,7 +1008,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv(GLint location, GLsizei count,
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+void UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat *value = %p)", location, count, transpose, value);
 
@@ -1040,7 +1040,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv(GLint location, GLsizei count,
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+void UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat *value = %p)", location, count, transpose, value);
 
@@ -1072,7 +1072,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv(GLint location, GLsizei count,
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+void UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat *value = %p)", location, count, transpose, value);
 
@@ -1104,7 +1104,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv(GLint location, GLsizei count,
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+void UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat *value = %p)", location, count, transpose, value);
 
@@ -1136,7 +1136,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv(GLint location, GLsizei count,
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+void UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, GLboolean transpose = %d, const GLfloat *value = %p)", location, count, transpose, value);
 
@@ -1168,7 +1168,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv(GLint location, GLsizei count,
        }
 }
 
-GL_APICALL void GL_APIENTRY glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
 {
        TRACE("(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, "
              "GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, "
@@ -1208,7 +1208,7 @@ GL_APICALL void GL_APIENTRY glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint sr
        }
 }
 
-GL_APICALL void GL_APIENTRY glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
 {
        TRACE("(GLenum target = 0x%X, GLenum attachment = 0x%X, GLuint texture = %d, GLint level = %d, GLint layer = %d)",
              target, attachment, texture, level, layer);
@@ -1344,7 +1344,7 @@ GL_APICALL void GL_APIENTRY glFramebufferTextureLayer(GLenum target, GLenum atta
        }
 }
 
-GL_APICALL void *GL_APIENTRY glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+void *MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
 {
        TRACE("(GLenum target = 0x%X,  GLintptr offset = %d, GLsizeiptr length = %d, GLbitfield access = %X)",
              target, offset, length, access);
@@ -1414,7 +1414,7 @@ GL_APICALL void *GL_APIENTRY glMapBufferRange(GLenum target, GLintptr offset, GL
        return nullptr;
 }
 
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
 {
        TRACE("(GLenum target = 0x%X,  GLintptr offset = %d, GLsizeiptr length = %d)",
              target, offset, length);
@@ -1462,7 +1462,7 @@ GL_APICALL void GL_APIENTRY glFlushMappedBufferRange(GLenum target, GLintptr off
        }
 }
 
-GL_APICALL void GL_APIENTRY glBindVertexArray(GLuint array)
+void BindVertexArray(GLuint array)
 {
        TRACE("(GLuint array = %d)", array);
 
@@ -1479,12 +1479,12 @@ GL_APICALL void GL_APIENTRY glBindVertexArray(GLuint array)
        }
 }
 
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES(GLuint array)
+void BindVertexArrayOES(GLuint array)
 {
-       glBindVertexArray(array);
+       BindVertexArray(array);
 }
 
-GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+void DeleteVertexArrays(GLsizei n, const GLuint *arrays)
 {
        TRACE("(GLsizei n = %d, const GLuint *arrays = %p)", n, arrays);
 
@@ -1507,12 +1507,12 @@ GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays
        }
 }
 
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays)
+void DeleteVertexArraysOES(GLsizei n, const GLuint *arrays)
 {
-       glDeleteVertexArrays(n, arrays);
+       DeleteVertexArrays(n, arrays);
 }
 
-GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays)
+void GenVertexArrays(GLsizei n, GLuint *arrays)
 {
        TRACE("(GLsizei n = %d, const GLuint *arrays = %p)", n, arrays);
 
@@ -1532,12 +1532,12 @@ GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays)
        }
 }
 
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint *arrays)
+void GenVertexArraysOES(GLsizei n, GLuint *arrays)
 {
-       glGenVertexArrays(n, arrays);
+       GenVertexArrays(n, arrays);
 }
 
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array)
+GLboolean IsVertexArray(GLuint array)
 {
        TRACE("(GLuint array = %d)", array);
 
@@ -1561,12 +1561,12 @@ GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array)
        return GL_FALSE;
 }
 
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array)
+GLboolean IsVertexArrayOES(GLuint array)
 {
-       return glIsVertexArray(array);
+       return IsVertexArray(array);
 }
 
-GL_APICALL void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
+void GetIntegeri_v(GLenum target, GLuint index, GLint *data)
 {
        TRACE("(GLenum target = 0x%X, GLuint index = %d, GLint* data = %p)",
              target, index, data);
@@ -1626,7 +1626,7 @@ GL_APICALL void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint *
        }
 }
 
-GL_APICALL void GL_APIENTRY glBeginTransformFeedback(GLenum primitiveMode)
+void BeginTransformFeedback(GLenum primitiveMode)
 {
        TRACE("(GLenum primitiveMode = 0x%X)", primitiveMode);
 
@@ -1661,7 +1661,7 @@ GL_APICALL void GL_APIENTRY glBeginTransformFeedback(GLenum primitiveMode)
        }
 }
 
-GL_APICALL void GL_APIENTRY glEndTransformFeedback(void)
+void EndTransformFeedback(void)
 {
        TRACE("()");
 
@@ -1686,7 +1686,7 @@ GL_APICALL void GL_APIENTRY glEndTransformFeedback(void)
        }
 }
 
-GL_APICALL void GL_APIENTRY glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
 {
        TRACE("(GLenum target = 0x%X, GLuint index = %d, GLuint buffer = %d, GLintptr offset = %d, GLsizeiptr size = %d)",
              target, index, buffer, offset, size);
@@ -1732,7 +1732,7 @@ GL_APICALL void GL_APIENTRY glBindBufferRange(GLenum target, GLuint index, GLuin
        }
 }
 
-GL_APICALL void GL_APIENTRY glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+void BindBufferBase(GLenum target, GLuint index, GLuint buffer)
 {
        TRACE("(GLenum target = 0x%X, GLuint index = %d, GLuint buffer = %d)",
              target, index, buffer);
@@ -1765,7 +1765,7 @@ GL_APICALL void GL_APIENTRY glBindBufferBase(GLenum target, GLuint index, GLuint
        }
 }
 
-GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode)
+void TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode)
 {
        TRACE("(GLuint program = %d, GLsizei count = %d, const GLchar *const*varyings = %p, GLenum bufferMode = 0x%X)",
              program, count, varyings, bufferMode);
@@ -1798,7 +1798,7 @@ GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings(GLuint program, GLsizei
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+void GetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
 {
        TRACE("(GLuint program = %d, GLuint index = %d, GLsizei bufSize = %d, GLsizei *length = %p, GLsizei *size = %p, GLenum *type = %p, GLchar *name = %p)",
              program, index, bufSize, length, size, type, name);
@@ -1828,7 +1828,7 @@ GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying(GLuint program, GLuint
        }
 }
 
-GL_APICALL void GL_APIENTRY glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
 {
        TRACE("(GLuint program = %d, GLuint index = %d, GLsizei bufSize = %d, GLsizei *length = %p, GLsizei *size = %p, GLenum *type = %p, GLchar *name = %p)",
              index, size, type, stride, pointer);
@@ -1872,7 +1872,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribIPointer(GLuint index, GLint size, GLe
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+void GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
 {
        TRACE("(GLuint index = %d, GLenum pname = 0x%X, GLint *params = %p)",
              index, pname, params);
@@ -1928,7 +1928,7 @@ GL_APICALL void GL_APIENTRY glGetVertexAttribIiv(GLuint index, GLenum pname, GLi
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+void GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
 {
        TRACE("(GLuint index = %d, GLenum pname = 0x%X, GLuint *params = %p)",
                index, pname, params);
@@ -1984,7 +1984,7 @@ GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv(GLuint index, GLenum pname, GL
        }
 }
 
-GL_APICALL void GL_APIENTRY glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
 {
        TRACE("(GLuint index = %d, GLint x = %d, GLint y = %d, GLint z = %d, GLint w = %d)",
              index, x, y, z, w);
@@ -2003,7 +2003,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribI4i(GLuint index, GLint x, GLint y, GL
        }
 }
 
-GL_APICALL void GL_APIENTRY glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
 {
        TRACE("(GLuint index = %d, GLint x = %d, GLint y = %d, GLint z = %d, GLint w = %d)",
              index, x, y, z, w);
@@ -2022,7 +2022,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribI4ui(GLuint index, GLuint x, GLuint y,
        }
 }
 
-GL_APICALL void GL_APIENTRY glVertexAttribI4iv(GLuint index, const GLint *v)
+void VertexAttribI4iv(GLuint index, const GLint *v)
 {
        TRACE("(GLuint index = %d, GLint *v = %p)", index, v);
 
@@ -2039,7 +2039,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribI4iv(GLuint index, const GLint *v)
        }
 }
 
-GL_APICALL void GL_APIENTRY glVertexAttribI4uiv(GLuint index, const GLuint *v)
+void VertexAttribI4uiv(GLuint index, const GLuint *v)
 {
        TRACE("(GLuint index = %d, GLint *v = %p)", index, v);
 
@@ -2056,7 +2056,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribI4uiv(GLuint index, const GLuint *v)
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+void GetUniformuiv(GLuint program, GLint location, GLuint *params)
 {
        TRACE("(GLuint program = %d, GLint location = %d, GLuint *params = %p)",
              program, location, params);
@@ -2091,7 +2091,7 @@ GL_APICALL void GL_APIENTRY glGetUniformuiv(GLuint program, GLint location, GLui
        }
 }
 
-GL_APICALL GLint GL_APIENTRY glGetFragDataLocation(GLuint program, const GLchar *name)
+GLint GetFragDataLocation(GLuint program, const GLchar *name)
 {
        TRACE("(GLuint program = %d, const GLchar *name = %p)", program, name);
 
@@ -2124,33 +2124,7 @@ GL_APICALL GLint GL_APIENTRY glGetFragDataLocation(GLuint program, const GLchar
        return -1;
 }
 
-GL_APICALL void GL_APIENTRY glUniform1ui(GLint location, GLuint v0)
-{
-       glUniform1uiv(location, 1, &v0);
-}
-
-GL_APICALL void GL_APIENTRY glUniform2ui(GLint location, GLuint v0, GLuint v1)
-{
-       GLuint xy[2] = { v0, v1 };
-
-       glUniform2uiv(location, 1, (GLuint*)&xy);
-}
-
-GL_APICALL void GL_APIENTRY glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
-{
-       GLuint xyz[3] = { v0, v1, v2 };
-
-       glUniform3uiv(location, 1, (GLuint*)&xyz);
-}
-
-GL_APICALL void GL_APIENTRY glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
-{
-       GLuint xyzw[4] = { v0, v1, v2, v3 };
-
-       glUniform4uiv(location, 1, (GLuint*)&xyzw);
-}
-
-GL_APICALL void GL_APIENTRY glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+void Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, const GLuint *value = %p)",
              location, count, value);
@@ -2183,7 +2157,7 @@ GL_APICALL void GL_APIENTRY glUniform1uiv(GLint location, GLsizei count, const G
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+void Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, const GLuint *value = %p)",
              location, count, value);
@@ -2216,7 +2190,7 @@ GL_APICALL void GL_APIENTRY glUniform2uiv(GLint location, GLsizei count, const G
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+void Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, const GLuint *value = %p)",
              location, count, value);
@@ -2249,7 +2223,7 @@ GL_APICALL void GL_APIENTRY glUniform3uiv(GLint location, GLsizei count, const G
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+void Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
 {
        TRACE("(GLint location = %d, GLsizei count = %d, const GLuint *value = %p)",
              location, count, value);
@@ -2282,7 +2256,33 @@ GL_APICALL void GL_APIENTRY glUniform4uiv(GLint location, GLsizei count, const G
        }
 }
 
-GL_APICALL void GL_APIENTRY glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+void Uniform1ui(GLint location, GLuint v0)
+{
+       Uniform1uiv(location, 1, &v0);
+}
+
+void Uniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+       GLuint xy[2] = { v0, v1 };
+
+       Uniform2uiv(location, 1, (GLuint*)&xy);
+}
+
+void Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+       GLuint xyz[3] = { v0, v1, v2 };
+
+       Uniform3uiv(location, 1, (GLuint*)&xyz);
+}
+
+void Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+       GLuint xyzw[4] = { v0, v1, v2, v3 };
+
+       Uniform4uiv(location, 1, (GLuint*)&xyzw);
+}
+
+void ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
 {
        TRACE("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLint *value = %p)",
              buffer, drawbuffer, value);
@@ -2319,7 +2319,7 @@ GL_APICALL void GL_APIENTRY glClearBufferiv(GLenum buffer, GLint drawbuffer, con
        }
 }
 
-GL_APICALL void GL_APIENTRY glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
 {
        TRACE("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLuint *value = %p)",
              buffer, drawbuffer, value);
@@ -2346,7 +2346,7 @@ GL_APICALL void GL_APIENTRY glClearBufferuiv(GLenum buffer, GLint drawbuffer, co
        }
 }
 
-GL_APICALL void GL_APIENTRY glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+void ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
 {
        TRACE("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLfloat *value = %p)",
              buffer, drawbuffer, value);
@@ -2383,7 +2383,7 @@ GL_APICALL void GL_APIENTRY glClearBufferfv(GLenum buffer, GLint drawbuffer, con
        }
 }
 
-GL_APICALL void GL_APIENTRY glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
 {
        TRACE("(GLenum buffer = 0x%X, GLint drawbuffer = %d, GLfloat depth = %f, GLint stencil = %d)",
              buffer, drawbuffer, depth, stencil);
@@ -2411,7 +2411,7 @@ GL_APICALL void GL_APIENTRY glClearBufferfi(GLenum buffer, GLint drawbuffer, GLf
        }
 }
 
-GL_APICALL const GLubyte *GL_APIENTRY glGetStringi(GLenum name, GLuint index)
+const GLubyte *GetStringi(GLenum name, GLuint index)
 {
        TRACE("(GLenum name = 0x%X, GLuint index = %d)", name, index);
 
@@ -2438,7 +2438,7 @@ GL_APICALL const GLubyte *GL_APIENTRY glGetStringi(GLenum name, GLuint index)
        return (GLubyte*)nullptr;
 }
 
-GL_APICALL void GL_APIENTRY glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+void CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
 {
        TRACE("(GLenum readTarget = 0x%X, GLenum writeTarget = 0x%X,  GLintptr readOffset = %d, GLintptr writeOffset = %d, GLsizeiptr size = %d)",
              readTarget, writeTarget, readOffset, writeOffset, size);
@@ -2481,7 +2481,7 @@ GL_APICALL void GL_APIENTRY glCopyBufferSubData(GLenum readTarget, GLenum writeT
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices)
+void GetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices)
 {
        TRACE("(GLuint program = %d, GLsizei uniformCount = %d, const GLchar *const*uniformNames = %p, GLuint *uniformIndices = %p)",
              program, uniformCount, uniformNames, uniformIndices);
@@ -2526,7 +2526,7 @@ GL_APICALL void GL_APIENTRY glGetUniformIndices(GLuint program, GLsizei uniformC
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
 {
        TRACE("(GLuint program = %d, GLsizei uniformCount = %d, const GLchar *const*uniformNames = %p, GLenum pname = 0x%X, GLuint *uniformIndices = %p)",
              program, uniformCount, uniformIndices, pname, uniformIndices);
@@ -2587,7 +2587,7 @@ GL_APICALL void GL_APIENTRY glGetActiveUniformsiv(GLuint program, GLsizei unifor
        }
 }
 
-GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+GLuint GetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
 {
        TRACE("(GLuint program = %d, const GLchar *uniformBlockName = %p)",
              program, uniformBlockName);
@@ -2616,7 +2616,7 @@ GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLcha
        return GL_INVALID_INDEX;
 }
 
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+void GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
 {
        TRACE("(GLuint program = %d, GLuint uniformBlockIndex = %d, GLenum pname = 0x%X, GLint *params = %p)",
              program, uniformBlockIndex, pname, params);
@@ -2656,7 +2656,7 @@ GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uni
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+void GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
 {
        TRACE("(GLuint program = %d, GLuint uniformBlockIndex = %d, GLsizei bufSize = %d, GLsizei *length = %p, GLchar *uniformBlockName = %p)",
              program, uniformBlockIndex, bufSize, length, uniformBlockName);
@@ -2686,7 +2686,7 @@ GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName(GLuint program, GLuint u
        }
 }
 
-GL_APICALL void GL_APIENTRY glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+void UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
 {
        TRACE("(GLuint program = %d, GLuint uniformBlockIndex = %d, GLuint uniformBlockBinding = %d)",
              program, uniformBlockIndex, uniformBlockBinding);
@@ -2716,7 +2716,7 @@ GL_APICALL void GL_APIENTRY glUniformBlockBinding(GLuint program, GLuint uniform
        }
 }
 
-GL_APICALL void GL_APIENTRY glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
+void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
 {
        TRACE("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei instanceCount = %d)",
              mode, first, count, instanceCount);
@@ -2754,7 +2754,7 @@ GL_APICALL void GL_APIENTRY glDrawArraysInstanced(GLenum mode, GLint first, GLsi
        }
 }
 
-GL_APICALL void GL_APIENTRY glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
+void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
 {
        TRACE("(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = %p, GLsizei instanceCount = %d)",
              mode, count, type, indices, instanceCount);
@@ -2802,7 +2802,7 @@ GL_APICALL void GL_APIENTRY glDrawElementsInstanced(GLenum mode, GLsizei count,
        }
 }
 
-GL_APICALL GLsync GL_APIENTRY glFenceSync(GLenum condition, GLbitfield flags)
+GLsync FenceSync(GLenum condition, GLbitfield flags)
 {
        TRACE("(GLenum condition = 0x%X, GLbitfield flags = %X)", condition, flags);
 
@@ -2829,7 +2829,7 @@ GL_APICALL GLsync GL_APIENTRY glFenceSync(GLenum condition, GLbitfield flags)
        return nullptr;
 }
 
-GL_APICALL GLboolean GL_APIENTRY glIsSync(GLsync sync)
+GLboolean IsSync(GLsync sync)
 {
        TRACE("(GLsync sync = %p)", sync);
 
@@ -2848,7 +2848,7 @@ GL_APICALL GLboolean GL_APIENTRY glIsSync(GLsync sync)
        return GL_FALSE;
 }
 
-GL_APICALL void GL_APIENTRY glDeleteSync(GLsync sync)
+void DeleteSync(GLsync sync)
 {
        TRACE("(GLsync sync = %p)", sync);
 
@@ -2870,7 +2870,7 @@ GL_APICALL void GL_APIENTRY glDeleteSync(GLsync sync)
        }
 }
 
-GL_APICALL GLenum GL_APIENTRY glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+GLenum ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
 {
        TRACE("(GLsync sync = %p, GLbitfield flags = %X, GLuint64 timeout = %llu)", sync, flags, timeout);
 
@@ -2898,7 +2898,7 @@ GL_APICALL GLenum GL_APIENTRY glClientWaitSync(GLsync sync, GLbitfield flags, GL
        return GL_FALSE;
 }
 
-GL_APICALL void GL_APIENTRY glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+void WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
 {
        TRACE("(GLsync sync = %p, GLbitfield flags = %X, GLuint64 timeout = %llu)", sync, flags, timeout);
 
@@ -2929,7 +2929,7 @@ GL_APICALL void GL_APIENTRY glWaitSync(GLsync sync, GLbitfield flags, GLuint64 t
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetInteger64v(GLenum pname, GLint64 *data)
+void GetInteger64v(GLenum pname, GLint64 *data)
 {
        TRACE("(GLenum pname = 0x%X, GLint64 *data = %p)", pname, data);
 
@@ -2986,7 +2986,7 @@ GL_APICALL void GL_APIENTRY glGetInteger64v(GLenum pname, GLint64 *data)
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+void GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
 {
        TRACE("(GLsync sync = %p, GLenum pname = 0x%X, GLsizei bufSize = %d, GLsizei *length = %p, GLint *values = %p)",
              sync, pname, bufSize, length, values);
@@ -3010,7 +3010,7 @@ GL_APICALL void GL_APIENTRY glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSi
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
+void GetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
 {
        TRACE("(GLenum target = 0x%X, GLuint index = %d, GLint64 *data = %p)", target, index, data);
 
@@ -3069,7 +3069,7 @@ GL_APICALL void GL_APIENTRY glGetInteger64i_v(GLenum target, GLuint index, GLint
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+void GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
 {
        TRACE("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint64 *params = %p)", target, pname, params);
 
@@ -3116,7 +3116,7 @@ GL_APICALL void GL_APIENTRY glGetBufferParameteri64v(GLenum target, GLenum pname
        }
 }
 
-GL_APICALL void GL_APIENTRY glGenSamplers(GLsizei count, GLuint *samplers)
+void GenSamplers(GLsizei count, GLuint *samplers)
 {
        TRACE("(GLsizei count = %d, GLuint *samplers = %p)", count, samplers);
 
@@ -3136,7 +3136,7 @@ GL_APICALL void GL_APIENTRY glGenSamplers(GLsizei count, GLuint *samplers)
        }
 }
 
-GL_APICALL void GL_APIENTRY glDeleteSamplers(GLsizei count, const GLuint *samplers)
+void DeleteSamplers(GLsizei count, const GLuint *samplers)
 {
        TRACE("(GLsizei count = %d, GLuint *samplers = %p)", count, samplers);
 
@@ -3156,7 +3156,7 @@ GL_APICALL void GL_APIENTRY glDeleteSamplers(GLsizei count, const GLuint *sample
        }
 }
 
-GL_APICALL GLboolean GL_APIENTRY glIsSampler(GLuint sampler)
+GLboolean IsSampler(GLuint sampler)
 {
        TRACE("(GLuint sampler = %d)", sampler);
 
@@ -3178,7 +3178,7 @@ GL_APICALL GLboolean GL_APIENTRY glIsSampler(GLuint sampler)
        return GL_FALSE;
 }
 
-GL_APICALL void GL_APIENTRY glBindSampler(GLuint unit, GLuint sampler)
+void BindSampler(GLuint unit, GLuint sampler)
 {
        TRACE("(GLuint unit = %d, GLuint sampler = %d)", unit, sampler);
 
@@ -3200,15 +3200,7 @@ GL_APICALL void GL_APIENTRY glBindSampler(GLuint unit, GLuint sampler)
        }
 }
 
-GL_APICALL void GL_APIENTRY glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
-{
-       TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, GLint param = %d)",
-             sampler, pname, param);
-
-       glSamplerParameteriv(sampler, pname, &param);
-}
-
-GL_APICALL void GL_APIENTRY glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+void SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
 {
        TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, const GLint *param = %p)",
              sampler, pname, param);
@@ -3236,15 +3228,15 @@ GL_APICALL void GL_APIENTRY glSamplerParameteriv(GLuint sampler, GLenum pname, c
        }
 }
 
-GL_APICALL void GL_APIENTRY glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+void SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
 {
-       TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, GLfloat param = %f)",
+       TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, GLint param = %d)",
              sampler, pname, param);
 
-       glSamplerParameterfv(sampler, pname, &param);
+       SamplerParameteriv(sampler, pname, &param);
 }
 
-GL_APICALL void GL_APIENTRY glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+void SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
 {
        TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, const GLfloat *param = %p)",
              sampler, pname, param);
@@ -3270,7 +3262,15 @@ GL_APICALL void GL_APIENTRY glSamplerParameterfv(GLuint sampler, GLenum pname, c
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+void SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+       TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, GLfloat param = %f)",
+             sampler, pname, param);
+
+       SamplerParameterfv(sampler, pname, &param);
+}
+
+void GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
 {
        TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, GLint *params = %p)",
              sampler, pname, params);
@@ -3293,7 +3293,7 @@ GL_APICALL void GL_APIENTRY glGetSamplerParameteriv(GLuint sampler, GLenum pname
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+void GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
 {
        TRACE("(GLuint sampler = %d, GLenum pname = 0x%X, GLfloat *params = %p)",
              sampler, pname, params);
@@ -3316,7 +3316,7 @@ GL_APICALL void GL_APIENTRY glGetSamplerParameterfv(GLuint sampler, GLenum pname
        }
 }
 
-GL_APICALL void GL_APIENTRY glVertexAttribDivisor(GLuint index, GLuint divisor)
+void VertexAttribDivisor(GLuint index, GLuint divisor)
 {
        TRACE("(GLuint index = %d, GLuint divisor = %d)", index, divisor);
 
@@ -3333,7 +3333,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribDivisor(GLuint index, GLuint divisor)
        }
 }
 
-GL_APICALL void GL_APIENTRY glBindTransformFeedback(GLenum target, GLuint id)
+void BindTransformFeedback(GLenum target, GLuint id)
 {
        TRACE("(GLenum target = 0x%X, GLuint id = %d)", target, id);
 
@@ -3362,7 +3362,7 @@ GL_APICALL void GL_APIENTRY glBindTransformFeedback(GLenum target, GLuint id)
        }
 }
 
-GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+void DeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
 {
        TRACE("(GLsizei n = %d, const GLuint *ids = %p)", n, ids);
 
@@ -3392,7 +3392,7 @@ GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks(GLsizei n, const GLuint *
        }
 }
 
-GL_APICALL void GL_APIENTRY glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+void GenTransformFeedbacks(GLsizei n, GLuint *ids)
 {
        TRACE("(GLsizei n = %d, const GLuint *ids = %p)", n, ids);
 
@@ -3412,7 +3412,7 @@ GL_APICALL void GL_APIENTRY glGenTransformFeedbacks(GLsizei n, GLuint *ids)
        }
 }
 
-GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback(GLuint id)
+GLboolean IsTransformFeedback(GLuint id)
 {
        TRACE("(GLuint id = %d)", id);
 
@@ -3436,7 +3436,7 @@ GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback(GLuint id)
        return GL_FALSE;
 }
 
-GL_APICALL void GL_APIENTRY glPauseTransformFeedback(void)
+void PauseTransformFeedback(void)
 {
        TRACE("()");
 
@@ -3457,7 +3457,7 @@ GL_APICALL void GL_APIENTRY glPauseTransformFeedback(void)
        }
 }
 
-GL_APICALL void GL_APIENTRY glResumeTransformFeedback(void)
+void ResumeTransformFeedback(void)
 {
        TRACE("()");
 
@@ -3478,7 +3478,7 @@ GL_APICALL void GL_APIENTRY glResumeTransformFeedback(void)
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
+void GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
 {
        TRACE("(GLuint program = %d, GLsizei bufSize = %d, GLsizei *length = %p, GLenum *binaryFormat = %p, void *binary = %p)",
              program, bufSize, length, binaryFormat, binary);
@@ -3504,7 +3504,7 @@ GL_APICALL void GL_APIENTRY glGetProgramBinary(GLuint program, GLsizei bufSize,
        return error(GL_INVALID_OPERATION);
 }
 
-GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
+void ProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
 {
        TRACE("(GLuint program = %d, GLenum binaryFormat = 0x%X, const void *binary = %p, GLsizei length = %d)",
              program, binaryFormat, binaryFormat, length);
@@ -3530,7 +3530,7 @@ GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat,
        return error(GL_INVALID_ENUM);
 }
 
-GL_APICALL void GL_APIENTRY glProgramParameteri(GLuint program, GLenum pname, GLint value)
+void ProgramParameteri(GLuint program, GLenum pname, GLint value)
 {
        TRACE("(GLuint program = %d, GLenum pname = 0x%X, GLint value = %d)",
              program, pname, value);
@@ -3561,15 +3561,7 @@ GL_APICALL void GL_APIENTRY glProgramParameteri(GLuint program, GLenum pname, GL
        }
 }
 
-GL_APICALL void GL_APIENTRY glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
-{
-       TRACE("(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = %p)",
-             target, numAttachments, attachments);
-
-       glInvalidateSubFramebuffer(target, numAttachments, attachments, 0, 0, std::numeric_limits<GLsizei>::max(), std::numeric_limits<GLsizei>::max());
-}
-
-GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+void InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
 {
        TRACE("(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = %p, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
              target, numAttachments, attachments, x, y, width, height);
@@ -3637,7 +3629,15 @@ GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer(GLenum target, GLsizei nu
        }
 }
 
-GL_APICALL void GL_APIENTRY glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+       TRACE("(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = %p)",
+             target, numAttachments, attachments);
+
+       InvalidateSubFramebuffer(target, numAttachments, attachments, 0, 0, std::numeric_limits<GLsizei>::max(), std::numeric_limits<GLsizei>::max());
+}
+
+void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
 {
        TRACE("(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = %d, GLsizei height = %d)",
              target, levels, internalformat, width, height);
@@ -3725,7 +3725,7 @@ GL_APICALL void GL_APIENTRY glTexStorage2D(GLenum target, GLsizei levels, GLenum
        }
 }
 
-GL_APICALL void GL_APIENTRY glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
 {
        TRACE("(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d)",
              target, levels, internalformat, width, height, depth);
@@ -3798,7 +3798,7 @@ GL_APICALL void GL_APIENTRY glTexStorage3D(GLenum target, GLsizei levels, GLenum
        }
 }
 
-GL_APICALL void GL_APIENTRY glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
+void GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
 {
        TRACE("(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLenum pname = 0x%X, GLsizei bufSize = %d, GLint *params = %p)",
              target, internalformat, pname, bufSize, params);