#include "evas_gl_core_private.h"
#include "evas_gl_api_ext.h"
+#include <dlfcn.h>
#define EVGL_FUNC_BEGIN() \
{ \
#define _EVGL_INT_INIT_VALUE -3
extern int _evas_gl_log_level;
-
+static void *_gles3_handle = NULL;
+static Evas_GL_API _gles3_api;
//---------------------------------------//
// API Debug Error Checking Code
static
if (!ctx)
CRI("\e[1;33m%s\e[m: Current Context NOT SET: GL Call Should NOT Be Called without MakeCurrent!!!", api);
- else if (ctx->version != EVAS_GL_GLES_2_X)
+ else if ((ctx->version != EVAS_GL_GLES_2_X) && (ctx->version != EVAS_GL_GLES_3_X))
CRI("\e[1;33m%s\e[m: This API is being called with the wrong context (invalid version).", api);
}
ret = glGetString(GL_VERSION);
if (!ret) return NULL;
#ifdef GL_GLES
- if (ret[11] != (GLubyte) '2')
+ if ((ret[10] != (GLubyte) '2') && (ret[10] != (GLubyte) '3'))
{
// We try not to remove the vendor fluff
snprintf(_version, sizeof(_version), "OpenGL ES 2.0 Evas GL (%s)", ((char *) ret) + 10);
#endif
case GL_EXTENSIONS:
- // No need to check context version, this is GLESv2 API.
- return (GLubyte *) evgl_api_ext_string_get(EINA_TRUE, EINA_FALSE);
+ // Passing the verion - GLESv2/GLESv3.
+ return (GLubyte *) evgl_api_ext_string_get(EINA_TRUE, rsc->current_ctx->version);
default:
// GL_INVALID_ENUM is generated if name is not an accepted value.
//-------------------------------------------------------------//
-
-//-------------------------------------------------------------//
-// Debug Evas GL APIs
-// - GL APIs Overriden for debugging purposes
//-------------------------------------------------------------//
+// Open GLES 3.0 APIs
-void
-_evgld_glActiveTexture(GLenum texture)
+
+static void
+_evgl_glReadBuffer(GLenum mode)
{
- EVGL_FUNC_BEGIN();
- glActiveTexture(texture);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glReadBuffer)
+ return;
+ _gles3_api.glReadBuffer(mode);
}
-void
-_evgld_glAttachShader(GLuint program, GLuint shader)
+static void
+_evgl_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
{
- EVGL_FUNC_BEGIN();
- glAttachShader(program, shader);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glDrawRangeElements)
+ return;
+ _gles3_api.glDrawRangeElements(mode, start, end, count, type, indices);
}
-void
-_evgld_glBindAttribLocation(GLuint program, GLuint idx, const char* name)
+static void
+_evgl_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
{
- EVGL_FUNC_BEGIN();
- glBindAttribLocation(program, idx, name);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glTexImage3D)
+ return;
+ _gles3_api.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
}
-void
-_evgld_glBindBuffer(GLenum target, GLuint buffer)
+static void
+_evgl_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
{
- EVGL_FUNC_BEGIN();
- glBindBuffer(target, buffer);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glTexSubImage3D)
+ return;
+ _gles3_api.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
}
-void
-_evgld_glBindFramebuffer(GLenum target, GLuint framebuffer)
+static void
+_evgl_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
- EVGL_FUNC_BEGIN();
-
- _evgl_glBindFramebuffer(target, framebuffer);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glCopyTexSubImage3D)
+ return;
+ _gles3_api.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
}
-void
-_evgld_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+static void
+_evgl_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
{
- EVGL_FUNC_BEGIN();
- glBindRenderbuffer(target, renderbuffer);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glCompressedTexImage3D)
+ return;
+ _gles3_api.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
}
-void
-_evgld_glBindTexture(GLenum target, GLuint texture)
+static void
+_evgl_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
{
- EVGL_FUNC_BEGIN();
- glBindTexture(target, texture);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glCompressedTexSubImage3D)
+ return;
+ _gles3_api.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
}
-void
-_evgld_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+static void
+_evgl_glGenQueries(GLsizei n, GLuint *ids)
{
- EVGL_FUNC_BEGIN();
- glBlendColor(red, green, blue, alpha);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glGenQueries)
+ return;
+ _gles3_api.glGenQueries(n, ids);
}
-void
-_evgld_glBlendEquation(GLenum mode)
+static void
+_evgl_glDeleteQueries(GLsizei n, const GLuint *ids)
{
- EVGL_FUNC_BEGIN();
- glBlendEquation(mode);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glDeleteQueries)
+ return;
+ _gles3_api.glDeleteQueries(n, ids);
}
-void
-_evgld_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+static GLboolean
+ _evgl_glIsQuery(GLuint id)
{
- EVGL_FUNC_BEGIN();
- glBlendEquationSeparate(modeRGB, modeAlpha);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ GLboolean ret;
+ if (!_gles3_api.glIsQuery)
+ return EINA_FALSE;
+ ret = _gles3_api.glIsQuery(id);
+ return ret;
}
-void
-_evgld_glBlendFunc(GLenum sfactor, GLenum dfactor)
+static void
+_evgl_glBeginQuery(GLenum target, GLuint id)
{
- EVGL_FUNC_BEGIN();
- glBlendFunc(sfactor, dfactor);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glBeginQuery)
+ return;
+ _gles3_api.glBeginQuery(target, id);
}
-void
-_evgld_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+static void
+_evgl_glEndQuery(GLenum target)
{
- EVGL_FUNC_BEGIN();
- glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glEndQuery)
+ return;
+ _gles3_api.glEndQuery(target);
}
-void
-_evgld_glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage)
+static void
+_evgl_glGetQueryiv(GLenum target, GLenum pname, GLint *params)
{
- EVGL_FUNC_BEGIN();
- glBufferData(target, size, data, usage);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glGetQueryiv)
+ return;
+ _gles3_api.glGetQueryiv(target, pname, params);
}
-void
-_evgld_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
+static void
+_evgl_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
{
- EVGL_FUNC_BEGIN();
- glBufferSubData(target, offset, size, data);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glGetQueryObjectuiv)
+ return;
+ _gles3_api.glGetQueryObjectuiv(id, pname, params);
}
-GLenum
-_evgld_glCheckFramebufferStatus(GLenum target)
+static GLboolean
+_evgl_glUnmapBuffer(GLenum target)
{
- GLenum ret = GL_NONE;
-
- EVGL_FUNC_BEGIN();
- ret = glCheckFramebufferStatus(target);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ GLboolean ret;
+ if (!_gles3_api.glUnmapBuffer)
+ return EINA_FALSE;
+ ret = _gles3_api.glUnmapBuffer(target);
return ret;
}
-void
-_evgld_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+static void
+_evgl_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params)
{
- EVGL_FUNC_BEGIN();
- _evgl_glClearColor(red, green, blue, alpha);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glGetBufferPointerv)
+ return;
+ _gles3_api.glGetBufferPointerv(target, pname, params);
}
-void
-_evgld_glClearDepthf(GLclampf depth)
+static void
+_evgl_glDrawBuffers(GLsizei n, const GLenum *bufs)
{
- EVGL_FUNC_BEGIN();
-
- _evgl_glClearDepthf(depth);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ if (!_gles3_api.glDrawBuffers)
+ return;
+ _gles3_api.glDrawBuffers(n, bufs);
+}
- EVGL_FUNC_END();
+static void
+_evgl_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ if (!_gles3_api.glUniformMatrix2x3fv)
+ return;
+ _gles3_api.glUniformMatrix2x3fv(location, count, transpose, value);
}
-void
-_evgld_glClearStencil(GLint s)
+static void
+_evgl_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
- EVGL_FUNC_BEGIN();
- glClearStencil(s);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glUniformMatrix3x2fv)
+ return;
+ _gles3_api.glUniformMatrix3x2fv(location, count, transpose, value);
}
-void
-_evgld_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+static void
+_evgl_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
- EVGL_FUNC_BEGIN();
- glColorMask(red, green, blue, alpha);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glUniformMatrix2x4fv)
+ return;
+ _gles3_api.glUniformMatrix2x4fv(location, count, transpose, value);
}
-void
-_evgld_glCompileShader(GLuint shader)
+static void
+_evgl_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
- EVGL_FUNC_BEGIN();
- glCompileShader(shader);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glUniformMatrix4x2fv)
+ return;
+ _gles3_api.glUniformMatrix4x2fv(location, count, transpose, value);
}
-void
-_evgld_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
+static void
+_evgl_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
- EVGL_FUNC_BEGIN();
- glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glUniformMatrix3x4fv)
+ return;
+ _gles3_api.glUniformMatrix3x4fv(location, count, transpose, value);
}
-void
-_evgld_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
+static void
+_evgl_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
- EVGL_FUNC_BEGIN();
- glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glUniformMatrix4x3fv)
+ return;
+ _gles3_api.glUniformMatrix4x3fv(location, count, transpose, value);
}
-void
-_evgld_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+static void
+_evgl_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
{
- EVGL_FUNC_BEGIN();
- glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glBlitFramebuffer)
+ return;
+ _gles3_api.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
}
-void
-_evgld_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+static void
+_evgl_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
{
- EVGL_FUNC_BEGIN();
- glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glRenderbufferStorageMultisample)
+ return;
+ _gles3_api.glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
}
-GLuint
-_evgld_glCreateProgram(void)
+static void
+_evgl_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
{
- GLuint ret = _EVGL_INT_INIT_VALUE;
+ if (!_gles3_api.glFramebufferTextureLayer)
+ return;
+ _gles3_api.glFramebufferTextureLayer(target, attachment, texture, level, layer);
+}
- EVGL_FUNC_BEGIN();
- ret = glCreateProgram();
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+static void*
+_evgl_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ void* ret;
+ if (!_gles3_api.glMapBufferRange)
+ return NULL;
+ ret = _gles3_api.glMapBufferRange(target, offset, length, access);
return ret;
}
-GLuint
-_evgld_glCreateShader(GLenum type)
+static GLsync
+_evgl_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
{
- GLuint ret = _EVGL_INT_INIT_VALUE;
- EVGL_FUNC_BEGIN();
- ret = glCreateShader(type);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ GLsync ret;
+ if (!_gles3_api.glFlushMappedBufferRange)
+ return 0;
+ ret = _gles3_api.glFlushMappedBufferRange(target, offset, length);
return ret;
}
-void
-_evgld_glCullFace(GLenum mode)
+static void
+_evgl_glBindVertexArray(GLuint array)
{
- EVGL_FUNC_BEGIN();
- glCullFace(mode);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glBindVertexArray)
+ return;
+ _gles3_api.glBindVertexArray(array);
}
-void
-_evgld_glDeleteBuffers(GLsizei n, const GLuint* buffers)
+static void
+_evgl_glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
{
- EVGL_FUNC_BEGIN();
- glDeleteBuffers(n, buffers);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glDeleteVertexArrays)
+ return;
+ _gles3_api.glDeleteVertexArrays(n, arrays);
}
-void
-_evgld_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
+static void
+_evgl_glGenVertexArrays(GLsizei n, GLuint *arrays)
{
- EVGL_FUNC_BEGIN();
- glDeleteFramebuffers(n, framebuffers);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glGenVertexArrays)
+ return;
+ _gles3_api.glGenVertexArrays(n, arrays);
}
-void
-_evgld_glDeleteProgram(GLuint program)
+static GLboolean
+_evgl_glIsVertexArray(GLuint array)
{
- EVGL_FUNC_BEGIN();
- glDeleteProgram(program);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ GLboolean ret;
+ if (!_gles3_api.glIsVertexArray)
+ return EINA_FALSE;
+ ret = _gles3_api.glIsVertexArray(array);
+ return ret;
}
-void
-_evgld_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
+static void
+_evgl_glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
{
- EVGL_FUNC_BEGIN();
- glDeleteRenderbuffers(n, renderbuffers);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glGetIntegeri_v)
+ return;
+ _gles3_api.glGetIntegeri_v(target, index, data);
}
-void
-_evgld_glDeleteShader(GLuint shader)
+static void
+_evgl_glBeginTransformFeedback(GLenum primitiveMode)
{
- EVGL_FUNC_BEGIN();
- glDeleteShader(shader);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glBeginTransformFeedback)
+ return;
+ _gles3_api.glBeginTransformFeedback(primitiveMode);
}
-void
-_evgld_glDeleteTextures(GLsizei n, const GLuint* textures)
+static void
+_evgl_glEndTransformFeedback(void)
{
- EVGL_FUNC_BEGIN();
- glDeleteTextures(n, textures);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glEndTransformFeedback)
+ return;
+ _gles3_api.glEndTransformFeedback();
}
-void
-_evgld_glDepthFunc(GLenum func)
+static void
+_evgl_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
{
- EVGL_FUNC_BEGIN();
- glDepthFunc(func);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (!_gles3_api.glBindBufferRange)
+ return;
+ _gles3_api.glBindBufferRange(target, index, buffer, offset, size);
+}
+
+static void
+_evgl_glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+ if (!_gles3_api.glBindBufferBase)
+ return;
+ _gles3_api.glBindBufferBase(target, index, buffer);
+}
+
+static void
+_evgl_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode)
+{
+ if (!_gles3_api.glTransformFeedbackVaryings)
+ return;
+ _gles3_api.glTransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+static void
+_evgl_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ if (!_gles3_api.glGetTransformFeedbackVarying)
+ return;
+ _gles3_api.glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
+}
+
+static void
+_evgl_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ if (!_gles3_api.glVertexAttribIPointer)
+ return;
+ _gles3_api.glVertexAttribIPointer(index, size, type, stride, pointer);
+}
+
+static void
+_evgl_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+ if (!_gles3_api.glGetVertexAttribIiv)
+ return;
+ _gles3_api.glGetVertexAttribIiv(index, pname, params);
+}
+
+static void
+_evgl_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+ if (!_gles3_api.glGetVertexAttribIuiv)
+ return;
+ _gles3_api.glGetVertexAttribIuiv(index, pname, params);
+}
+
+static void
+_evgl_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ if (!_gles3_api.glVertexAttribI4i)
+ return;
+ _gles3_api.glVertexAttribI4i(index, x, y, z, w);
+}
+
+static void
+_evgl_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ if (!_gles3_api.glVertexAttribI4ui)
+ return;
+ _gles3_api.glVertexAttribI4ui(index, x, y, z, w);
+}
+
+static void
+_evgl_glVertexAttribI4iv(GLuint index, const GLint *v)
+{
+ if (!_gles3_api.glVertexAttribI4iv)
+ return;
+ _gles3_api.glVertexAttribI4iv(index, v);
+}
+
+static void
+_evgl_glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ if (!_gles3_api.glVertexAttribI4uiv)
+ return;
+ _gles3_api.glVertexAttribI4uiv(index, v);
+}
+
+static void
+_evgl_glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+{
+ if (!_gles3_api.glGetUniformuiv)
+ return;
+ _gles3_api.glGetUniformuiv(program, location, params);
+}
+
+static GLint
+_evgl_glGetFragDataLocation(GLuint program, const GLchar *name)
+{
+ GLint ret;
+ if (!_gles3_api.glGetFragDataLocation)
+ return EVAS_GL_NOT_INITIALIZED;
+ ret = _gles3_api.glGetFragDataLocation(program, name);
+ return ret;
+}
+
+static void
+_evgl_glUniform1ui(GLint location, GLuint v0)
+{
+ if (!_gles3_api.glUniform1ui)
+ return;
+ _gles3_api.glUniform1ui(location, v0);
+}
+
+static void
+_evgl_glUniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+ if (!_gles3_api.glUniform2ui)
+ return;
+ _gles3_api.glUniform2ui(location, v0, v1);
+}
+
+static void
+_evgl_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ if (!_gles3_api.glUniform3ui)
+ return;
+ _gles3_api.glUniform3ui(location, v0, v1, v2);
+}
+
+static void
+_evgl_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ if (!_gles3_api.glUniform4ui)
+ return;
+ _gles3_api.glUniform4ui(location, v0, v1, v2, v3);
+}
+
+static void
+_evgl_glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ if (!_gles3_api.glUniform1uiv)
+ return;
+ _gles3_api.glUniform1uiv(location, count, value);
+}
+
+static void
+_evgl_glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ if (!_gles3_api.glUniform2uiv)
+ return;
+ _gles3_api.glUniform2uiv(location, count, value);
+}
+
+static void
+_evgl_glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ if (!_gles3_api.glUniform3uiv)
+ return;
+ _gles3_api.glUniform3uiv(location, count, value);
+}
+
+static void
+_evgl_glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ if (!_gles3_api.glUniform4uiv)
+ return;
+ _gles3_api.glUniform4uiv(location, count, value);
+}
+
+static void
+_evgl_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ if (!_gles3_api.glClearBufferiv)
+ return;
+ _gles3_api.glClearBufferiv(buffer, drawbuffer, value);
+}
+
+static void
+_evgl_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ if (!_gles3_api.glClearBufferuiv)
+ return;
+ _gles3_api.glClearBufferuiv(buffer, drawbuffer, value);
+}
+
+static void
+_evgl_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ if (!_gles3_api.glClearBufferfv)
+ return;
+ _gles3_api.glClearBufferfv(buffer, drawbuffer, value);
+}
+
+static void
+_evgl_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+{
+ if (!_gles3_api.glClearBufferfi)
+ return;
+ _gles3_api.glClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+static const GLubyte *
+ _evgl_glGetStringi(GLenum name, GLuint index)
+{
+ const GLubyte *ret;
+ if (!_gles3_api.glGetStringi)
+ return NULL;
+ ret = _gles3_api.glGetStringi(name, index);
+ return ret;
+}
+
+static void
+_evgl_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ if (!_gles3_api.glCopyBufferSubData)
+ return;
+ _gles3_api.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+static void
+_evgl_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices)
+{
+ if (!_gles3_api.glGetUniformIndices)
+ return;
+ _gles3_api.glGetUniformIndices(program, uniformCount, uniformNames,uniformIndices);
+}
+
+static void
+_evgl_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+{
+ if (!_gles3_api.glGetActiveUniformsiv)
+ return;
+ _gles3_api.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
+}
+
+static GLuint
+_evgl_glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+{
+ GLuint ret;
+ if (!_gles3_api.glGetUniformBlockIndex)
+ return EVAS_GL_NOT_INITIALIZED;
+ ret = _gles3_api.glGetUniformBlockIndex(program, uniformBlockName);
+ return ret;
+}
+
+static void
+_evgl_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+{
+ if (!_gles3_api.glGetActiveUniformBlockiv)
+ return;
+ _gles3_api.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
+}
+
+static void
+_evgl_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+{
+ if (!_gles3_api.glGetActiveUniformBlockName)
+ return;
+ _gles3_api.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+static void
+_evgl_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+ if (!_gles3_api.glUniformBlockBinding)
+ return;
+ _gles3_api.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+static void
+_evgl_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
+{
+ if (!_gles3_api.glDrawArraysInstanced)
+ return;
+ _gles3_api.glDrawArraysInstanced(mode, first, count, instancecount);
+}
+
+static void
+_evgl_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount)
+{
+ if (!_gles3_api.glDrawElementsInstanced)
+ return;
+ _gles3_api.glDrawElementsInstanced(mode, count, type, indices, instancecount);
+}
+
+static GLsync
+_evgl_glFenceSync(GLenum condition, GLbitfield flags)
+{
+ GLsync ret;
+ if (!_gles3_api.glFenceSync)
+ return 0;
+ ret = _gles3_api.glFenceSync(condition, flags);
+ return ret;
+}
+
+static GLboolean
+_evgl_glIsSync(GLsync sync)
+{
+ GLboolean ret;
+ if (!_gles3_api.glIsSync)
+ return EINA_FALSE;
+ ret = _gles3_api.glIsSync(sync);
+ return ret;
+}
+
+static void
+_evgl_glDeleteSync(GLsync sync)
+{
+ if (!_gles3_api.glDeleteSync)
+ return;
+ _gles3_api.glDeleteSync(sync);
+}
+
+static GLenum
+_evgl_glClientWaitSync(GLsync sync, GLbitfield flags, EvasGLuint64 timeout)
+{
+ GLenum ret;
+ if (!_gles3_api.glClientWaitSync)
+ return EVAS_GL_NOT_INITIALIZED;
+ ret = _gles3_api.glClientWaitSync(sync, flags, timeout);
+ return ret;
+}
+
+static void
+_evgl_glWaitSync(GLsync sync, GLbitfield flags, EvasGLuint64 timeout)
+{
+ if (!_gles3_api.glWaitSync)
+ return;
+ _gles3_api.glWaitSync(sync, flags, timeout);
+}
+
+static void
+_evgl_glGetInteger64v(GLenum pname, EvasGLint64 *params)
+{
+ if (!_gles3_api.glGetInteger64v)
+ return;
+ _gles3_api.glGetInteger64v(pname, params);
+}
+
+static void
+_evgl_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ if (!_gles3_api.glGetSynciv)
+ return;
+ _gles3_api.glGetSynciv(sync, pname, bufSize, length, values);
+}
+
+static void
+_evgl_glGetInteger64i_v(GLenum target, GLuint index, EvasGLint64 *data)
+{
+ if (!_gles3_api.glGetInteger64i_v)
+ return;
+ _gles3_api.glGetInteger64i_v(target, index, data);
+}
+
+static void
+_evgl_glGetBufferParameteri64v(GLenum target, GLenum pname, EvasGLint64 *params)
+{
+ if (!_gles3_api.glGetBufferParameteri64v)
+ return;
+ _gles3_api.glGetBufferParameteri64v(target, pname, params);
+}
+
+static void
+_evgl_glGenSamplers(GLsizei count, GLuint *samplers)
+{
+ if (!_gles3_api.glGenSamplers)
+ return;
+ _gles3_api.glGenSamplers(count, samplers);
+}
+
+static void
+_evgl_glDeleteSamplers(GLsizei count, const GLuint *samplers)
+{
+ if (!_gles3_api.glDeleteSamplers)
+ return;
+ _gles3_api.glDeleteSamplers(count, samplers);
+}
+
+static GLboolean
+_evgl_glIsSampler(GLuint sampler)
+{
+ GLboolean ret;
+ if (!_gles3_api.glIsSampler)
+ return EINA_FALSE;
+ ret = _gles3_api.glIsSampler(sampler);
+ return ret;
+}
+
+static void
+_evgl_glBindSampler(GLuint unit, GLuint sampler)
+{
+ if (!_gles3_api.glBindSampler)
+ return;
+ _gles3_api.glBindSampler(unit, sampler);
+}
+
+static void
+_evgl_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+ if (!_gles3_api.glSamplerParameteri)
+ return;
+ _gles3_api.glSamplerParameteri(sampler, pname, param);
+}
+
+static void
+_evgl_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ if (!_gles3_api.glSamplerParameteriv)
+ return;
+ _gles3_api.glSamplerParameteriv(sampler, pname, param);
+}
+
+static void
+_evgl_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+ if (!_gles3_api.glSamplerParameterf)
+ return;
+ _gles3_api.glSamplerParameterf(sampler, pname, param);
+}
+
+static void
+_evgl_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+{
+ if (!_gles3_api.glSamplerParameterfv)
+ return;
+ _gles3_api.glSamplerParameterfv(sampler, pname, param);
+}
+
+static void
+_evgl_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+{
+ if (!_gles3_api.glGetSamplerParameteriv)
+ return;
+ _gles3_api.glGetSamplerParameteriv(sampler, pname, params);
+}
+
+static void
+_evgl_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+{
+ if (!_gles3_api.glGetSamplerParameterfv)
+ return;
+ _gles3_api.glGetSamplerParameterfv(sampler, pname, params);
+}
+
+static void
+_evgl_glVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ if (!_gles3_api.glVertexAttribDivisor)
+ return;
+ _gles3_api.glVertexAttribDivisor(index, divisor);
+}
+
+static void
+_evgl_glBindTransformFeedback(GLenum target, GLuint id)
+{
+ if (!_gles3_api.glBindTransformFeedback)
+ return;
+ _gles3_api.glBindTransformFeedback(target, id);
+}
+
+static void
+_evgl_glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+ if (!_gles3_api.glDeleteTransformFeedbacks)
+ return;
+ _gles3_api.glDeleteTransformFeedbacks(n, ids);
+}
+
+static void
+_evgl_glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ if (!_gles3_api.glGenTransformFeedbacks)
+ return;
+ _gles3_api.glGenTransformFeedbacks(n, ids);
+}
+
+static GLboolean
+_evgl_glIsTransformFeedback(GLuint id)
+{
+ GLboolean ret;
+ if (!_gles3_api.glIsTransformFeedback)
+ return EINA_FALSE;
+ ret = _gles3_api.glIsTransformFeedback(id);
+ return ret;
+}
+
+static void
+_evgl_glPauseTransformFeedback(void)
+{
+ if (!_gles3_api.glPauseTransformFeedback)
+ return;
+ _gles3_api.glPauseTransformFeedback();
+}
+
+static void
+_evgl_glResumeTransformFeedback(void)
+{
+ if (!_gles3_api.glResumeTransformFeedback)
+ return;
+ _gles3_api.glResumeTransformFeedback();
+}
+
+static void
+_evgl_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
+{
+ if (!_gles3_api.glGetProgramBinary)
+ return;
+ _gles3_api.glGetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+static void
+_evgl_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)
+{
+ if (!_gles3_api.glProgramBinary)
+ return;
+ _gles3_api.glProgramBinary(program, binaryFormat, binary, length);
+}
+
+static void
+_evgl_glProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+ if (!_gles3_api.glProgramParameteri)
+ return;
+ _gles3_api.glProgramParameteri(program, pname, value);
+}
+
+static void
+_evgl_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ if (!_gles3_api.glInvalidateFramebuffer)
+ return;
+ _gles3_api.glInvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+static void
+_evgl_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ if (!_gles3_api.glInvalidateSubFramebuffer)
+ return;
+ _gles3_api.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
+}
+
+static void
+_evgl_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ if (!_gles3_api.glTexStorage2D)
+ return;
+ _gles3_api.glTexStorage2D(target, levels, internalformat, width, height);
+}
+
+static void
+_evgl_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ if (!_gles3_api.glTexStorage3D)
+ return;
+ _gles3_api.glTexStorage3D(target, levels, internalformat, width, height, depth);
+}
+
+static void
+_evgl_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
+{
+ if (!_gles3_api.glGetInternalformativ)
+ return;
+ _gles3_api.glGetInternalformativ(target, internalformat, pname, bufSize, params);
+}
+
+//-------------------------------------------------------------//
+// Debug Evas GL APIs
+// - GL APIs Overriden for debugging purposes
+//-------------------------------------------------------------//
+
+void
+_evgld_glActiveTexture(GLenum texture)
+{
+ EVGL_FUNC_BEGIN();
+ glActiveTexture(texture);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glAttachShader(GLuint program, GLuint shader)
+{
+ EVGL_FUNC_BEGIN();
+ glAttachShader(program, shader);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBindAttribLocation(GLuint program, GLuint idx, const char* name)
+{
+ EVGL_FUNC_BEGIN();
+ glBindAttribLocation(program, idx, name);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBindBuffer(GLenum target, GLuint buffer)
+{
+ EVGL_FUNC_BEGIN();
+ glBindBuffer(target, buffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glBindFramebuffer(target, framebuffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+ EVGL_FUNC_BEGIN();
+ glBindRenderbuffer(target, renderbuffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBindTexture(GLenum target, GLuint texture)
+{
+ EVGL_FUNC_BEGIN();
+ glBindTexture(target, texture);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ EVGL_FUNC_BEGIN();
+ glBlendColor(red, green, blue, alpha);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBlendEquation(GLenum mode)
+{
+ EVGL_FUNC_BEGIN();
+ glBlendEquation(mode);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+{
+ EVGL_FUNC_BEGIN();
+ glBlendEquationSeparate(modeRGB, modeAlpha);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ EVGL_FUNC_BEGIN();
+ glBlendFunc(sfactor, dfactor);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+{
+ EVGL_FUNC_BEGIN();
+ glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage)
+{
+ EVGL_FUNC_BEGIN();
+ glBufferData(target, size, data, usage);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data)
+{
+ EVGL_FUNC_BEGIN();
+ glBufferSubData(target, offset, size, data);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+GLenum
+_evgld_glCheckFramebufferStatus(GLenum target)
+{
+ GLenum ret = GL_NONE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glCheckFramebufferStatus(target);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ EVGL_FUNC_BEGIN();
+ _evgl_glClearColor(red, green, blue, alpha);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glClearDepthf(GLclampf depth)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glClearDepthf(depth);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glClearStencil(GLint s)
+{
+ EVGL_FUNC_BEGIN();
+ glClearStencil(s);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ EVGL_FUNC_BEGIN();
+ glColorMask(red, green, blue, alpha);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCompileShader(GLuint shader)
+{
+ EVGL_FUNC_BEGIN();
+ glCompileShader(shader);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
+{
+ EVGL_FUNC_BEGIN();
+ glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
+{
+ EVGL_FUNC_BEGIN();
+ glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ EVGL_FUNC_BEGIN();
+ glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ EVGL_FUNC_BEGIN();
+ glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+GLuint
+_evgld_glCreateProgram(void)
+{
+ GLuint ret = _EVGL_INT_INIT_VALUE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glCreateProgram();
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLuint
+_evgld_glCreateShader(GLenum type)
+{
+ GLuint ret = _EVGL_INT_INIT_VALUE;
+ EVGL_FUNC_BEGIN();
+ ret = glCreateShader(type);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glCullFace(GLenum mode)
+{
+ EVGL_FUNC_BEGIN();
+ glCullFace(mode);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteBuffers(GLsizei n, const GLuint* buffers)
+{
+ EVGL_FUNC_BEGIN();
+ glDeleteBuffers(n, buffers);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
+{
+ EVGL_FUNC_BEGIN();
+ glDeleteFramebuffers(n, framebuffers);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteProgram(GLuint program)
+{
+ EVGL_FUNC_BEGIN();
+ glDeleteProgram(program);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
+{
+ EVGL_FUNC_BEGIN();
+ glDeleteRenderbuffers(n, renderbuffers);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteShader(GLuint shader)
+{
+ EVGL_FUNC_BEGIN();
+ glDeleteShader(shader);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteTextures(GLsizei n, const GLuint* textures)
+{
+ EVGL_FUNC_BEGIN();
+ glDeleteTextures(n, textures);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDepthFunc(GLenum func)
+{
+ EVGL_FUNC_BEGIN();
+ glDepthFunc(func);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDepthMask(GLboolean flag)
+{
+ EVGL_FUNC_BEGIN();
+ glDepthMask(flag);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glDepthRangef(zNear, zFar);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDetachShader(GLuint program, GLuint shader)
+{
+ EVGL_FUNC_BEGIN();
+ glDetachShader(program, shader);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDisableVertexAttribArray(GLuint idx)
+{
+ EVGL_FUNC_BEGIN();
+ glDisableVertexAttribArray(idx);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ EVGL_FUNC_BEGIN();
+ glDrawArrays(mode, first, count);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices)
+{
+ EVGL_FUNC_BEGIN();
+ glDrawElements(mode, count, type, indices);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glEnableVertexAttribArray(GLuint idx)
+{
+ EVGL_FUNC_BEGIN();
+ glEnableVertexAttribArray(idx);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glFinish(void)
+{
+ EVGL_FUNC_BEGIN();
+ glFinish();
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glFlush(void)
+{
+ EVGL_FUNC_BEGIN();
+ glFlush();
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ EVGL_FUNC_BEGIN();
+ glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ EVGL_FUNC_BEGIN();
+ glFramebufferTexture2D(target, attachment, textarget, texture, level);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glFrontFace(GLenum mode)
+{
+ EVGL_FUNC_BEGIN();
+ glFrontFace(mode);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetVertexAttribfv(GLuint idx, GLenum pname, GLfloat* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetVertexAttribfv(idx, pname, params);
+
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetVertexAttribiv(GLuint idx, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetVertexAttribiv(idx, pname, params);
+
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetVertexAttribPointerv(GLuint idx, GLenum pname, void** pointer)
+{
+ EVGL_FUNC_BEGIN();
+ glGetVertexAttribPointerv(idx, pname, pointer);
+
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glHint(GLenum target, GLenum mode)
+{
+ EVGL_FUNC_BEGIN();
+ glHint(target, mode);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGenBuffers(GLsizei n, GLuint* buffers)
+{
+ EVGL_FUNC_BEGIN();
+ glGenBuffers(n, buffers);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGenerateMipmap(GLenum target)
+{
+ EVGL_FUNC_BEGIN();
+ glGenerateMipmap(target);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGenFramebuffers(GLsizei n, GLuint* framebuffers)
+{
+ EVGL_FUNC_BEGIN();
+ glGenFramebuffers(n, framebuffers);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
+{
+ EVGL_FUNC_BEGIN();
+ glGenRenderbuffers(n, renderbuffers);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGenTextures(GLsizei n, GLuint* textures)
+{
+ EVGL_FUNC_BEGIN();
+ glGenTextures(n, textures);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetActiveAttrib(GLuint program, GLuint idx, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+{
+ EVGL_FUNC_BEGIN();
+ glGetActiveAttrib(program, idx, bufsize, length, size, type, name);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetActiveUniform(GLuint program, GLuint idx, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+{
+ EVGL_FUNC_BEGIN();
+ glGetActiveUniform(program, idx, bufsize, length, size, type, name);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
+{
+ EVGL_FUNC_BEGIN();
+ glGetAttachedShaders(program, maxcount, count, shaders);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+int
+_evgld_glGetAttribLocation(GLuint program, const char* name)
+{
+ int ret = _EVGL_INT_INIT_VALUE;
+ EVGL_FUNC_BEGIN();
+ ret = glGetAttribLocation(program, name);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glGetBooleanv(GLenum pname, GLboolean* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetBooleanv(pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetBufferParameteriv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+GLenum
+_evgld_glGetError(void)
+{
+ GLenum ret = GL_NONE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glGetError();
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glGetFloatv(GLenum pname, GLfloat* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetFloatv(pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetProgramiv(GLuint program, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetProgramiv(program, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
+{
+ EVGL_FUNC_BEGIN();
+ glGetProgramInfoLog(program, bufsize, length, infolog);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetRenderbufferParameteriv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetShaderiv(shader, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
+{
+ EVGL_FUNC_BEGIN();
+ glGetShaderInfoLog(shader, bufsize, length, infolog);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
+{
+ EVGL_FUNC_BEGIN();
+ glGetShaderSource(shader, bufsize, length, source);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+const GLubyte *
+_evgld_glGetString(GLenum name)
+{
+ const GLubyte *ret = NULL;
+
+ EVGL_FUNC_BEGIN();
+ ret = _evgl_glGetString(name);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetTexParameterfv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetTexParameteriv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetUniformfv(GLuint program, GLint location, GLfloat* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetUniformfv(program, location, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetUniformiv(GLuint program, GLint location, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glGetUniformiv(program, location, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+int
+_evgld_glGetUniformLocation(GLuint program, const char* name)
+{
+ int ret = _EVGL_INT_INIT_VALUE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glGetUniformLocation(program, name);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsBuffer(GLuint buffer)
+{
+ GLboolean ret = GL_FALSE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glIsBuffer(buffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsEnabled(GLenum cap)
+{
+ GLboolean ret = GL_FALSE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glIsEnabled(cap);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsFramebuffer(GLuint framebuffer)
+{
+ GLboolean ret = GL_FALSE;
+
+ EVGL_FUNC_BEGIN();
+ ret = glIsFramebuffer(framebuffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsProgram(GLuint program)
+{
+ GLboolean ret;
+ EVGL_FUNC_BEGIN();
+ ret = glIsProgram(program);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsRenderbuffer(GLuint renderbuffer)
+{
+ GLboolean ret;
+ EVGL_FUNC_BEGIN();
+ ret = glIsRenderbuffer(renderbuffer);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsShader(GLuint shader)
+{
+ GLboolean ret;
+ EVGL_FUNC_BEGIN();
+ ret = glIsShader(shader);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+GLboolean
+_evgld_glIsTexture(GLuint texture)
+{
+ GLboolean ret;
+ EVGL_FUNC_BEGIN();
+ ret = glIsTexture(texture);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glLineWidth(GLfloat width)
+{
+ EVGL_FUNC_BEGIN();
+ glLineWidth(width);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glLinkProgram(GLuint program)
+{
+ EVGL_FUNC_BEGIN();
+ glLinkProgram(program);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glPixelStorei(GLenum pname, GLint param)
+{
+ EVGL_FUNC_BEGIN();
+ glPixelStorei(pname, param);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ EVGL_FUNC_BEGIN();
+ glPolygonOffset(factor, units);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glReleaseShaderCompiler(void)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glReleaseShaderCompiler();
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ EVGL_FUNC_BEGIN();
+ glRenderbufferStorage(target, internalformat, width, height);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glSampleCoverage(GLclampf value, GLboolean invert)
+{
+ EVGL_FUNC_BEGIN();
+ glSampleCoverage(value, invert);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glShaderBinary(n, shaders, binaryformat, binary, length);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glShaderSource(GLuint shader, GLsizei count, const char* const * string, const GLint* length)
+{
+ EVGL_FUNC_BEGIN();
+#ifdef GL_GLES
+ glShaderSource(shader, count, (const GLchar * const *) string, length);
+#else
+ glShaderSource(shader, count, (const GLchar **) string, length);
+#endif
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ EVGL_FUNC_BEGIN();
+ glStencilFunc(func, ref, mask);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ EVGL_FUNC_BEGIN();
+ glStencilFuncSeparate(face, func, ref, mask);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glStencilMask(GLuint mask)
+{
+ EVGL_FUNC_BEGIN();
+ glStencilMask(mask);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ EVGL_FUNC_BEGIN();
+ glStencilMaskSeparate(face, mask);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ EVGL_FUNC_BEGIN();
+ glStencilOp(fail, zfail, zpass);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
+{
+ EVGL_FUNC_BEGIN();
+ glStencilOpSeparate(face, fail, zfail, zpass);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
+{
+ EVGL_FUNC_BEGIN();
+ glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ EVGL_FUNC_BEGIN();
+ glTexParameterf(target, pname, param);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
+{
+ EVGL_FUNC_BEGIN();
+ glTexParameterfv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ EVGL_FUNC_BEGIN();
+ glTexParameteri(target, pname, param);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ glTexParameteriv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
+{
+ EVGL_FUNC_BEGIN();
+ glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform1f(GLint location, GLfloat x)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform1f(location, x);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform1fv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform1i(GLint location, GLint x)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform1i(location, x);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform1iv(GLint location, GLsizei count, const GLint* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform1iv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform2f(GLint location, GLfloat x, GLfloat y)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform2f(location, x, y);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform2fv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform2i(GLint location, GLint x, GLint y)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform2i(location, x, y);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform2iv(GLint location, GLsizei count, const GLint* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform2iv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform3f(location, x, y, z);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform3fv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform3i(GLint location, GLint x, GLint y, GLint z)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform3i(location, x, y, z);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glUniform3iv(GLint location, GLsizei count, const GLint* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform3iv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
}
void
-_evgld_glDepthMask(GLboolean flag)
+_evgld_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
EVGL_FUNC_BEGIN();
- glDepthMask(flag);
+ glUniform4f(location, x, y, z, w);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glDepthRangef(GLclampf zNear, GLclampf zFar)
+_evgld_glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
{
EVGL_FUNC_BEGIN();
+ glUniform4fv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
- _evgl_glDepthRangef(zNear, zFar);
+void
+_evgld_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform4i(location, x, y, z, w);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+void
+_evgld_glUniform4iv(GLint location, GLsizei count, const GLint* v)
+{
+ EVGL_FUNC_BEGIN();
+ glUniform4iv(location, count, v);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glDetachShader(GLuint program, GLuint shader)
+_evgld_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
EVGL_FUNC_BEGIN();
- glDetachShader(program, shader);
+ glUniformMatrix2fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glDisableVertexAttribArray(GLuint idx)
+_evgld_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
EVGL_FUNC_BEGIN();
- glDisableVertexAttribArray(idx);
+ glUniformMatrix3fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glDrawArrays(GLenum mode, GLint first, GLsizei count)
+_evgld_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
EVGL_FUNC_BEGIN();
- glDrawArrays(mode, first, count);
+ glUniformMatrix4fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices)
+_evgld_glUseProgram(GLuint program)
{
EVGL_FUNC_BEGIN();
- glDrawElements(mode, count, type, indices);
+ glUseProgram(program);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glEnableVertexAttribArray(GLuint idx)
+_evgld_glValidateProgram(GLuint program)
{
EVGL_FUNC_BEGIN();
- glEnableVertexAttribArray(idx);
+ glValidateProgram(program);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glFinish(void)
+_evgld_glVertexAttrib1f(GLuint indx, GLfloat x)
{
EVGL_FUNC_BEGIN();
- glFinish();
+ glVertexAttrib1f(indx, x);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glFlush(void)
+_evgld_glVertexAttrib1fv(GLuint indx, const GLfloat* values)
{
EVGL_FUNC_BEGIN();
- glFlush();
+ glVertexAttrib1fv(indx, values);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+_evgld_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
{
EVGL_FUNC_BEGIN();
- glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+ glVertexAttrib2f(indx, x, y);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+_evgld_glVertexAttrib2fv(GLuint indx, const GLfloat* values)
{
EVGL_FUNC_BEGIN();
- glFramebufferTexture2D(target, attachment, textarget, texture, level);
+ glVertexAttrib2fv(indx, values);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glFrontFace(GLenum mode)
+_evgld_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
+{
+ EVGL_FUNC_BEGIN();
+ glVertexAttrib3f(indx, x, y, z);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glVertexAttrib3fv(GLuint indx, const GLfloat* values)
+{
+ EVGL_FUNC_BEGIN();
+ glVertexAttrib3fv(indx, values);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ EVGL_FUNC_BEGIN();
+ glVertexAttrib4f(indx, x, y, z, w);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glVertexAttrib4fv(GLuint indx, const GLfloat* values)
+{
+ EVGL_FUNC_BEGIN();
+ glVertexAttrib4fv(indx, values);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
+{
+ EVGL_FUNC_BEGIN();
+ glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+//-------------------------------------------------------------//
+// Open GLES 3.0 APIs
+
+void
+_evgld_glReadBuffer(GLenum mode)
+{
+ if (!_gles3_api.glReadBuffer)
+ {
+ ERR("Can not call glReadBuffer() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glReadBuffer(mode);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ if (!_gles3_api.glDrawRangeElements)
+ {
+ ERR("Can not call glDrawRangeElements() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glDrawRangeElements(mode, start, end, count, type, indices);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ if (!_gles3_api.glTexImage3D)
+ {
+ ERR("Can not call glTexImage3D() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ if (!_gles3_api.glTexSubImage3D)
+ {
+ ERR("Can not call glTexSubImage3D() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ if (!_gles3_api.glCopyTexSubImage3D)
+ {
+ ERR("Can not call glCopyTexSubImage3D() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ if (!_gles3_api.glCompressedTexImage3D)
+ {
+ ERR("Can not call glCompressedTexImage3D() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ if (!_gles3_api.glCompressedTexSubImage3D)
+ {
+ ERR("Can not call glCompressedTexSubImage3D() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGenQueries(GLsizei n, GLuint *ids)
+{
+ if (!_gles3_api.glGenQueries)
+ {
+ ERR("Can not call glGenQueries() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glGenQueries(n, ids);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glDeleteQueries(GLsizei n, const GLuint *ids)
+{
+ if (!_gles3_api.glDeleteQueries)
+ {
+ ERR("Can not call glDeleteQueries() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glDeleteQueries(n, ids);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+GLboolean
+ _evgld_glIsQuery(GLuint id)
+{
+ if (!_gles3_api.glIsQuery)
+ {
+ ERR("Can not call glIsQuery() in this context!");
+ return EINA_FALSE;
+ }
+ GLboolean ret;
+ EVGL_FUNC_BEGIN();
+ ret = _evgl_glIsQuery(id);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+ return ret;
+}
+
+void
+_evgld_glBeginQuery(GLenum target, GLuint id)
+{
+ if (!_gles3_api.glBeginQuery)
+ {
+ ERR("Can not call glBeginQuery() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glBeginQuery(target, id);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glEndQuery(GLenum target)
+{
+ if (!_gles3_api.glEndQuery)
+ {
+ ERR("Can not call glEndQuery() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glEndQuery(target);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+{
+ if (!_gles3_api.glGetQueryiv)
+ {
+ ERR("Can not call glGetQueryiv() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glGetQueryiv(target, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+void
+_evgld_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+{
+ if (!_gles3_api.glGetQueryObjectuiv)
+ {
+ ERR("Can not call glGetQueryObjectuiv() in this context!");
+ return;
+ }
+ EVGL_FUNC_BEGIN();
+ _evgl_glGetQueryObjectuiv(id, pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+GLboolean
+_evgld_glUnmapBuffer(GLenum target)
{
+ if (!_gles3_api.glUnmapBuffer)
+ {
+ ERR("Can not call glUnmapBuffer() in this context!");
+ return EINA_FALSE;
+ }
+ GLboolean ret;
EVGL_FUNC_BEGIN();
- glFrontFace(mode);
+ ret = _evgl_glUnmapBuffer(target);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glGetVertexAttribfv(GLuint idx, GLenum pname, GLfloat* params)
+_evgld_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params)
{
+ if (!_gles3_api.glGetBufferPointerv)
+ {
+ ERR("Can not call glGetBufferPointerv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetVertexAttribfv(idx, pname, params);
-
+ _evgl_glGetBufferPointerv(target, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetVertexAttribiv(GLuint idx, GLenum pname, GLint* params)
+_evgld_glDrawBuffers(GLsizei n, const GLenum *bufs)
{
+ if (!_gles3_api.glDrawBuffers)
+ {
+ ERR("Can not call glDrawBuffers() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetVertexAttribiv(idx, pname, params);
-
+ _evgl_glDrawBuffers(n, bufs);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetVertexAttribPointerv(GLuint idx, GLenum pname, void** pointer)
+_evgld_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
+ if (!_gles3_api.glUniformMatrix2x3fv)
+ {
+ ERR("Can not call glUniformMatrix2x3fv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetVertexAttribPointerv(idx, pname, pointer);
-
+ _evgl_glUniformMatrix2x3fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
EVGL_FUNC_END();
}
void
-_evgld_glHint(GLenum target, GLenum mode)
+_evgld_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
+ if (!_gles3_api.glUniformMatrix3x2fv)
+ {
+ ERR("Can not call glUniformMatrix3x2fv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glHint(target, mode);
+ _evgl_glUniformMatrix3x2fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGenBuffers(GLsizei n, GLuint* buffers)
+_evgld_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
+ if (!_gles3_api.glUniformMatrix2x4fv)
+ {
+ ERR("Can not call glUniformMatrix2x4fv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGenBuffers(n, buffers);
+ _evgl_glUniformMatrix2x4fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGenerateMipmap(GLenum target)
+_evgld_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
+ if (!_gles3_api.glUniformMatrix4x2fv)
+ {
+ ERR("Can not call glUniformMatrix4x2fv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGenerateMipmap(target);
+ _evgl_glUniformMatrix4x2fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGenFramebuffers(GLsizei n, GLuint* framebuffers)
+_evgld_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
+ if (!_gles3_api.glUniformMatrix3x4fv)
+ {
+ ERR("Can not call glUniformMatrix3x4fv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGenFramebuffers(n, framebuffers);
+ _evgl_glUniformMatrix3x4fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
+_evgld_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
+ if (!_gles3_api.glUniformMatrix4x3fv)
+ {
+ ERR("Can not call glUniformMatrix4x3fv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGenRenderbuffers(n, renderbuffers);
+ _evgl_glUniformMatrix4x3fv(location, count, transpose, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGenTextures(GLsizei n, GLuint* textures)
+_evgld_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
{
+ if (!_gles3_api.glBlitFramebuffer)
+ {
+ ERR("Can not call glBlitFramebuffer() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGenTextures(n, textures);
+ _evgl_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetActiveAttrib(GLuint program, GLuint idx, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+_evgld_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
{
+ if (!_gles3_api.glRenderbufferStorageMultisample)
+ {
+ ERR("Can not call glRenderbufferStorageMultisample() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetActiveAttrib(program, idx, bufsize, length, size, type, name);
+ _evgl_glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetActiveUniform(GLuint program, GLuint idx, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
+_evgld_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
{
+ if (!_gles3_api.glFramebufferTextureLayer)
+ {
+ ERR("Can not call glFramebufferTextureLayer() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetActiveUniform(program, idx, bufsize, length, size, type, name);
+ _evgl_glFramebufferTextureLayer(target, attachment, texture, level, layer);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
+void*
+_evgld_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
{
+ if (!_gles3_api.glMapBufferRange)
+ {
+ ERR("Can not call glMapBufferRange() in this context!");
+ return NULL;
+ }
+ void* ret;
EVGL_FUNC_BEGIN();
- glGetAttachedShaders(program, maxcount, count, shaders);
+ ret = _evgl_glMapBufferRange(target, offset, length, access);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
-int
-_evgld_glGetAttribLocation(GLuint program, const char* name)
+GLsync
+_evgld_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
{
- int ret = _EVGL_INT_INIT_VALUE;
+ if (!_gles3_api.glFlushMappedBufferRange)
+ {
+ ERR("Can not call glFlushMappedBufferRange() in this context!");
+ return 0;
+ }
+ GLsync ret;
EVGL_FUNC_BEGIN();
- ret = glGetAttribLocation(program, name);
+ ret = _evgl_glFlushMappedBufferRange(target, offset, length);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
return ret;
}
void
-_evgld_glGetBooleanv(GLenum pname, GLboolean* params)
+_evgld_glBindVertexArray(GLuint array)
{
+ if (!_gles3_api.glBindVertexArray)
+ {
+ ERR("Can not call glBindVertexArray() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetBooleanv(pname, params);
+ _evgl_glBindVertexArray(array);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
+_evgld_glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
{
+ if (!_gles3_api.glDeleteVertexArrays)
+ {
+ ERR("Can not call glDeleteVertexArrays() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetBufferParameteriv(target, pname, params);
+ _evgl_glDeleteVertexArrays(n, arrays);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-GLenum
-_evgld_glGetError(void)
+void
+_evgld_glGenVertexArrays(GLsizei n, GLuint *arrays)
{
- GLenum ret = GL_NONE;
-
+ if (!_gles3_api.glGenVertexArrays)
+ {
+ ERR("Can not call glGenVertexArrays() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glGetError();
+ _evgl_glGenVertexArrays(n, arrays);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-void
-_evgld_glGetFloatv(GLenum pname, GLfloat* params)
+GLboolean
+_evgld_glIsVertexArray(GLuint array)
{
+ if (!_gles3_api.glIsVertexArray)
+ {
+ ERR("Can not call glIsVertexArray() in this context!");
+ return EINA_FALSE;
+ }
+ GLboolean ret;
EVGL_FUNC_BEGIN();
- glGetFloatv(pname, params);
+ ret = _evgl_glIsVertexArray(array);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
+_evgld_glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
{
+ if (!_gles3_api.glGetIntegeri_v)
+ {
+ ERR("Can not call glGetIntegeri_v() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+ _evgl_glGetIntegeri_v(target, index, data);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetProgramiv(GLuint program, GLenum pname, GLint* params)
+_evgld_glBeginTransformFeedback(GLenum primitiveMode)
{
+ if (!_gles3_api.glBeginTransformFeedback)
+ {
+ ERR("Can not call glBeginTransformFeedback() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetProgramiv(program, pname, params);
+ _evgl_glBeginTransformFeedback(primitiveMode);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
+_evgld_glEndTransformFeedback(void)
{
+ if (!_gles3_api.glEndTransformFeedback)
+ {
+ ERR("Can not call glEndTransformFeedback() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetProgramInfoLog(program, bufsize, length, infolog);
+ _evgl_glEndTransformFeedback();
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
+_evgld_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
{
+ if (!_gles3_api.glBindBufferRange)
+ {
+ ERR("Can not call glBindBufferRange() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetRenderbufferParameteriv(target, pname, params);
+ _evgl_glBindBufferRange(target, index, buffer, offset, size);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
+_evgld_glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
{
+ if (!_gles3_api.glBindBufferBase)
+ {
+ ERR("Can not call glBindBufferBase() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetShaderiv(shader, pname, params);
+ _evgl_glBindBufferBase(target, index, buffer);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
+_evgld_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode)
{
+ if (!_gles3_api.glTransformFeedbackVaryings)
+ {
+ ERR("Can not call glTransformFeedbackVaryings() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetShaderInfoLog(shader, bufsize, length, infolog);
+ _evgl_glTransformFeedbackVaryings(program, count, varyings, bufferMode);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
+_evgld_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
{
+ if (!_gles3_api.glGetTransformFeedbackVarying)
+ {
+ ERR("Can not call glGetTransformFeedbackVarying() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
-
- _evgl_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+ _evgl_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
EVGL_FUNC_END();
}
void
-_evgld_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
+_evgld_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
{
+ if (!_gles3_api.glVertexAttribIPointer)
+ {
+ ERR("Can not call glVertexAttribIPointer() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetShaderSource(shader, bufsize, length, source);
+ _evgl_glVertexAttribIPointer(index, size, type, stride, pointer);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-const GLubyte *
-_evgld_glGetString(GLenum name)
+void
+_evgld_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
{
- const GLubyte *ret = NULL;
-
+ if (!_gles3_api.glGetVertexAttribIiv)
+ {
+ ERR("Can not call glGetVertexAttribIiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = _evgl_glGetString(name);
+ _evgl_glGetVertexAttribIiv(index, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
void
-_evgld_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
+_evgld_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
{
+ if (!_gles3_api.glGetVertexAttribIuiv)
+ {
+ ERR("Can not call glGetVertexAttribIuiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetTexParameterfv(target, pname, params);
+ _evgl_glGetVertexAttribIuiv(index, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
+_evgld_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
+ if (!_gles3_api.glVertexAttribI4i)
+ {
+ ERR("Can not call glVertexAttribI4i() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetTexParameteriv(target, pname, params);
+ _evgl_glVertexAttribI4i(index, x, y, z, w);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetUniformfv(GLuint program, GLint location, GLfloat* params)
+_evgld_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
+ if (!_gles3_api.glVertexAttribI4ui)
+ {
+ ERR("Can not call glVertexAttribI4ui() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetUniformfv(program, location, params);
+ _evgl_glVertexAttribI4ui(index, x, y, z, w);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glGetUniformiv(GLuint program, GLint location, GLint* params)
+_evgld_glVertexAttribI4iv(GLuint index, const GLint *v)
{
+ if (!_gles3_api.glVertexAttribI4iv)
+ {
+ ERR("Can not call glVertexAttribI4iv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glGetUniformiv(program, location, params);
+ _evgl_glVertexAttribI4iv(index, v);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-int
-_evgld_glGetUniformLocation(GLuint program, const char* name)
-{
- int ret = _EVGL_INT_INIT_VALUE;
+void
+_evgld_glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ if (!_gles3_api.glVertexAttribI4uiv)
+ {
+ ERR("Can not call glVertexAttribI4uiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glGetUniformLocation(program, name);
+ _evgl_glVertexAttribI4uiv(index, v);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-GLboolean
-_evgld_glIsBuffer(GLuint buffer)
+void
+_evgld_glGetUniformuiv(GLuint program, GLint location, GLuint *params)
{
- GLboolean ret = GL_FALSE;
-
+ if (!_gles3_api.glGetUniformuiv)
+ {
+ ERR("Can not call glGetUniformuiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glIsBuffer(buffer);
+ _evgl_glGetUniformuiv(program, location, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-GLboolean
-_evgld_glIsEnabled(GLenum cap)
+GLint
+_evgld_glGetFragDataLocation(GLuint program, const GLchar *name)
{
- GLboolean ret = GL_FALSE;
-
+ if (!_gles3_api.glGetFragDataLocation)
+ {
+ ERR("Can not call glGetFragDataLocation() in this context!");
+ return EVAS_GL_NOT_INITIALIZED;
+ }
+ GLint ret;
EVGL_FUNC_BEGIN();
- ret = glIsEnabled(cap);
+ ret = _evgl_glGetFragDataLocation(program, name);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
return ret;
}
-GLboolean
-_evgld_glIsFramebuffer(GLuint framebuffer)
+void
+_evgld_glUniform1ui(GLint location, GLuint v0)
{
- GLboolean ret = GL_FALSE;
-
+ if (!_gles3_api.glUniform1ui)
+ {
+ ERR("Can not call glUniform1ui() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glIsFramebuffer(framebuffer);
+ _evgl_glUniform1ui(location, v0);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-GLboolean
-_evgld_glIsProgram(GLuint program)
+void
+_evgld_glUniform2ui(GLint location, GLuint v0, GLuint v1)
{
- GLboolean ret;
+ if (!_gles3_api.glUniform2ui)
+ {
+ ERR("Can not call glUniform2ui() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glIsProgram(program);
+ _evgl_glUniform2ui(location, v0, v1);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-GLboolean
-_evgld_glIsRenderbuffer(GLuint renderbuffer)
+void
+_evgld_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
{
- GLboolean ret;
+ if (!_gles3_api.glUniform3ui)
+ {
+ ERR("Can not call glUniform3ui() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glIsRenderbuffer(renderbuffer);
+ _evgl_glUniform3ui(location, v0, v1, v2);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-GLboolean
-_evgld_glIsShader(GLuint shader)
+void
+_evgld_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
- GLboolean ret;
+ if (!_gles3_api.glUniform4ui)
+ {
+ ERR("Can not call glUniform4ui() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glIsShader(shader);
+ _evgl_glUniform4ui(location, v0, v1, v2, v3);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
-GLboolean
-_evgld_glIsTexture(GLuint texture)
+void
+_evgld_glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
{
- GLboolean ret;
+ if (!_gles3_api.glUniform1uiv)
+ {
+ ERR("Can not call glUniform1uiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- ret = glIsTexture(texture);
+ _evgl_glUniform1uiv(location, count, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
- return ret;
}
void
-_evgld_glLineWidth(GLfloat width)
+_evgld_glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
{
+ if (!_gles3_api.glUniform2uiv)
+ {
+ ERR("Can not call glUniform2uiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glLineWidth(width);
+ _evgl_glUniform2uiv(location, count, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glLinkProgram(GLuint program)
+_evgld_glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
{
+ if (!_gles3_api.glUniform3uiv)
+ {
+ ERR("Can not call glUniform3uiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glLinkProgram(program);
+ _evgl_glUniform3uiv(location, count, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glPixelStorei(GLenum pname, GLint param)
+_evgld_glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
{
+ if (!_gles3_api.glUniform4uiv)
+ {
+ ERR("Can not call glUniform4uiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glPixelStorei(pname, param);
+ _evgl_glUniform4uiv(location, count, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glPolygonOffset(GLfloat factor, GLfloat units)
+_evgld_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
{
+ if (!_gles3_api.glClearBufferiv)
+ {
+ ERR("Can not call glClearBufferiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glPolygonOffset(factor, units);
+ _evgl_glClearBufferiv(buffer, drawbuffer, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glReleaseShaderCompiler(void)
+_evgld_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
{
+ if (!_gles3_api.glClearBufferuiv)
+ {
+ ERR("Can not call glClearBufferuiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
-
- _evgl_glReleaseShaderCompiler();
+ _evgl_glClearBufferuiv(buffer, drawbuffer, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
EVGL_FUNC_END();
}
void
-_evgld_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+_evgld_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
{
+ if (!_gles3_api.glClearBufferfv)
+ {
+ ERR("Can not call glClearBufferfv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glRenderbufferStorage(target, internalformat, width, height);
+ _evgl_glClearBufferfv(buffer, drawbuffer, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glSampleCoverage(GLclampf value, GLboolean invert)
+_evgld_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
{
+ if (!_gles3_api.glClearBufferfi)
+ {
+ ERR("Can not call glClearBufferfi() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glSampleCoverage(value, invert);
+ _evgl_glClearBufferfi(buffer, drawbuffer, depth, stencil);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
+const GLubyte *
+ _evgld_glGetStringi(GLenum name, GLuint index)
{
+ if (!_gles3_api.glGetStringi)
+ {
+ ERR("Can not call glGetStringi() in this context!");
+ return NULL;
+ }
+ const GLubyte *ret;
EVGL_FUNC_BEGIN();
-
- _evgl_glShaderBinary(n, shaders, binaryformat, binary, length);
+ ret = _evgl_glGetStringi(name, index);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glShaderSource(GLuint shader, GLsizei count, const char* const * string, const GLint* length)
+_evgld_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
{
+ if (!_gles3_api.glCopyBufferSubData)
+ {
+ ERR("Can not call glCopyBufferSubData() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
-#ifdef GL_GLES
- glShaderSource(shader, count, (const GLchar * const *) string, length);
-#else
- glShaderSource(shader, count, (const GLchar **) string, length);
-#endif
+ _evgl_glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glStencilFunc(GLenum func, GLint ref, GLuint mask)
+_evgld_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices)
{
+ if (!_gles3_api.glGetUniformIndices)
+ {
+ ERR("Can not call glGetUniformIndices() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glStencilFunc(func, ref, mask);
+ _evgl_glGetUniformIndices(program, uniformCount, uniformNames,uniformIndices);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+_evgld_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
{
+ if (!_gles3_api.glGetActiveUniformsiv)
+ {
+ ERR("Can not call glGetActiveUniformsiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glStencilFuncSeparate(face, func, ref, mask);
+ _evgl_glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glStencilMask(GLuint mask)
+GLuint
+_evgld_glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
{
+ if (!_gles3_api.glGetUniformBlockIndex)
+ {
+ ERR("Can not call glGetUniformBlockIndex() in this context!");
+ return EVAS_GL_NOT_INITIALIZED;
+ }
+ GLuint ret;
EVGL_FUNC_BEGIN();
- glStencilMask(mask);
+ ret = _evgl_glGetUniformBlockIndex(program, uniformBlockName);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glStencilMaskSeparate(GLenum face, GLuint mask)
+_evgld_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
{
+ if (!_gles3_api.glGetActiveUniformBlockiv)
+ {
+ ERR("Can not call glGetActiveUniformBlockiv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glStencilMaskSeparate(face, mask);
+ _evgl_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+_evgld_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
{
+ if (!_gles3_api.glGetActiveUniformBlockName)
+ {
+ ERR("Can not call glGetActiveUniformBlockName() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glStencilOp(fail, zfail, zpass);
+ _evgl_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
+_evgld_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
{
+ if (!_gles3_api.glUniformBlockBinding)
+ {
+ ERR("Can not call glUniformBlockBinding() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glStencilOpSeparate(face, fail, zfail, zpass);
+ _evgl_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
+_evgld_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
{
+ if (!_gles3_api.glDrawArraysInstanced)
+ {
+ ERR("Can not call glDrawArraysInstanced() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+ _evgl_glDrawArraysInstanced(mode, first, count, instancecount);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+_evgld_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount)
{
+ if (!_gles3_api.glDrawElementsInstanced)
+ {
+ ERR("Can not call glDrawElementsInstanced() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glTexParameterf(target, pname, param);
+ _evgl_glDrawElementsInstanced(mode, count, type, indices, instancecount);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
+GLsync
+_evgld_glFenceSync(GLenum condition, GLbitfield flags)
{
+ if (!_gles3_api.glFenceSync)
+ {
+ ERR("Can not call glFenceSync() in this context!");
+ return 0;
+ }
+ GLsync ret;
EVGL_FUNC_BEGIN();
- glTexParameterfv(target, pname, params);
+ ret = _evgl_glFenceSync(condition, flags);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
-void
-_evgld_glTexParameteri(GLenum target, GLenum pname, GLint param)
+GLboolean
+_evgld_glIsSync(GLsync sync)
{
+ if (!_gles3_api.glIsSync)
+ {
+ ERR("Can not call glIsSync() in this context!");
+ return EINA_FALSE;
+ }
+ GLboolean ret;
EVGL_FUNC_BEGIN();
- glTexParameteri(target, pname, param);
+ ret = _evgl_glIsSync(sync);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
+_evgld_glDeleteSync(GLsync sync)
{
+ if (!_gles3_api.glDeleteSync)
+ {
+ ERR("Can not call glDeleteSync() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glTexParameteriv(target, pname, params);
+ _evgl_glDeleteSync(sync);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
+GLenum
+_evgld_glClientWaitSync(GLsync sync, GLbitfield flags, EvasGLuint64 timeout)
{
+ if (!_gles3_api.glClientWaitSync)
+ {
+ ERR("Can not call glClientWaitSync() in this context!");
+ return EVAS_GL_NOT_INITIALIZED;
+ }
+ GLenum ret;
EVGL_FUNC_BEGIN();
- glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ ret = _evgl_glClientWaitSync(sync, flags, timeout);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glUniform1f(GLint location, GLfloat x)
+_evgld_glWaitSync(GLsync sync, GLbitfield flags, EvasGLuint64 timeout)
{
+ if (!_gles3_api.glWaitSync)
+ {
+ ERR("Can not call glWaitSync() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform1f(location, x);
+ _evgl_glWaitSync(sync, flags, timeout);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
+_evgld_glGetInteger64v(GLenum pname, EvasGLint64 *params)
{
+ if (!_gles3_api.glGetInteger64v)
+ {
+ ERR("Can not call glGetInteger64v() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform1fv(location, count, v);
+ _evgl_glGetInteger64v(pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform1i(GLint location, GLint x)
+_evgld_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
{
+ if (!_gles3_api.glGetSynciv)
+ {
+ ERR("Can not call glGetSynciv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform1i(location, x);
+ _evgl_glGetSynciv(sync, pname, bufSize, length, values);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform1iv(GLint location, GLsizei count, const GLint* v)
+_evgld_glGetInteger64i_v(GLenum target, GLuint index, EvasGLint64 *data)
{
+ if (!_gles3_api.glGetInteger64i_v)
+ {
+ ERR("Can not call glGetInteger64i_v() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform1iv(location, count, v);
+ _evgl_glGetInteger64i_v(target, index, data);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform2f(GLint location, GLfloat x, GLfloat y)
+_evgld_glGetBufferParameteri64v(GLenum target, GLenum pname, EvasGLint64 *params)
{
+ if (!_gles3_api.glGetBufferParameteri64v)
+ {
+ ERR("Can not call glGetBufferParameteri64v() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform2f(location, x, y);
+ _evgl_glGetBufferParameteri64v(target, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
+_evgld_glGenSamplers(GLsizei count, GLuint *samplers)
{
+ if (!_gles3_api.glGenSamplers)
+ {
+ ERR("Can not call glGenSamplers() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform2fv(location, count, v);
+ _evgl_glGenSamplers(count, samplers);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform2i(GLint location, GLint x, GLint y)
+_evgld_glDeleteSamplers(GLsizei count, const GLuint *samplers)
{
+ if (!_gles3_api.glDeleteSamplers)
+ {
+ ERR("Can not call glDeleteSamplers() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform2i(location, x, y);
+ _evgl_glDeleteSamplers(count, samplers);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glUniform2iv(GLint location, GLsizei count, const GLint* v)
+GLboolean
+_evgld_glIsSampler(GLuint sampler)
{
+ if (!_gles3_api.glIsSampler)
+ {
+ ERR("Can not call glIsSampler() in this context!");
+ return EINA_FALSE;
+ }
+ GLboolean ret;
EVGL_FUNC_BEGIN();
- glUniform2iv(location, count, v);
+ ret = _evgl_glIsSampler(sampler);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
+_evgld_glBindSampler(GLuint unit, GLuint sampler)
{
+ if (!_gles3_api.glBindSampler)
+ {
+ ERR("Can not call glBindSampler() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform3f(location, x, y, z);
+ _evgl_glBindSampler(unit, sampler);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
+_evgld_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
{
+ if (!_gles3_api.glSamplerParameteri)
+ {
+ ERR("Can not call glSamplerParameteri() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform3fv(location, count, v);
+ _evgl_glSamplerParameteri(sampler, pname, param);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform3i(GLint location, GLint x, GLint y, GLint z)
+_evgld_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
{
+ if (!_gles3_api.glSamplerParameteriv)
+ {
+ ERR("Can not call glSamplerParameteriv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform3i(location, x, y, z);
+ _evgl_glSamplerParameteriv(sampler, pname, param);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform3iv(GLint location, GLsizei count, const GLint* v)
+_evgld_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
{
+ if (!_gles3_api.glSamplerParameterf)
+ {
+ ERR("Can not call glSamplerParameterf() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform3iv(location, count, v);
+ _evgl_glSamplerParameterf(sampler, pname, param);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+_evgld_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
{
+ if (!_gles3_api.glSamplerParameterfv)
+ {
+ ERR("Can not call glSamplerParameterfv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform4f(location, x, y, z, w);
+ _evgl_glSamplerParameterfv(sampler, pname, param);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
+_evgld_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
{
+ if (!_gles3_api.glGetSamplerParameteriv)
+ {
+ ERR("Can not call glGetSamplerParameteriv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform4fv(location, count, v);
+ _evgl_glGetSamplerParameteriv(sampler, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
+_evgld_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
{
+ if (!_gles3_api.glGetSamplerParameterfv)
+ {
+ ERR("Can not call glGetSamplerParameterfv() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform4i(location, x, y, z, w);
+ _evgl_glGetSamplerParameterfv(sampler, pname, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniform4iv(GLint location, GLsizei count, const GLint* v)
+_evgld_glVertexAttribDivisor(GLuint index, GLuint divisor)
{
+ if (!_gles3_api.glVertexAttribDivisor)
+ {
+ ERR("Can not call glVertexAttribDivisor() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniform4iv(location, count, v);
+ _evgl_glVertexAttribDivisor(index, divisor);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+_evgld_glBindTransformFeedback(GLenum target, GLuint id)
{
+ if (!_gles3_api.glBindTransformFeedback)
+ {
+ ERR("Can not call glBindTransformFeedback() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniformMatrix2fv(location, count, transpose, value);
+ _evgl_glBindTransformFeedback(target, id);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+_evgld_glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
{
+ if (!_gles3_api.glDeleteTransformFeedbacks)
+ {
+ ERR("Can not call glDeleteTransformFeedbacks() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniformMatrix3fv(location, count, transpose, value);
+ _evgl_glDeleteTransformFeedbacks(n, ids);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+_evgld_glGenTransformFeedbacks(GLsizei n, GLuint *ids)
{
+ if (!_gles3_api.glGenTransformFeedbacks)
+ {
+ ERR("Can not call glGenTransformFeedbacks() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glUniformMatrix4fv(location, count, transpose, value);
+ _evgl_glGenTransformFeedbacks(n, ids);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
-void
-_evgld_glUseProgram(GLuint program)
+GLboolean
+_evgld_glIsTransformFeedback(GLuint id)
{
+ if (!_gles3_api.glIsTransformFeedback)
+ {
+ ERR("Can not call glIsTransformFeedback() in this context!");
+ return EINA_FALSE;
+ }
+ GLboolean ret;
EVGL_FUNC_BEGIN();
- glUseProgram(program);
+ ret = _evgl_glIsTransformFeedback(id);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
+ return ret;
}
void
-_evgld_glValidateProgram(GLuint program)
+_evgld_glPauseTransformFeedback(void)
{
+ if (!_gles3_api.glPauseTransformFeedback)
+ {
+ ERR("Can not call glPauseTransformFeedback() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glValidateProgram(program);
+ _evgl_glPauseTransformFeedback();
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib1f(GLuint indx, GLfloat x)
+_evgld_glResumeTransformFeedback(void)
{
+ if (!_gles3_api.glResumeTransformFeedback)
+ {
+ ERR("Can not call glResumeTransformFeedback() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib1f(indx, x);
+ _evgl_glResumeTransformFeedback();
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib1fv(GLuint indx, const GLfloat* values)
+_evgld_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
{
+ if (!_gles3_api.glGetProgramBinary)
+ {
+ ERR("Can not call glGetProgramBinary() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib1fv(indx, values);
+ _evgl_glGetProgramBinary(program, bufSize, length, binaryFormat, binary);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
+_evgld_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)
{
+ if (!_gles3_api.glProgramBinary)
+ {
+ ERR("Can not call glProgramBinary() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib2f(indx, x, y);
+ _evgl_glProgramBinary(program, binaryFormat, binary, length);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib2fv(GLuint indx, const GLfloat* values)
+_evgld_glProgramParameteri(GLuint program, GLenum pname, GLint value)
{
+ if (!_gles3_api.glProgramParameteri)
+ {
+ ERR("Can not call glProgramParameteri() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib2fv(indx, values);
+ _evgl_glProgramParameteri(program, pname, value);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
+_evgld_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
{
+ if (!_gles3_api.glInvalidateFramebuffer)
+ {
+ ERR("Can not call glInvalidateFramebuffer() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib3f(indx, x, y, z);
+ _evgl_glInvalidateFramebuffer(target, numAttachments, attachments);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib3fv(GLuint indx, const GLfloat* values)
+_evgld_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
{
+ if (!_gles3_api.glInvalidateSubFramebuffer)
+ {
+ ERR("Can not call glInvalidateSubFramebuffer() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib3fv(indx, values);
+ _evgl_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+_evgld_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
{
+ if (!_gles3_api.glTexStorage2D)
+ {
+ ERR("Can not call glTexStorage2D() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib4f(indx, x, y, z, w);
+ _evgl_glTexStorage2D(target, levels, internalformat, width, height);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttrib4fv(GLuint indx, const GLfloat* values)
+_evgld_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
{
+ if (!_gles3_api.glTexStorage3D)
+ {
+ ERR("Can not call glTexStorage3D() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttrib4fv(indx, values);
+ _evgl_glTexStorage3D(target, levels, internalformat, width, height, depth);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
void
-_evgld_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
+_evgld_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
{
+ if (!_gles3_api.glGetInternalformativ)
+ {
+ ERR("Can not call glGetInternalformativ() in this context!");
+ return;
+ }
EVGL_FUNC_BEGIN();
- glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
+ _evgl_glGetInternalformativ(target, internalformat, pname, bufSize, params);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
EVGL_FUNC_END();
}
EVGL_FUNC_END();
}
-void
-_evgld_glGetIntegerv(GLenum pname, GLint* params)
-{
- EVGL_FUNC_BEGIN();
- _evgl_glGetIntegerv(pname, params);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
-}
+void
+_evgld_glGetIntegerv(GLenum pname, GLint* params)
+{
+ EVGL_FUNC_BEGIN();
+ _evgl_glGetIntegerv(pname, params);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+static void
+_evgld_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glReadPixels(x, y, width, height, format, type, pixels);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+static void
+_evgld_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glScissor(x, y, width, height);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+
+static void
+_evgld_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ EVGL_FUNC_BEGIN();
+
+ _evgl_glViewport(x, y, width, height);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ EVGL_FUNC_END();
+}
+//-------------------------------------------------------------//
+
+static void
+_normal_gl_api_get(Evas_GL_API *funcs)
+{
+ funcs->version = EVAS_GL_API_VERSION;
+
+#define ORD(f) EVAS_API_OVERRIDE(f, funcs,)
+ // GLES 2.0
+ ORD(glActiveTexture);
+ ORD(glAttachShader);
+ ORD(glBindAttribLocation);
+ ORD(glBindBuffer);
+ ORD(glBindTexture);
+ ORD(glBlendColor);
+ ORD(glBlendEquation);
+ ORD(glBlendEquationSeparate);
+ ORD(glBlendFunc);
+ ORD(glBlendFuncSeparate);
+ ORD(glBufferData);
+ ORD(glBufferSubData);
+ ORD(glCheckFramebufferStatus);
+// ORD(glClear);
+// ORD(glClearColor);
+// ORD(glClearDepthf);
+ ORD(glClearStencil);
+ ORD(glColorMask);
+ ORD(glCompileShader);
+ ORD(glCompressedTexImage2D);
+ ORD(glCompressedTexSubImage2D);
+ ORD(glCopyTexImage2D);
+ ORD(glCopyTexSubImage2D);
+ ORD(glCreateProgram);
+ ORD(glCreateShader);
+ ORD(glCullFace);
+ ORD(glDeleteBuffers);
+ ORD(glDeleteFramebuffers);
+ ORD(glDeleteProgram);
+ ORD(glDeleteRenderbuffers);
+ ORD(glDeleteShader);
+ ORD(glDeleteTextures);
+ ORD(glDepthFunc);
+ ORD(glDepthMask);
+// ORD(glDepthRangef);
+ ORD(glDetachShader);
+// ORD(glDisable);
+ ORD(glDisableVertexAttribArray);
+ ORD(glDrawArrays);
+ ORD(glDrawElements);
+// ORD(glEnable);
+ ORD(glEnableVertexAttribArray);
+ ORD(glFinish);
+ ORD(glFlush);
+ ORD(glFramebufferRenderbuffer);
+ ORD(glFramebufferTexture2D);
+ ORD(glFrontFace);
+ ORD(glGenBuffers);
+ ORD(glGenerateMipmap);
+ ORD(glGenFramebuffers);
+ ORD(glGenRenderbuffers);
+ ORD(glGenTextures);
+ ORD(glGetActiveAttrib);
+ ORD(glGetActiveUniform);
+ ORD(glGetAttachedShaders);
+ ORD(glGetAttribLocation);
+ ORD(glGetBooleanv);
+ ORD(glGetBufferParameteriv);
+ ORD(glGetError);
+ ORD(glGetFloatv);
+ ORD(glGetFramebufferAttachmentParameteriv);
+// ORD(glGetIntegerv);
+ ORD(glGetProgramiv);
+ ORD(glGetProgramInfoLog);
+ ORD(glGetRenderbufferParameteriv);
+ ORD(glGetShaderiv);
+ ORD(glGetShaderInfoLog);
+// ORD(glGetShaderPrecisionFormat);
+ ORD(glGetShaderSource);
+// ORD(glGetString);
+ ORD(glGetTexParameterfv);
+ ORD(glGetTexParameteriv);
+ ORD(glGetUniformfv);
+ ORD(glGetUniformiv);
+ ORD(glGetUniformLocation);
+ ORD(glGetVertexAttribfv);
+ ORD(glGetVertexAttribiv);
+ ORD(glGetVertexAttribPointerv);
+ ORD(glHint);
+ ORD(glIsBuffer);
+ ORD(glIsEnabled);
+ ORD(glIsFramebuffer);
+ ORD(glIsProgram);
+ ORD(glIsRenderbuffer);
+ ORD(glIsShader);
+ ORD(glIsTexture);
+ ORD(glLineWidth);
+ ORD(glLinkProgram);
+ ORD(glPixelStorei);
+ ORD(glPolygonOffset);
+// ORD(glReadPixels);
+// ORD(glReleaseShaderCompiler);
+ ORD(glRenderbufferStorage);
+ ORD(glSampleCoverage);
+// ORD(glScissor);
+// ORD(glShaderBinary);
+// Deal with double glShaderSource signature
+ funcs->glShaderSource = (void (*)(GLuint, GLsizei, const char * const *, const GLint *))glShaderSource;
+ ORD(glStencilFunc);
+ ORD(glStencilFuncSeparate);
+ ORD(glStencilMask);
+ ORD(glStencilMaskSeparate);
+ ORD(glStencilOp);
+ ORD(glStencilOpSeparate);
+ ORD(glTexImage2D);
+ ORD(glTexParameterf);
+ ORD(glTexParameterfv);
+ ORD(glTexParameteri);
+ ORD(glTexParameteriv);
+ ORD(glTexSubImage2D);
+ ORD(glUniform1f);
+ ORD(glUniform1fv);
+ ORD(glUniform1i);
+ ORD(glUniform1iv);
+ ORD(glUniform2f);
+ ORD(glUniform2fv);
+ ORD(glUniform2i);
+ ORD(glUniform2iv);
+ ORD(glUniform3f);
+ ORD(glUniform3fv);
+ ORD(glUniform3i);
+ ORD(glUniform3iv);
+ ORD(glUniform4f);
+ ORD(glUniform4fv);
+ ORD(glUniform4i);
+ ORD(glUniform4iv);
+ ORD(glUniformMatrix2fv);
+ ORD(glUniformMatrix3fv);
+ ORD(glUniformMatrix4fv);
+ ORD(glUseProgram);
+ ORD(glValidateProgram);
+ ORD(glVertexAttrib1f);
+ ORD(glVertexAttrib1fv);
+ ORD(glVertexAttrib2f);
+ ORD(glVertexAttrib2fv);
+ ORD(glVertexAttrib3f);
+ ORD(glVertexAttrib3fv);
+ ORD(glVertexAttrib4f);
+ ORD(glVertexAttrib4fv);
+ ORD(glVertexAttribPointer);
+// ORD(glViewport);
+
+// ORD(glBindFramebuffer);
+ ORD(glBindRenderbuffer);
+#undef ORD
+
+
+#define ORD(f) EVAS_API_OVERRIDE(f, funcs, _evgl_)
+ // For Surface FBO
+ ORD(glBindFramebuffer);
+
+ // For Direct Rendering
+ ORD(glClear);
+ ORD(glClearColor);
+ ORD(glDisable);
+ ORD(glEnable);
+ ORD(glGetIntegerv);
+ ORD(glGetString);
+ ORD(glReadPixels);
+ ORD(glScissor);
+ ORD(glViewport);
+
+ // GLES 2 Compat for Desktop
+ ORD(glClearDepthf);
+ ORD(glDepthRangef);
+ ORD(glGetShaderPrecisionFormat);
+ ORD(glShaderBinary);
+ ORD(glReleaseShaderCompiler);
+
+#undef ORD
+
+ evgl_api_ext_get(funcs);
+}
+
+static void
+_direct_scissor_off_api_get(Evas_GL_API *funcs)
+{
+
+#define ORD(f) EVAS_API_OVERRIDE(f, funcs,)
+ // For Direct Rendering
+ ORD(glClear);
+ ORD(glClearColor);
+ ORD(glDisable);
+ ORD(glEnable);
+ ORD(glGetIntegerv);
+ ORD(glReadPixels);
+ ORD(glScissor);
+ ORD(glViewport);
+#undef ORD
+}
+
static void
-_evgld_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)
+_debug_gl_api_get(Evas_GL_API *funcs)
{
- EVGL_FUNC_BEGIN();
+ funcs->version = EVAS_GL_API_VERSION;
- _evgl_glReadPixels(x, y, width, height, format, type, pixels);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
-}
+#define ORD(f) EVAS_API_OVERRIDE(f, funcs, _evgld_)
+ // GLES 2.0
+ ORD(glActiveTexture);
+ ORD(glAttachShader);
+ ORD(glBindAttribLocation);
+ ORD(glBindBuffer);
+ ORD(glBindTexture);
+ ORD(glBlendColor);
+ ORD(glBlendEquation);
+ ORD(glBlendEquationSeparate);
+ ORD(glBlendFunc);
+ ORD(glBlendFuncSeparate);
+ ORD(glBufferData);
+ ORD(glBufferSubData);
+ ORD(glCheckFramebufferStatus);
+ ORD(glClear);
+ ORD(glClearColor);
+ ORD(glClearDepthf);
+ ORD(glClearStencil);
+ ORD(glColorMask);
+ ORD(glCompileShader);
+ ORD(glCompressedTexImage2D);
+ ORD(glCompressedTexSubImage2D);
+ ORD(glCopyTexImage2D);
+ ORD(glCopyTexSubImage2D);
+ ORD(glCreateProgram);
+ ORD(glCreateShader);
+ ORD(glCullFace);
+ ORD(glDeleteBuffers);
+ ORD(glDeleteFramebuffers);
+ ORD(glDeleteProgram);
+ ORD(glDeleteRenderbuffers);
+ ORD(glDeleteShader);
+ ORD(glDeleteTextures);
+ ORD(glDepthFunc);
+ ORD(glDepthMask);
+ ORD(glDepthRangef);
+ ORD(glDetachShader);
+ ORD(glDisable);
+ ORD(glDisableVertexAttribArray);
+ ORD(glDrawArrays);
+ ORD(glDrawElements);
+ ORD(glEnable);
+ ORD(glEnableVertexAttribArray);
+ ORD(glFinish);
+ ORD(glFlush);
+ ORD(glFramebufferRenderbuffer);
+ ORD(glFramebufferTexture2D);
+ ORD(glFrontFace);
+ ORD(glGenBuffers);
+ ORD(glGenerateMipmap);
+ ORD(glGenFramebuffers);
+ ORD(glGenRenderbuffers);
+ ORD(glGenTextures);
+ ORD(glGetActiveAttrib);
+ ORD(glGetActiveUniform);
+ ORD(glGetAttachedShaders);
+ ORD(glGetAttribLocation);
+ ORD(glGetBooleanv);
+ ORD(glGetBufferParameteriv);
+ ORD(glGetError);
+ ORD(glGetFloatv);
+ ORD(glGetFramebufferAttachmentParameteriv);
+ ORD(glGetIntegerv);
+ ORD(glGetProgramiv);
+ ORD(glGetProgramInfoLog);
+ ORD(glGetRenderbufferParameteriv);
+ ORD(glGetShaderiv);
+ ORD(glGetShaderInfoLog);
+ ORD(glGetShaderPrecisionFormat);
+ ORD(glGetShaderSource);
+ ORD(glGetString);
+ ORD(glGetTexParameterfv);
+ ORD(glGetTexParameteriv);
+ ORD(glGetUniformfv);
+ ORD(glGetUniformiv);
+ ORD(glGetUniformLocation);
+ ORD(glGetVertexAttribfv);
+ ORD(glGetVertexAttribiv);
+ ORD(glGetVertexAttribPointerv);
+ ORD(glHint);
+ ORD(glIsBuffer);
+ ORD(glIsEnabled);
+ ORD(glIsFramebuffer);
+ ORD(glIsProgram);
+ ORD(glIsRenderbuffer);
+ ORD(glIsShader);
+ ORD(glIsTexture);
+ ORD(glLineWidth);
+ ORD(glLinkProgram);
+ ORD(glPixelStorei);
+ ORD(glPolygonOffset);
+ ORD(glReadPixels);
+ ORD(glReleaseShaderCompiler);
+ ORD(glRenderbufferStorage);
+ ORD(glSampleCoverage);
+ ORD(glScissor);
+ ORD(glShaderBinary);
+ ORD(glShaderSource);
+ ORD(glStencilFunc);
+ ORD(glStencilFuncSeparate);
+ ORD(glStencilMask);
+ ORD(glStencilMaskSeparate);
+ ORD(glStencilOp);
+ ORD(glStencilOpSeparate);
+ ORD(glTexImage2D);
+ ORD(glTexParameterf);
+ ORD(glTexParameterfv);
+ ORD(glTexParameteri);
+ ORD(glTexParameteriv);
+ ORD(glTexSubImage2D);
+ ORD(glUniform1f);
+ ORD(glUniform1fv);
+ ORD(glUniform1i);
+ ORD(glUniform1iv);
+ ORD(glUniform2f);
+ ORD(glUniform2fv);
+ ORD(glUniform2i);
+ ORD(glUniform2iv);
+ ORD(glUniform3f);
+ ORD(glUniform3fv);
+ ORD(glUniform3i);
+ ORD(glUniform3iv);
+ ORD(glUniform4f);
+ ORD(glUniform4fv);
+ ORD(glUniform4i);
+ ORD(glUniform4iv);
+ ORD(glUniformMatrix2fv);
+ ORD(glUniformMatrix3fv);
+ ORD(glUniformMatrix4fv);
+ ORD(glUseProgram);
+ ORD(glValidateProgram);
+ ORD(glVertexAttrib1f);
+ ORD(glVertexAttrib1fv);
+ ORD(glVertexAttrib2f);
+ ORD(glVertexAttrib2fv);
+ ORD(glVertexAttrib3f);
+ ORD(glVertexAttrib3fv);
+ ORD(glVertexAttrib4f);
+ ORD(glVertexAttrib4fv);
+ ORD(glVertexAttribPointer);
+ ORD(glViewport);
-static void
-_evgld_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- EVGL_FUNC_BEGIN();
+ ORD(glBindFramebuffer);
+ ORD(glBindRenderbuffer);
+#undef ORD
- _evgl_glScissor(x, y, width, height);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ evgl_api_ext_get(funcs);
}
-static void
-_evgld_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+void
+_evgl_api_get(Evas_GL_API *funcs, int debug)
{
- EVGL_FUNC_BEGIN();
+ if (debug)
+ _debug_gl_api_get(funcs);
+ else
+ _normal_gl_api_get(funcs);
- _evgl_glViewport(x, y, width, height);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- EVGL_FUNC_END();
+ if (evgl_engine->direct_scissor_off)
+ _direct_scissor_off_api_get(funcs);
}
-//-------------------------------------------------------------//
static void
-_normal_gl_api_get(Evas_GL_API *funcs)
+_normal_gles3_api_get(Evas_GL_API *funcs)
{
- funcs->version = EVAS_GL_API_VERSION;
-
#define ORD(f) EVAS_API_OVERRIDE(f, funcs,)
- // GLES 2.0
+ // GLES 3.0 APIs that are same as GLES 2.0
ORD(glActiveTexture);
ORD(glAttachShader);
ORD(glBindAttribLocation);
ORD(glBindRenderbuffer);
#undef ORD
+// GLES 3.0 NEW APIs
+#define ORD(name) EVAS_API_OVERRIDE(name, funcs, _evgl_)
+ ORD(glBeginQuery);
+ ORD(glBeginTransformFeedback);
+ ORD(glBindBufferBase);
+ ORD(glBindBufferRange);
+ ORD(glBindSampler);
+ ORD(glBindTransformFeedback);
+ ORD(glBindVertexArray);
+ ORD(glBlitFramebuffer);
+ ORD(glClearBufferfi);
+ ORD(glClearBufferfv);
+ ORD(glClearBufferiv);
+ ORD(glClearBufferuiv);
+ ORD(glClientWaitSync);
+ ORD(glCompressedTexImage3D);
+ ORD(glCompressedTexSubImage3D);
+ ORD(glCopyBufferSubData);
+ ORD(glCopyTexSubImage3D);
+ ORD(glDeleteQueries);
+ ORD(glDeleteSamplers);
+ ORD(glDeleteSync);
+ ORD(glDeleteTransformFeedbacks);
+ ORD(glDeleteVertexArrays);
+ ORD(glDrawArraysInstanced);
+ ORD(glDrawBuffers);
+ ORD(glDrawElementsInstanced);
+ ORD(glDrawRangeElements);
+ ORD(glEndQuery);
+ ORD(glEndTransformFeedback);
+ ORD(glFenceSync);
+ ORD(glFlushMappedBufferRange);
+ ORD(glFramebufferTextureLayer);
+ ORD(glGenQueries);
+ ORD(glGenSamplers);
+ ORD(glGenTransformFeedbacks);
+ ORD(glGenVertexArrays);
+ ORD(glGetActiveUniformBlockiv);
+ ORD(glGetActiveUniformBlockName);
+ ORD(glGetActiveUniformsiv);
+ ORD(glGetBufferParameteri64v);
+ ORD(glGetBufferPointerv);
+ ORD(glGetFragDataLocation);
+ ORD(glGetInteger64i_v);
+ ORD(glGetInteger64v);
+ ORD(glGetIntegeri_v);
+ ORD(glGetInternalformativ);
+ ORD(glGetProgramBinary);
+ ORD(glGetQueryiv);
+ ORD(glGetQueryObjectuiv);
+ ORD(glGetSamplerParameterfv);
+ ORD(glGetSamplerParameteriv);
+ ORD(glGetStringi);
+ ORD(glGetSynciv);
+ ORD(glGetTransformFeedbackVarying);
+ ORD(glGetUniformBlockIndex);
+ ORD(glGetUniformIndices);
+ ORD(glGetUniformuiv);
+ ORD(glGetVertexAttribIiv);
+ ORD(glGetVertexAttribIuiv);
+ ORD(glInvalidateFramebuffer);
+ ORD(glInvalidateSubFramebuffer);
+ ORD(glIsQuery);
+ ORD(glIsSampler);
+ ORD(glIsSync);
+ ORD(glIsTransformFeedback);
+ ORD(glIsVertexArray);
+ ORD(glMapBufferRange);
+ ORD(glPauseTransformFeedback);
+ ORD(glProgramBinary);
+ ORD(glProgramParameteri);
+ ORD(glReadBuffer);
+ ORD(glRenderbufferStorageMultisample);
+ ORD(glResumeTransformFeedback);
+ ORD(glSamplerParameterf);
+ ORD(glSamplerParameterfv);
+ ORD(glSamplerParameteri);
+ ORD(glSamplerParameteriv);
+ ORD(glTexImage3D);
+ ORD(glTexStorage2D);
+ ORD(glTexStorage3D);
+ ORD(glTexSubImage3D);
+ ORD(glTransformFeedbackVaryings);
+ ORD(glUniform1ui);
+ ORD(glUniform1uiv);
+ ORD(glUniform2ui);
+ ORD(glUniform2uiv);
+ ORD(glUniform3ui);
+ ORD(glUniform3uiv);
+ ORD(glUniform4ui);
+ ORD(glUniform4uiv);
+ ORD(glUniformBlockBinding);
+ ORD(glUniformMatrix2x3fv);
+ ORD(glUniformMatrix3x2fv);
+ ORD(glUniformMatrix2x4fv);
+ ORD(glUniformMatrix4x2fv);
+ ORD(glUniformMatrix3x4fv);
+ ORD(glUniformMatrix4x3fv);
+ ORD(glUnmapBuffer);
+ ORD(glVertexAttribI4i);
+ ORD(glVertexAttribI4iv);
+ ORD(glVertexAttribI4ui);
+ ORD(glVertexAttribI4uiv);
+ ORD(glWaitSync);
+
+#undef ORD
+
#define ORD(f) EVAS_API_OVERRIDE(f, funcs, _evgl_)
+
+ // General purpose wrapper
+ ORD(glGetString);
+
// For Surface FBO
ORD(glBindFramebuffer);
ORD(glDisable);
ORD(glEnable);
ORD(glGetIntegerv);
- ORD(glGetString);
ORD(glReadPixels);
ORD(glScissor);
ORD(glViewport);
#undef ORD
- evgl_api_ext_get(funcs);
-}
-
-static void
-_direct_scissor_off_api_get(Evas_GL_API *funcs)
-{
-
-#define ORD(f) EVAS_API_OVERRIDE(f, funcs,)
- // For Direct Rendering
- ORD(glClear);
- ORD(glClearColor);
- ORD(glDisable);
- ORD(glEnable);
- ORD(glGetIntegerv);
- ORD(glReadPixels);
- ORD(glScissor);
- ORD(glViewport);
-#undef ORD
+ evgl_api_gles3_ext_get(funcs);
}
-
static void
-_debug_gl_api_get(Evas_GL_API *funcs)
+_debug_gles3_api_get(Evas_GL_API *funcs)
{
- funcs->version = EVAS_GL_API_VERSION;
#define ORD(f) EVAS_API_OVERRIDE(f, funcs, _evgld_)
- // GLES 2.0
+ // GLES 3.0 APIs that are same as GLES 2.0
ORD(glActiveTexture);
ORD(glAttachShader);
ORD(glBindAttribLocation);
ORD(glBindFramebuffer);
ORD(glBindRenderbuffer);
+
+ // GLES 3.0 new APIs
+ ORD(glBeginQuery);
+ ORD(glBeginTransformFeedback);
+ ORD(glBindBufferBase);
+ ORD(glBindBufferRange);
+ ORD(glBindSampler);
+ ORD(glBindTransformFeedback);
+ ORD(glBindVertexArray);
+ ORD(glBlitFramebuffer);
+ ORD(glClearBufferfi);
+ ORD(glClearBufferfv);
+ ORD(glClearBufferiv);
+ ORD(glClearBufferuiv);
+ ORD(glClientWaitSync);
+ ORD(glCompressedTexImage3D);
+ ORD(glCompressedTexSubImage3D);
+ ORD(glCopyBufferSubData);
+ ORD(glCopyTexSubImage3D);
+ ORD(glDeleteQueries);
+ ORD(glDeleteSamplers);
+ ORD(glDeleteSync);
+ ORD(glDeleteTransformFeedbacks);
+ ORD(glDeleteVertexArrays);
+ ORD(glDrawArraysInstanced);
+ ORD(glDrawBuffers);
+ ORD(glDrawElementsInstanced);
+ ORD(glDrawRangeElements);
+ ORD(glEndQuery);
+ ORD(glEndTransformFeedback);
+ ORD(glFenceSync);
+ ORD(glFlushMappedBufferRange);
+ ORD(glFramebufferTextureLayer);
+ ORD(glGenQueries);
+ ORD(glGenSamplers);
+ ORD(glGenTransformFeedbacks);
+ ORD(glGenVertexArrays);
+ ORD(glGetActiveUniformBlockiv);
+ ORD(glGetActiveUniformBlockName);
+ ORD(glGetActiveUniformsiv);
+ ORD(glGetBufferParameteri64v);
+ ORD(glGetBufferPointerv);
+ ORD(glGetFragDataLocation);
+ ORD(glGetInteger64i_v);
+ ORD(glGetInteger64v);
+ ORD(glGetIntegeri_v);
+ ORD(glGetInternalformativ);
+ ORD(glGetProgramBinary);
+ ORD(glGetQueryiv);
+ ORD(glGetQueryObjectuiv);
+ ORD(glGetSamplerParameterfv);
+ ORD(glGetSamplerParameteriv);
+ ORD(glGetStringi);
+ ORD(glGetSynciv);
+ ORD(glGetTransformFeedbackVarying);
+ ORD(glGetUniformBlockIndex);
+ ORD(glGetUniformIndices);
+ ORD(glGetUniformuiv);
+ ORD(glGetVertexAttribIiv);
+ ORD(glGetVertexAttribIuiv);
+ ORD(glInvalidateFramebuffer);
+ ORD(glInvalidateSubFramebuffer);
+ ORD(glIsQuery);
+ ORD(glIsSampler);
+ ORD(glIsSync);
+ ORD(glIsTransformFeedback);
+ ORD(glIsVertexArray);
+ ORD(glMapBufferRange);
+ ORD(glPauseTransformFeedback);
+ ORD(glProgramBinary);
+ ORD(glProgramParameteri);
+ ORD(glReadBuffer);
+ ORD(glRenderbufferStorageMultisample);
+ ORD(glResumeTransformFeedback);
+ ORD(glSamplerParameterf);
+ ORD(glSamplerParameterfv);
+ ORD(glSamplerParameteri);
+ ORD(glSamplerParameteriv);
+ ORD(glTexImage3D);
+ ORD(glTexStorage2D);
+ ORD(glTexStorage3D);
+ ORD(glTexSubImage3D);
+ ORD(glTransformFeedbackVaryings);
+ ORD(glUniform1ui);
+ ORD(glUniform1uiv);
+ ORD(glUniform2ui);
+ ORD(glUniform2uiv);
+ ORD(glUniform3ui);
+ ORD(glUniform3uiv);
+ ORD(glUniform4ui);
+ ORD(glUniform4uiv);
+ ORD(glUniformBlockBinding);
+ ORD(glUniformMatrix2x3fv);
+ ORD(glUniformMatrix3x2fv);
+ ORD(glUniformMatrix2x4fv);
+ ORD(glUniformMatrix4x2fv);
+ ORD(glUniformMatrix3x4fv);
+ ORD(glUniformMatrix4x3fv);
+ ORD(glUnmapBuffer);
+ ORD(glVertexAttribI4i);
+ ORD(glVertexAttribI4iv);
+ ORD(glVertexAttribI4ui);
+ ORD(glVertexAttribI4uiv);
+ ORD(glWaitSync);
#undef ORD
- evgl_api_ext_get(funcs);
+ evgl_api_gles3_ext_get(funcs);
}
-void
-_evgl_api_get(Evas_GL_API *funcs, int debug)
+
+static Eina_Bool
+_evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs)
+{
+ if (!dl_handle) return EINA_FALSE;
+
+#define ORD(name) \
+ funcs->name = dlsym(dl_handle, #name); \
+ if (!funcs->name) \
+ { \
+ WRN("%s symbol not found", #name); \
+ return EINA_FALSE; \
+ }
+
+ // Used to update extensions
+ ORD(glGetString);
+
+ // GLES 3.0 new APIs
+ ORD(glBeginQuery);
+ ORD(glBeginTransformFeedback);
+ ORD(glBindBufferBase);
+ ORD(glBindBufferRange);
+ ORD(glBindSampler);
+ ORD(glBindTransformFeedback);
+ ORD(glBindVertexArray);
+ ORD(glBlitFramebuffer);
+ ORD(glClearBufferfi);
+ ORD(glClearBufferfv);
+ ORD(glClearBufferiv);
+ ORD(glClearBufferuiv);
+ ORD(glClientWaitSync);
+ ORD(glCompressedTexImage3D);
+ ORD(glCompressedTexSubImage3D);
+ ORD(glCopyBufferSubData);
+ ORD(glCopyTexSubImage3D);
+ ORD(glDeleteQueries);
+ ORD(glDeleteSamplers);
+ ORD(glDeleteSync);
+ ORD(glDeleteTransformFeedbacks);
+ ORD(glDeleteVertexArrays);
+ ORD(glDrawArraysInstanced);
+ ORD(glDrawBuffers);
+ ORD(glDrawElementsInstanced);
+ ORD(glDrawRangeElements);
+ ORD(glEndQuery);
+ ORD(glEndTransformFeedback);
+ ORD(glFenceSync);
+ ORD(glFlushMappedBufferRange);
+ ORD(glFramebufferTextureLayer);
+ ORD(glGenQueries);
+ ORD(glGenSamplers);
+ ORD(glGenTransformFeedbacks);
+ ORD(glGenVertexArrays);
+ ORD(glGetActiveUniformBlockiv);
+ ORD(glGetActiveUniformBlockName);
+ ORD(glGetActiveUniformsiv);
+ ORD(glGetBufferParameteri64v);
+ ORD(glGetBufferPointerv);
+ ORD(glGetFragDataLocation);
+ ORD(glGetInteger64i_v);
+ ORD(glGetInteger64v);
+ ORD(glGetIntegeri_v);
+ ORD(glGetInternalformativ);
+ ORD(glGetProgramBinary);
+ ORD(glGetQueryiv);
+ ORD(glGetQueryObjectuiv);
+ ORD(glGetSamplerParameterfv);
+ ORD(glGetSamplerParameteriv);
+ ORD(glGetStringi);
+ ORD(glGetSynciv);
+ ORD(glGetTransformFeedbackVarying);
+ ORD(glGetUniformBlockIndex);
+ ORD(glGetUniformIndices);
+ ORD(glGetUniformuiv);
+ ORD(glGetVertexAttribIiv);
+ ORD(glGetVertexAttribIuiv);
+ ORD(glInvalidateFramebuffer);
+ ORD(glInvalidateSubFramebuffer);
+ ORD(glIsQuery);
+ ORD(glIsSampler);
+ ORD(glIsSync);
+ ORD(glIsTransformFeedback);
+ ORD(glIsVertexArray);
+ ORD(glMapBufferRange);
+ ORD(glPauseTransformFeedback);
+ ORD(glProgramBinary);
+ ORD(glProgramParameteri);
+ ORD(glReadBuffer);
+ ORD(glRenderbufferStorageMultisample);
+ ORD(glResumeTransformFeedback);
+ ORD(glSamplerParameterf);
+ ORD(glSamplerParameterfv);
+ ORD(glSamplerParameteri);
+ ORD(glSamplerParameteriv);
+ ORD(glTexImage3D);
+ ORD(glTexStorage2D);
+ ORD(glTexStorage3D);
+ ORD(glTexSubImage3D);
+ ORD(glTransformFeedbackVaryings);
+ ORD(glUniform1ui);
+ ORD(glUniform1uiv);
+ ORD(glUniform2ui);
+ ORD(glUniform2uiv);
+ ORD(glUniform3ui);
+ ORD(glUniform3uiv);
+ ORD(glUniform4ui);
+ ORD(glUniform4uiv);
+ ORD(glUniformBlockBinding);
+ ORD(glUniformMatrix2x3fv);
+ ORD(glUniformMatrix3x2fv);
+ ORD(glUniformMatrix2x4fv);
+ ORD(glUniformMatrix4x2fv);
+ ORD(glUniformMatrix3x4fv);
+ ORD(glUniformMatrix4x3fv);
+ ORD(glUnmapBuffer);
+ ORD(glVertexAttribI4i);
+ ORD(glVertexAttribI4iv);
+ ORD(glVertexAttribI4ui);
+ ORD(glVertexAttribI4uiv);
+ ORD(glWaitSync);
+#undef ORD
+ return EINA_TRUE;
+}
+
+
+
+static Eina_Bool
+_evgl_api_init(void)
+{
+ static Eina_Bool _initialized = EINA_FALSE;
+ if (_initialized) return EINA_TRUE;
+
+ memset(&_gles3_api, 0, sizeof(_gles3_api));
+
+#ifdef GL_GLES
+ _gles3_handle = dlopen("libGLESv2.so", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGLESv2.so.2.0", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGLESv2.so.2", RTLD_NOW);
+#else
+ _gles3_handle = dlopen("libGL.so", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGL.so.4", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGL.so.3", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGL.so.2", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGL.so.1", RTLD_NOW);
+ if (!_gles3_handle) _gles3_handle = dlopen("libGL.so.0", RTLD_NOW);
+#endif
+
+ if (!_gles3_handle)
+ {
+ WRN("OpenGL ES 3 was not found on this system. Evas GL will not support GLES 3 contexts.");
+ return EINA_FALSE;
+ }
+
+ if (!dlsym(_gles3_handle, "glBeginQuery"))
+ {
+ WRN("OpenGL ES 3 was not found on this system. Evas GL will not support GLES 3 contexts.");
+ return EINA_FALSE;
+ }
+
+ if (!_evgl_load_gles3_apis(_gles3_handle, &_gles3_api))
+ {
+ return EINA_FALSE;
+ }
+/* TODO
+ if (!_evgl_api_gles3_ext_init())
+ WRN("Could not initialize OpenGL ES 1 extensions yet.");
+*/
+ _initialized = EINA_TRUE;
+ return EINA_TRUE;
+}
+
+
+Eina_Bool
+_evgl_api_gles3_get(Evas_GL_API *funcs, Eina_Bool debug)
{
+ if(!_evgl_api_init())
+ return EINA_FALSE;
+
if (debug)
- _debug_gl_api_get(funcs);
+ _debug_gles3_api_get(funcs);
else
- _normal_gl_api_get(funcs);
+ _normal_gles3_api_get(funcs);
if (evgl_engine->direct_scissor_off)
- _direct_scissor_off_api_get(funcs);
+ _direct_scissor_off_api_get(funcs);
+
+ return EINA_TRUE;
+}
+
+Evas_GL_API *
+_evgl_api_gles3_internal_get(void)
+{
+ return &_gles3_api;
}