From 07e69c7bf4355aa72ecf6af0fb26daeb693e36df Mon Sep 17 00:00:00 2001 From: Xuelian Bai Date: Mon, 2 Nov 2015 05:40:49 +0800 Subject: [PATCH 01/16] Add fastpath APIs for OpenGLES_DDK 3.1 This patch adds fastpath APIs for OpenGLES_DDK 3.1 Change-Id: Ifec42bccefd3f544983cf9e5fdb32e66a6fbcab7 Signed-off-by: Xuelian Bai --- packaging/coregl.spec | 2 + src/coregl.c | 11 +- src/coregl_export_gl.c | 407 +++++++ src/coregl_internal.h | 1 + src/headers/gl.h | 7 + src/headers/sym_egl.h | 6 + src/headers/sym_gl.h | 71 ++ src/modules/fastpath/coregl_fastpath.c | 88 +- src/modules/fastpath/coregl_fastpath.h | 6 + src/modules/fastpath/coregl_fastpath_gl.c | 1496 +++++++++++++++++++++++++- src/modules/fastpath/coregl_fastpath_state.h | 13 +- src/modules/tracepath/coregl_tracepath.h | 5 +- src/modules/tracepath/coregl_tracepath_egl.c | 45 + src/modules/tracepath/coregl_tracepath_gl.c | 825 ++++++++++++++ src/wraps/coregl_gl.c | 402 +++++++ 15 files changed, 3369 insertions(+), 16 deletions(-) diff --git a/packaging/coregl.spec b/packaging/coregl.spec index 6556b14..1e2957c 100644 --- a/packaging/coregl.spec +++ b/packaging/coregl.spec @@ -70,6 +70,7 @@ mkdir -p %{buildroot}%{_includedir} cp -a include_KHR/EGL %{buildroot}%{_includedir} cp -a include_KHR/GLES %{buildroot}%{_includedir} cp -a include_KHR/GLES2 %{buildroot}%{_includedir} +cp -a include_KHR/GLES3 %{buildroot}%{_includedir} cp -a include_KHR/KHR %{buildroot}%{_includedir} cp -a pkgconfig/*.pc %{buildroot}%{_libdir}/pkgconfig/ @@ -95,5 +96,6 @@ rm -rf %{buildroot} %{_includedir}/EGL/* %{_includedir}/GLES/* %{_includedir}/GLES2/* +%{_includedir}/GLES3/* %{_includedir}/KHR/* %{_libdir}/pkgconfig/*.pc diff --git a/src/coregl.c b/src/coregl.c index f8f473d..891f264 100644 --- a/src/coregl.c +++ b/src/coregl.c @@ -181,11 +181,18 @@ _gl_lib_init(void) } // test for a GLES 3.0 symbol - if (dlsym(gl_lib_handle, "glReadBuffer")) + if (dlsym(gl_lib_handle, "glBindProgramPipeline")) + { + COREGL_LOG("[CoreGL] Driver GL version 3.1 \n"); + driver_gl_version = COREGL_GLAPI_31; + } + else if (dlsym(gl_lib_handle, "glReadBuffer")) { COREGL_LOG("[CoreGL] Driver GL version 3.0 \n"); driver_gl_version = COREGL_GLAPI_3; - }else { + } + else + { COREGL_LOG("[CoreGL] Driver GL version 2.0 \n"); } diff --git a/src/coregl_export_gl.c b/src/coregl_export_gl.c index 0c19820..6f84da3 100644 --- a/src/coregl_export_gl.c +++ b/src/coregl_export_gl.c @@ -1477,4 +1477,411 @@ coregl_api_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pn ovr_glGetInternalformativ(target, internalformat, pname, bufSize, params); } +/* GLES3.1 API */ +GLuint +coregl_api_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +{ + return ovr_glCreateShaderProgramv(type, count, strings); +} + +void +coregl_api_glGenProgramPipelines( GLsizei n, GLuint *pipelines) +{ + ovr_glGenProgramPipelines(n, pipelines); +} + +void +coregl_api_glBindProgramPipeline( GLuint pipeline) +{ + ovr_glBindProgramPipeline(pipeline); +} + +void +coregl_api_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) +{ + ovr_glGetProgramPipelineiv(pipeline, pname, params); +} + +void +coregl_api_glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) +{ + ovr_glDeleteProgramPipelines(n, pipelines); +} + +GLboolean +coregl_api_glIsProgramPipeline( GLuint pipeline) +{ + return ovr_glIsProgramPipeline(pipeline); +} + +void +coregl_api_glValidateProgramPipeline(GLuint pipeline) +{ + ovr_glValidateProgramPipeline(pipeline); +} + +void +coregl_api_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +{ + ovr_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); +} + +void +coregl_api_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +{ + ovr_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); +} + +void +coregl_api_glDispatchComputeIndirect( GLintptr indirect) +{ + ovr_glDispatchComputeIndirect(indirect); +} + +void +coregl_api_glDrawArraysIndirect(GLenum mode, GLvoid const *indirect) +{ + ovr_glDrawArraysIndirect(mode, indirect); +} + +void +coregl_api_glDrawElementsIndirect(GLenum mode, GLenum type, GLvoid const *indirect) +{ + ovr_glDrawElementsIndirect(mode, type, indirect); +} + +void +coregl_api_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) +{ + ovr_glFramebufferParameteri(target, pname, param); +} + +void +coregl_api_glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint * params) +{ + ovr_glGetFramebufferParameteriv(target, pname, params); +} + +void +coregl_api_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +{ + ovr_glGetProgramInterfaceiv(program, programInterface, pname, params); +} + +GLuint +coregl_api_glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +{ + return ovr_glGetProgramResourceIndex(program, programInterface, name); +} + +void +coregl_api_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +{ + ovr_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); +} + +void +coregl_api_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +{ + ovr_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); +} + +GLint +coregl_api_glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +{ + return ovr_glGetProgramResourceLocation(program, programInterface, name); +} + +void +coregl_api_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +{ + ovr_glUseProgramStages(pipeline, stages, program); +} + +void +coregl_api_glActiveShaderProgram(GLuint pipeline, GLuint program) +{ + ovr_glActiveShaderProgram(pipeline, program); +} + +void +coregl_api_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform1iv(program, location, count, value); +} + +void +coregl_api_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform2iv(program, location, count, value); +} + +void +coregl_api_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform3iv(program, location, count, value); +} + +void +coregl_api_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform4iv(program, location, count, value); +} + +void +coregl_api_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform1fv(program, location, count, value); +} + +void +coregl_api_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform2fv(program, location, count, value); +} + +void +coregl_api_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform3fv(program, location, count, value); +} + +void +coregl_api_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform4fv(program, location, count, value); +} + +void +coregl_api_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix2fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix3fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix4fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniform1i(GLuint program, GLint location, GLint x) +{ + ovr_glProgramUniform1i(program, location, x); +} + +void +coregl_api_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) +{ + ovr_glProgramUniform2i(program, location, x, y); +} +void +coregl_api_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +{ + ovr_glProgramUniform3i(program, location, x, y, z); +} + +void +coregl_api_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +{ + ovr_glProgramUniform4i(program, location, x, y, z, w); +} + +void +coregl_api_glProgramUniform1f(GLuint program, GLint location, GLfloat x) +{ + ovr_glProgramUniform1f(program, location, x); +} + +void +coregl_api_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +{ + ovr_glProgramUniform2f(program, location, x, y); +} + +void +coregl_api_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +{ + ovr_glProgramUniform3f(program, location, x, y, z); +} + +void +coregl_api_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + ovr_glProgramUniform4f(program, location, x, y, z, w); +} + +void +coregl_api_glProgramUniform1ui(GLuint program, GLint location, GLuint x) +{ + ovr_glProgramUniform1i(program, location, x); +} + +void +coregl_api_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) +{ + ovr_glProgramUniform2ui(program, location, x, y); +} + +void +coregl_api_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +{ + ovr_glProgramUniform3ui(program, location, x, y, z); +} + +void +coregl_api_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +{ + ovr_glProgramUniform4ui(program, location, x, y, z, w); +} + +void +coregl_api_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform1uiv(program, location, count, value); +} + +void +coregl_api_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform2uiv(program, location, count, value); +} + +void +coregl_api_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform3uiv(program, location, count, value); +} + +void +coregl_api_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform4uiv(program, location, count, value); +} + +void +coregl_api_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); +} + +void +coregl_api_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); +} + +void +coregl_api_glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +{ + ovr_glBindImageTexture (unit, texture, level, layered, layer, access, format); +} + +void +coregl_api_glGetBooleani_v (GLenum target, GLuint index, GLboolean *data) +{ + ovr_glGetBooleani_v (target, index, data); +} + +void +coregl_api_glMemoryBarrier (GLbitfield barriers) +{ + ovr_glMemoryBarrier (barriers); +} + +void +coregl_api_glMemoryBarrierByRegion (GLbitfield barriers) +{ + ovr_glMemoryBarrierByRegion (barriers); +} + +void +coregl_api_glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +{ + ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); +} + +void +coregl_api_glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val) +{ + ovr_glGetMultisamplefv (pname, index, val); +} + +void +coregl_api_glSampleMaski (GLuint maskNumber, GLbitfield mask) +{ + ovr_glSampleMaski (maskNumber, mask); +} + +void +coregl_api_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +{ + ovr_glGetTexLevelParameteriv (target, level, pname, params); +} + +void +coregl_api_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +{ + ovr_glGetTexLevelParameterfv (target, level, pname, params); +} + +void +coregl_api_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +{ + ovr_glBindVertexBuffer (bindingindex, buffer, offset, stride); +} + +void +coregl_api_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +{ + ovr_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); +} + +void +coregl_api_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +{ + ovr_glVertexAttribIFormat (attribindex, size, type, relativeoffset); +} + +void +coregl_api_glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) +{ + ovr_glVertexAttribBinding (attribindex, bindingindex); +} + +void +coregl_api_glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) +{ + ovr_glVertexBindingDivisor (bindingindex, divisor); +} \ No newline at end of file diff --git a/src/coregl_internal.h b/src/coregl_internal.h index b62ce46..8158e5a 100644 --- a/src/coregl_internal.h +++ b/src/coregl_internal.h @@ -68,6 +68,7 @@ static inline GLuint GET_UINT_FROM_FLOAT(GLfloat value) { return (GLuint)value; typedef GLvoid * GLvoidptr; typedef GLuint GLuintmask; +#define COREGL_GLAPI_31 4 #define COREGL_GLAPI_3 3 #define COREGL_GLAPI_2 2 diff --git a/src/headers/gl.h b/src/headers/gl.h index 3ceab22..f995e08 100644 --- a/src/headers/gl.h +++ b/src/headers/gl.h @@ -767,6 +767,13 @@ typedef struct __GLsync *GLsync; #define GL_NUM_SAMPLE_COUNTS 0x9380 #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +/* GLES 3.1 */ +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE + + //---------------------------// // GLES extension defines /* GL_OES_EGL_image */ diff --git a/src/headers/sym_egl.h b/src/headers/sym_egl.h index 27c858c..8a812ac 100644 --- a/src/headers/sym_egl.h +++ b/src/headers/sym_egl.h @@ -79,6 +79,12 @@ _COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersWithDamageEXT, (EGLDisplay dpy, EGL _COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersRegionEXT, (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects)) +_COREGL_EXT_SYMBOL(EGLBoolean, eglBindWaylandDisplayWL, (EGLDisplay dpy, void* display)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglUnbindWaylandDisplayWL, (EGLDisplay dpy, void* display)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglQueryWaylandBufferWL, (EGLDisplay dpy, void* buffer, EGLint attribute, EGLint *value)) + /* Fastpath Verified extensions */ //_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionSEC) _COREGL_EXT_SYMBOL_FASTPATH_PASS(eglCreateSyncKHR) diff --git a/src/headers/sym_gl.h b/src/headers/sym_gl.h index c31468e..cac9801 100644 --- a/src/headers/sym_gl.h +++ b/src/headers/sym_gl.h @@ -289,6 +289,77 @@ _COREGL_SYMBOL(void, glGetInternalformativ, (GLenum target, GLenum internalforma _COREGL_END_API(COREGL_GLAPI_3) +/* OpenGL ES 3.1 */ +_COREGL_START_API(COREGL_GLAPI_31) +_COREGL_SYMBOL(GLuint, glCreateShaderProgramv, (GLenum type, GLsizei count, const GLchar *const*strings)) +_COREGL_SYMBOL(void, glGenProgramPipelines, (GLsizei n, GLuint *pipelines)) +_COREGL_SYMBOL(void, glBindProgramPipeline, (GLuint pipeline)) +_COREGL_SYMBOL(void, glGetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glDeleteProgramPipelines, (GLsizei n, GLuint const *pipelines)) +_COREGL_SYMBOL(GLboolean, glIsProgramPipeline, (GLuint pipeline)) +_COREGL_SYMBOL(void, glValidateProgramPipeline, (GLuint pipeline)) +_COREGL_SYMBOL(void, glGetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) +_COREGL_SYMBOL(void, glDispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)) +_COREGL_SYMBOL(void, glDispatchComputeIndirect, (GLintptr indirect)) +_COREGL_SYMBOL(void, glDrawArraysIndirect, (GLenum mode, GLvoid const *indirect)) +_COREGL_SYMBOL(void, glDrawElementsIndirect, (GLenum mode, GLenum type, GLvoid const *indirect)) +_COREGL_SYMBOL(void, glFramebufferParameteri, (GLenum target, GLenum pname, GLint param)) +_COREGL_SYMBOL(void, glGetFramebufferParameteriv, ( GLenum target, GLenum pname, GLint * params)) +_COREGL_SYMBOL(void, glGetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint * params)) +_COREGL_SYMBOL(GLuint, glGetProgramResourceIndex, (GLuint program, GLenum programInterface, const char * name)) +_COREGL_SYMBOL(void, glGetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)) +_COREGL_SYMBOL(void, glGetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params)) +_COREGL_SYMBOL(GLint, glGetProgramResourceLocation, (GLuint program, GLenum programInterface, GLchar const *name)) +_COREGL_SYMBOL(void, glUseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program)) +_COREGL_SYMBOL(void, glActiveShaderProgram, (GLuint pipeline, GLuint program)) +_COREGL_SYMBOL(void, glProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform1i, (GLuint program, GLint location, GLint x)) +_COREGL_SYMBOL(void, glProgramUniform2i, (GLuint program, GLint location, GLint x, GLint y)) +_COREGL_SYMBOL(void, glProgramUniform3i, (GLuint program, GLint location, GLint x, GLint y, GLint z)) +_COREGL_SYMBOL(void, glProgramUniform4i, (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)) +_COREGL_SYMBOL(void, glProgramUniform1f, (GLuint program, GLint location, GLfloat x)) +_COREGL_SYMBOL(void, glProgramUniform2f, (GLuint program, GLint location, GLfloat x, GLfloat y)) +_COREGL_SYMBOL(void, glProgramUniform3f, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)) +_COREGL_SYMBOL(void, glProgramUniform4f, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) +_COREGL_SYMBOL(void, glProgramUniform1ui, (GLuint program, GLint location, GLuint x)) +_COREGL_SYMBOL(void, glProgramUniform2ui, (GLuint program, GLint location, GLuint x, GLuint y)) +_COREGL_SYMBOL(void, glProgramUniform3ui, (GLuint program, GLint location, GLuint x, GLuint y, GLuint z)) +_COREGL_SYMBOL(void, glProgramUniform4ui, (GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) +_COREGL_SYMBOL(void, glProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glBindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) +_COREGL_SYMBOL(void, glGetBooleani_v, (GLenum target, GLuint index, GLboolean *data)) +_COREGL_SYMBOL(void, glMemoryBarrier, (GLbitfield barriers)) +_COREGL_SYMBOL(void, glMemoryBarrierByRegion, (GLbitfield barriers)) +_COREGL_SYMBOL(void, glTexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) +_COREGL_SYMBOL(void, glGetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) +_COREGL_SYMBOL(void, glSampleMaski, (GLuint maskNumber, GLbitfield mask)) +_COREGL_SYMBOL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) +_COREGL_SYMBOL(void, glBindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) +_COREGL_SYMBOL(void, glVertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) +_COREGL_SYMBOL(void, glVertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) +_COREGL_SYMBOL(void, glVertexAttribBinding, (GLuint attribindex, GLuint bindingindex)) +_COREGL_SYMBOL(void, glVertexBindingDivisor, (GLuint bindingindex, GLuint divisor)) +_COREGL_END_API(COREGL_GLAPI_31) /* Extensions */ _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_EGL_image", 1.1, -1) diff --git a/src/modules/fastpath/coregl_fastpath.c b/src/modules/fastpath/coregl_fastpath.c index 71eac3a..b9842c9 100644 --- a/src/modules/fastpath/coregl_fastpath.c +++ b/src/modules/fastpath/coregl_fastpath.c @@ -487,6 +487,73 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glProgramParameteri); } // End of GLES 3.0 + if(driver_gl_version >= COREGL_GLAPI_31) + { + COREGL_OVERRIDE(fastpath_, glCreateShaderProgramv); + COREGL_OVERRIDE(fastpath_, glGenProgramPipelines); + COREGL_OVERRIDE(fastpath_, glGetProgramPipelineiv); + COREGL_OVERRIDE(fastpath_, glBindProgramPipeline); + COREGL_OVERRIDE(fastpath_, glDeleteProgramPipelines); + COREGL_OVERRIDE(fastpath_, glIsProgramPipeline); + COREGL_OVERRIDE(fastpath_, glValidateProgramPipeline); + COREGL_OVERRIDE(fastpath_, glGetProgramPipelineInfoLog); + COREGL_OVERRIDE(fastpath_, glDispatchCompute); + COREGL_OVERRIDE(fastpath_, glDispatchComputeIndirect); + COREGL_OVERRIDE(fastpath_, glGetProgramInterfaceiv); + COREGL_OVERRIDE(fastpath_, glGetProgramResourceIndex); + COREGL_OVERRIDE(fastpath_, glGetProgramResourceName); + COREGL_OVERRIDE(fastpath_, glGetProgramResourceiv); + COREGL_OVERRIDE(fastpath_, glGetProgramResourceLocation); + COREGL_OVERRIDE(fastpath_, glUseProgramStages); + COREGL_OVERRIDE(fastpath_, glActiveShaderProgram); + COREGL_OVERRIDE(fastpath_, glProgramUniform1iv); + COREGL_OVERRIDE(fastpath_, glProgramUniform2iv); + COREGL_OVERRIDE(fastpath_, glProgramUniform3iv); + COREGL_OVERRIDE(fastpath_, glProgramUniform4iv); + COREGL_OVERRIDE(fastpath_, glProgramUniform1fv); + COREGL_OVERRIDE(fastpath_, glProgramUniform2fv); + COREGL_OVERRIDE(fastpath_, glProgramUniform3fv); + COREGL_OVERRIDE(fastpath_, glProgramUniform4fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix2fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix3fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix4fv); + COREGL_OVERRIDE(fastpath_, glProgramUniform1i); + COREGL_OVERRIDE(fastpath_, glProgramUniform2i); + COREGL_OVERRIDE(fastpath_, glProgramUniform3i); + COREGL_OVERRIDE(fastpath_, glProgramUniform4i); + COREGL_OVERRIDE(fastpath_, glProgramUniform1f); + COREGL_OVERRIDE(fastpath_, glProgramUniform2f); + COREGL_OVERRIDE(fastpath_, glProgramUniform3f); + COREGL_OVERRIDE(fastpath_, glProgramUniform4f); + COREGL_OVERRIDE(fastpath_, glProgramUniform1uiv); + COREGL_OVERRIDE(fastpath_, glProgramUniform2uiv); + COREGL_OVERRIDE(fastpath_, glProgramUniform3uiv); + COREGL_OVERRIDE(fastpath_, glProgramUniform4uiv); + COREGL_OVERRIDE(fastpath_, glProgramUniform1ui); + COREGL_OVERRIDE(fastpath_, glProgramUniform2ui); + COREGL_OVERRIDE(fastpath_, glProgramUniform3ui); + COREGL_OVERRIDE(fastpath_, glProgramUniform4ui); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix2x3fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix3x2fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix4x2fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix2x4fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix3x4fv); + COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix4x3fv); + COREGL_OVERRIDE(fastpath_, glBindImageTexture); + COREGL_OVERRIDE(fastpath_, glGetBooleani_v); + COREGL_OVERRIDE(fastpath_, glMemoryBarrier); + COREGL_OVERRIDE(fastpath_, glMemoryBarrierByRegion); + COREGL_OVERRIDE(fastpath_, glTexStorage2DMultisample); + COREGL_OVERRIDE(fastpath_, glGetMultisamplefv); + COREGL_OVERRIDE(fastpath_, glSampleMaski); + COREGL_OVERRIDE(fastpath_, glGetTexLevelParameteriv); + COREGL_OVERRIDE(fastpath_, glGetTexLevelParameterfv); + COREGL_OVERRIDE(fastpath_, glBindVertexBuffer); + COREGL_OVERRIDE(fastpath_, glVertexAttribFormat); + COREGL_OVERRIDE(fastpath_, glVertexAttribIFormat); + COREGL_OVERRIDE(fastpath_, glVertexAttribBinding); + COREGL_OVERRIDE(fastpath_, glVertexBindingDivisor); + } } else { @@ -524,6 +591,9 @@ _lock_gl_object_hash(GL_Object_State *ostate, GL_Object_Type type) return &ostate->shared->sampler; case GL_OBJECT_TYPE_TRANSFORMFEEDBACK: return &ostate->transformfeedback; + case GL_OBJECT_TYPE_PROGRAMPIPELINE: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->programpipeline; default: return NULL; } @@ -539,6 +609,7 @@ _unlock_gl_object_hash(GL_Object_State *ostate, GL_Object_Type type) case GL_OBJECT_TYPE_RENDERBUFFER: case GL_OBJECT_TYPE_PROGRAM: case GL_OBJECT_TYPE_SAMPLER: + case GL_OBJECT_TYPE_PROGRAMPIPELINE: AST(mutex_unlock(&ostate->shared->access_mutex) == 1); default: break; @@ -573,6 +644,9 @@ _lock_gl_object_hash_real(GL_Object_State *ostate, GL_Object_Type type) return &ostate->shared->sampler_real; case GL_OBJECT_TYPE_TRANSFORMFEEDBACK: return &ostate->transformfeedback_real; + case GL_OBJECT_TYPE_PROGRAMPIPELINE: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->programpipeline_real; default: return NULL; } @@ -588,6 +662,7 @@ _unlock_gl_object_hash_real(GL_Object_State *ostate, GL_Object_Type type) case GL_OBJECT_TYPE_RENDERBUFFER: case GL_OBJECT_TYPE_PROGRAM: case GL_OBJECT_TYPE_SAMPLER: + case GL_OBJECT_TYPE_PROGRAMPIPELINE: AST(mutex_unlock(&ostate->shared->real_access_mutex) == 1); break; default: @@ -772,12 +847,14 @@ fastpath_sostate_init(GL_Shared_Object_State *sostate) HASH_INIT(sostate->renderbuffer); HASH_INIT(sostate->program); HASH_INIT(sostate->sampler); + HASH_INIT(sostate->programpipeline); HASH_INIT(sostate->texture_real); HASH_INIT(sostate->buffer_real); HASH_INIT(sostate->renderbuffer_real); HASH_INIT(sostate->program_real); HASH_INIT(sostate->sampler_real); + HASH_INIT(sostate->programpipeline_real); } #undef HASH_INIT @@ -890,12 +967,15 @@ fastpath_sostate_deinit(GL_Shared_Object_State *sostate) HASH_DEINIT(sostate->renderbuffer, 1); HASH_DEINIT(sostate->program, 1); HASH_DEINIT(sostate->sampler, 1); + HASH_DEINIT(sostate->programpipeline, 1); HASH_DEINIT(sostate->texture_real, 0); HASH_DEINIT(sostate->buffer_real, 0); HASH_DEINIT(sostate->renderbuffer_real, 0); HASH_DEINIT(sostate->program_real, 0); HASH_DEINIT(sostate->sampler_real, 0); + + HASH_DEINIT(sostate->programpipeline_real, 0); } #undef HASH_DEINIT @@ -1610,6 +1690,10 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) } STATE_COMPARE(gl_element_array_buffer_binding[0]) { + STATE_COMPARE(gl_vertex_array_binding[0]) + { + CHECK_GL_ERROR(_orig_fastpath_glBindVertexArray(newctx->gl_vertex_array_binding[0])) + } CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, newctx->gl_element_array_buffer_binding[0])) } @@ -2137,10 +2221,6 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) CHECK_GL_ERROR(_orig_fastpath_glDrawBuffers(drawBuffSize, newctx->gl_draw_buffers)) } - STATE_COMPARE(gl_vertex_array_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindVertexArray(newctx->gl_vertex_array_binding[0])) - } if (oldctx->gl_transform_feedback_active[0] == GL_TRUE && oldctx->gl_transform_feedback_paused[0] == GL_FALSE) { diff --git a/src/modules/fastpath/coregl_fastpath.h b/src/modules/fastpath/coregl_fastpath.h index dbc902b..6fa2622 100644 --- a/src/modules/fastpath/coregl_fastpath.h +++ b/src/modules/fastpath/coregl_fastpath.h @@ -127,6 +127,7 @@ typedef struct #define GL_OBJECT_TYPE_VERTEXARRAY 0x6000000 #define GL_OBJECT_TYPE_SAMPLER 0x7000000 #define GL_OBJECT_TYPE_TRANSFORMFEEDBACK 0x8000000 +#define GL_OBJECT_TYPE_PROGRAMPIPELINE 0x9000000 #define GL_OBJECT_TYPE_UNKNOWN 0xFFFFFFF typedef struct _GL_Object @@ -167,12 +168,15 @@ typedef struct _GL_Shared_Object_State GL_Object_Hash_Base renderbuffer; GL_Object_Hash_Base program; GL_Object_Hash_Base sampler; + GL_Object_Hash_Base programpipeline; GL_Object_Hash_Base texture_real; GL_Object_Hash_Base buffer_real; GL_Object_Hash_Base renderbuffer_real; GL_Object_Hash_Base program_real; GL_Object_Hash_Base sampler_real; + + GL_Object_Hash_Base programpipeline_real; } GL_Shared_Object_State; typedef struct _GL_Object_State @@ -331,6 +335,8 @@ typedef struct _GLGlueContext #define _MISC_FLAG3_BIT_gl_vertex_array_binding FLAG_BIT_2 #define _MISC_FLAG3_BIT_gl_transform_feedback_binding FLAG_BIT_3 #define _MISC_FLAG3_BIT_gl_transform_feedback FLAG_BIT_4 +#define _MISC_FLAG3_BIT_gl_draw_range_elements FLAG_BIT_5 +#define _MISC_FLAG3_BIT_gl_program_pipeline_binding FLAG_BIT_6 unsigned char _vattrib_flag; #define _VATTRIB_FLAG_BIT_gl_vertex_attrib_value FLAG_BIT_0 diff --git a/src/modules/fastpath/coregl_fastpath_gl.c b/src/modules/fastpath/coregl_fastpath_gl.c index 433ecb4..172045e 100644 --- a/src/modules/fastpath/coregl_fastpath_gl.c +++ b/src/modules/fastpath/coregl_fastpath_gl.c @@ -8,6 +8,7 @@ #include #include +#include #define CURR_STATE_COMPARE(curr_state, state ) \ if ((current_ctx->curr_state[0]) != (state)) @@ -382,7 +383,7 @@ fastpath_glGetString(GLenum name) IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetString(name)) { double GLver = _get_gl_version(); - if (GLver > 3.0) + if (GLver > 3.1) { COREGL_WRN("\E[40;31;1mFastpath can't support %s (Fixed to %s)\E[0m\n", ret, string_gles30); ret = string_gles30; @@ -4051,6 +4052,7 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) case GL_VERTEX_ARRAY_BINDING: case GL_SAMPLER_BINDING: case GL_TRANSFORM_FEEDBACK_BINDING: + case GL_PROGRAM_PIPELINE_BINDING: { GLint real_obj_id = _COREGL_INT_INIT_VALUE; GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; @@ -4092,6 +4094,8 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) case GL_TRANSFORM_FEEDBACK_BINDING: obj_type = GL_OBJECT_TYPE_TRANSFORMFEEDBACK; break; + case GL_PROGRAM_PIPELINE_BINDING: + obj_type = GL_OBJECT_TYPE_PROGRAMPIPELINE; } AST(obj_type != GL_OBJECT_TYPE_UNKNOWN); AST(GET_GLUE_OBJ(obj_type, real_obj_id, &glue_obj_id) == 1); @@ -5855,3 +5859,1493 @@ finish: } +/* GLES3.1 API */ +GLuint +fastpath_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +{ + GLuint ret = 0; + GLuint real_obj = 0; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + AST(current_ctx->ostate.shared != NULL); + + real_obj = _orig_fastpath_glCreateShaderProgramv(type, count, strings); + if (real_obj != 0) + { + ret = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, real_obj); + + Program_object_attached_tag *poat = NULL; + poat = (Program_object_attached_tag *)calloc(1, sizeof(Program_object_attached_tag)); + AST(poat != NULL); + + poat->is_deleting = 0; + poat->shader_count = 0; + + fastpath_ostate_set_object_tag(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, ret, poat); + } + _attach_program_object(¤t_ctx->ostate, real_obj); + + goto finish; + + finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +void +fastpath_glGenProgramPipelines( GLsizei n, GLuint *pipelines) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0 || pipelines == NULL) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + + IF_GL_SUCCESS(_orig_fastpath_glGenProgramPipelines(n, objid_array)) + { + for (i = 0; i < n; i++) + { + pipelines[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAMPIPELINE, objid_array[i]); + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glBindProgramPipeline( GLuint pipeline) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + if (current_ctx->gl_program_pipeline_binding[0] != real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindProgramPipeline(real_obj)) + { + current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_program_pipeline_binding; + current_ctx->gl_program_pipeline_binding[0] = real_obj; + } + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (params == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + switch (pname) + { + case GL_ACTIVE_PROGRAM: + case GL_VERTEX_SHADER: + case GL_FRAGMENT_SHADER: + case GL_COMPUTE_SHADER: + case GL_INFO_LOG_LENGTH: + case GL_VALIDATE_STATUS: + _orig_fastpath_glGetProgramPipelineiv(real_obj, pname, params); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0 || pipelines == NULL) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + if (n == 0) + goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + { + int real_n = 0; + + for (i = 0; i < n; i++) + { + int real_objid = _COREGL_INT_INIT_VALUE; + if (pipelines[i] == 0) continue; + + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAMPIPELINE, pipelines[i]); + if (real_objid == 0) continue; + + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAMPIPELINE, pipelines[i]) == 1); + objid_array[real_n++] = real_objid; + } + + IF_GL_SUCCESS(_orig_fastpath_glDeleteProgramPipelines(real_n, objid_array)) + { + for (i = 0; i < real_n; i++) + { + General_Trace_List *current = NULL; + current = current_ctx->ostate.shared->using_gctxs; + + while (current != NULL) + { + GLGlueContext *cur_gctx = (GLGlueContext *)current->value; + + if (cur_gctx->gl_program_pipeline_binding[0] == objid_array[i]) + cur_gctx->gl_program_pipeline_binding[0] = 0; + + current = current->next; + } + } + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +GLboolean +fastpath_glIsProgramPipeline( GLuint pipeline) +{ + GLboolean ret = GL_FALSE; + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) + { + ret = GL_FALSE; + goto finish; + } + + ret = _orig_fastpath_glIsProgramPipeline(real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +void +fastpath_glValidateProgramPipeline(GLuint pipeline) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glValidateProgramPipeline(real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (NULL == infoLog || bufSize < 0 || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glGetProgramPipelineInfoLog(real_obj, bufSize, length, infoLog); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (num_groups_x > GL_MAX_COMPUTE_WORK_GROUP_COUNT || + num_groups_y > GL_MAX_COMPUTE_WORK_GROUP_COUNT || + num_groups_z > GL_MAX_COMPUTE_WORK_GROUP_COUNT) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + if (num_groups_x == 0 || num_groups_y == 0 || num_groups_z == 0) + { + goto finish; + } + + _orig_fastpath_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDispatchComputeIndirect( GLintptr indirect) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (indirect < 0 || (indirect % sizeof(GLuint)) != 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glDispatchComputeIndirect(indirect); + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (params == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glGetProgramInterfaceiv(real_obj, programInterface, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +GLuint +fastpath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +{ + GLuint real_obj; + GLuint ret = GL_INVALID_INDEX; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (name == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + ret = _orig_fastpath_glGetProgramResourceIndex(real_obj, programInterface, name); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +void +fastpath_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((NULL == name && 0 != bufSize) || 0 > bufSize || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glGetProgramResourceName(real_obj, programInterface, index, bufSize, length, name); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (0 > bufSize || 0 >= propCount || NULL == props || ((NULL == params && 0 < bufSize)) || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glGetProgramResourceiv(real_obj, programInterface, index, propCount, props, bufSize, length, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +GLint +fastpath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +{ + GLuint real_obj; + GLuint ret = -1; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (name == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + ret = _orig_fastpath_glGetProgramResourceLocation(real_obj, programInterface, name); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +void +fastpath_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glUseProgramStages(pipeline, stages, real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glActiveShaderProgram(GLuint pipeline, GLuint program) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glActiveShaderProgram(pipeline, real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform1iv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform2iv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform3iv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform4iv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + + +void +fastpath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform1fv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform2fv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform3fv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform4fv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix2fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix3fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix4fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform1i(GLuint program, GLint location, GLint x) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform1i(real_obj, location, x); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform2i(real_obj, location, x, y); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform3i(real_obj, location, x, y, z); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform4i(real_obj, location, x, y, z, w); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform1f(GLuint program, GLint location, GLfloat x) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform1f(real_obj, location, x); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform2f(real_obj, location, x, y); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform3f(real_obj, location, x, y, z); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform4f(real_obj, location, x, y, z, w); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glProgramUniform1ui(GLuint program, GLint location, GLuint x) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform1ui(real_obj, location, x); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform2ui(real_obj, location, x, y); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform3ui(real_obj, location, x, y, z); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform4ui(real_obj, location, x, y, z, w); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform1uiv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform2uiv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform3uiv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniform4uiv(real_obj, location, count, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix2x3fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix3x2fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix4x2fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix2x4fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix3x4fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + + _orig_fastpath_glProgramUniformMatrix4x3fv(real_obj, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glBindImageTexture(unit, texture, level, layered, layer, access, format); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetBooleani_v (GLenum target, GLuint index, GLboolean *data) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + IF_GL_SUCCESS(_orig_fastpath_glGetBooleani_v(target, index, data)) + { + _modify_get_value(target, data, GL_BOOL, GL_FALSE); + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glMemoryBarrier (GLbitfield barriers) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glMemoryBarrier(barriers); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glMemoryBarrierByRegion (GLbitfield barriers) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glMemoryBarrierByRegion(barriers); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glGetMultisamplefv (pname, index, val); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glSampleMaski (GLuint maskNumber, GLbitfield mask) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glSampleMaski(maskNumber, mask); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glGetTexLevelParameteriv (target, level, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glGetTexLevelParameterfv (target, level, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glBindVertexBuffer(bindingindex, buffer, offset, stride); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + +} + +void +fastpath_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glVertexAttribIFormat (attribindex, size, type, relativeoffset); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glVertexAttribBinding (attribindex, bindingindex); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glVertexBindingDivisor (bindingindex, divisor); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} diff --git a/src/modules/fastpath/coregl_fastpath_state.h b/src/modules/fastpath/coregl_fastpath_state.h index c56a410..7126023 100644 --- a/src/modules/fastpath/coregl_fastpath_state.h +++ b/src/modules/fastpath/coregl_fastpath_state.h @@ -18,7 +18,7 @@ #define SET_N(n, inc, stmt) \ { \ int i; \ - for (i = 0; i < n; i++) \ + for (i = 0; i < (int)n; i++) \ { \ stmt \ value += inc; \ @@ -198,7 +198,7 @@ GLUE_STATE(GLint, gl_scissor_box, 4, 4, GLUE_STATE(GLuint, gl_vertex_array_buf_id, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(0)), SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, (GLint *)value);)) -GLUE_STATE(GLboolean, gl_vertex_array_enabled, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, +GLUE_STATE(GLint, gl_vertex_array_enabled, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, (GLint *)value);)) GLUE_STATE(GLint, gl_vertex_array_size, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, @@ -210,10 +210,10 @@ GLUE_STATE(GLsizei, gl_vertex_array_stride, INITIAL_CTX->gl_num_vertex_attribs[0 GLUE_STATE(GLenum, gl_vertex_array_type, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FLOAT)), SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_TYPE, (GLint *)value);)) -GLUE_STATE(GLboolean, gl_vertex_array_normalized, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, +GLUE_STATE(GLint, gl_vertex_array_normalized, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, (GLint *)value);)) -GLUE_STATE(GLboolean, gl_vertex_array_integer, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, +GLUE_STATE(GLint, gl_vertex_array_integer, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_INTEGER, (GLint *)value);)) GLUE_STATE(GLuint, gl_vertex_array_divisor, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, @@ -229,10 +229,10 @@ GLUE_STATE(GLfloat, gl_vertex_attrib_value, 4 * INITIAL_CTX->gl_num_vertex_attri _COREGL_START_API(COREGL_GLAPI_3) GLUE_STATE(GLint, gl_vertex_attrib_value_integer, 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_INT_FROM_FLOAT(1.0f))), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, _sym_glGetVertexAttribIiv(i, GL_CURRENT_VERTEX_ATTRIB, (GLint *)value);)) + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_INT_FROM_FLOAT(1.0f)))) GLUE_STATE(GLuint, gl_vertex_attrib_value_unsigned_integer, 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_UINT_FROM_FLOAT(1.0f))), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, _sym_glGetVertexAttribIuiv(i, GL_CURRENT_VERTEX_ATTRIB, (GLuint *)value);)) + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_INT_FROM_FLOAT(1.0f)))) // MISC FLAG 3 GLUE_STATE(GLenum, gl_read_buffer, 1, 1, SET_1(GL_BACK), _sym_glGetIntegerv(GL_READ_BUFFER, (GLint *)value);) @@ -240,6 +240,7 @@ GLUE_STATE(GLenum, gl_draw_buffers, INITIAL_CTX->gl_num_draw_buffers[0], 16, SET_1(GL_BACK); value++; SET_N(INITIAL_CTX->gl_num_draw_buffers[0] - 1, 1, SET_1(GL_NONE)), _state_get_draw_buffers(value);) GLUE_STATE(GLuint, gl_vertex_array_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_VERTEX_ARRAY_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_program_pipeline_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PROGRAM_PIPELINE_BINDING, (GLint *)value);) GLUE_STATE(GLuint, gl_transform_feedback_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_TRANSFORM_FEEDBACK_BINDING, (GLint *)value);) GLUE_STATE(GLboolean, gl_transform_feedback_active, 1, 1, SET_1(0), _sym_glGetBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, (GLboolean *)value);) GLUE_STATE(GLboolean, gl_transform_feedback_paused, 1, 1, SET_1(0), _sym_glGetBooleanv(GL_TRANSFORM_FEEDBACK_PAUSED, (GLboolean *)value);) diff --git a/src/modules/tracepath/coregl_tracepath.h b/src/modules/tracepath/coregl_tracepath.h index e40a666..4acedf4 100644 --- a/src/modules/tracepath/coregl_tracepath.h +++ b/src/modules/tracepath/coregl_tracepath.h @@ -127,9 +127,8 @@ extern void deinit_modules_tstate_tracepath(GLThreadState *tstate extern void tracepath_apply_overrides(); -extern void tracepath_apply_overrides_egl(); -extern void tracepath_apply_overrides_gl(); - +extern void tracepath_apply_overrides_egl(int enable); +extern void tracepath_apply_overrides_gl(int enable); extern void tracepath_dump_context_states(int force_output); extern void *tracepath_api_trace_begin(const char *name, void *hint, int trace_total_time); diff --git a/src/modules/tracepath/coregl_tracepath_egl.c b/src/modules/tracepath/coregl_tracepath_egl.c index 6bf7743..98a8bf6 100644 --- a/src/modules/tracepath/coregl_tracepath_egl.c +++ b/src/modules/tracepath/coregl_tracepath_egl.c @@ -1085,3 +1085,48 @@ finish: return ret; } +EGLBoolean +tracepath_eglBindWaylandDisplayWL(EGLDisplay dpy, void* display) +{ + EGLBoolean ret = EGL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_eglBindWaylandDisplayWL(dpy, display); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +EGLBoolean +tracepath_eglUnbindWaylandDisplayWL(EGLDisplay dpy, void* display) +{ + EGLBoolean ret = EGL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_eglUnbindWaylandDisplayWL(dpy, display); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + + +EGLBoolean +tracepath_eglQueryWaylandBufferWL(EGLDisplay dpy, void* buffer, EGLint attribute, EGLint *value) +{ + EGLBoolean ret = EGL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_eglQueryWaylandBufferWL(dpy, buffer, attribute, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} \ No newline at end of file diff --git a/src/modules/tracepath/coregl_tracepath_gl.c b/src/modules/tracepath/coregl_tracepath_gl.c index d4d263d..8b9b0c8 100644 --- a/src/modules/tracepath/coregl_tracepath_gl.c +++ b/src/modules/tracepath/coregl_tracepath_gl.c @@ -4500,3 +4500,828 @@ finish: return ret; } +/* GLES3.1 API */ +void +tracepath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLuint +tracepath_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +{ + GLboolean ret = GL_FALSE; + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glCreateShaderProgramv(type, count, strings); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void +tracepath_glGenProgramPipelines( GLsizei n, GLuint *pipelines) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGenProgramPipelines(n, pipelines); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glBindProgramPipeline( GLuint pipeline) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBindProgramPipeline(pipeline); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetProgramPipelineiv(pipeline, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDeleteProgramPipelines(n, pipelines); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLboolean +tracepath_glIsProgramPipeline( GLuint pipeline) +{ + GLboolean ret = GL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glIsProgramPipeline(pipeline); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void +tracepath_glValidateProgramPipeline(GLuint pipeline) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glValidateProgramPipeline(pipeline); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDispatchComputeIndirect( GLintptr indirect) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDispatchComputeIndirect(indirect); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDrawArraysIndirect(GLenum mode, GLvoid const *indirect) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDrawArraysIndirect(mode, indirect); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDrawElementsIndirect(GLenum mode, GLenum type, GLvoid const *indirect) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDrawElementsIndirect(mode, type, indirect); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glFramebufferParameteri(target, pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint * params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetFramebufferParameteriv(target, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetProgramInterfaceiv(program, programInterface, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLuint +tracepath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +{ + GLuint ret = GL_INVALID_INDEX; + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glGetProgramResourceIndex(program, programInterface, name); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void +tracepath_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + + _orig_tracepath_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + + _orig_tracepath_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLint +tracepath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +{ + GLuint ret = -1; + _COREGL_TRACEPATH_FUNC_BEGIN(); + + ret = _orig_tracepath_glGetProgramResourceLocation(program, programInterface, name); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void +tracepath_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glUseProgramStages(pipeline, stages, program); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glActiveShaderProgram(GLuint pipeline, GLuint program) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glActiveShaderProgram(pipeline, program); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform1iv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform2iv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform3iv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform4iv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform1fv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform2fv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform3fv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform4fv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix2fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix3fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix4fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform1i(GLuint program, GLint location, GLint x) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform1i(program, location, x); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform2i(program, location, x, y); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform3i(program, location, x, y, z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform4i(program, location, x, y, z, w); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform1f(GLuint program, GLint location, GLfloat x) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform1f(program, location, x); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform2f(program, location, x, y); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform3f(program, location, x, y, z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform4f(program, location, x, y, z, w); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform1ui(GLuint program, GLint location, GLuint x) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform1ui(program, location, x); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform2ui(program, location, x, y); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform3ui(program, location, x, y, z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform4ui(program, location, x, y, z, w); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform1uiv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform2uiv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform3uiv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniform4uiv(program, location, count, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + + _orig_tracepath_glBindImageTexture(unit, texture, level, layered, layer, access, format); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetBooleani_v (GLenum target, GLuint index, GLboolean *data) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetBooleani_v (target, index, data); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glMemoryBarrier (GLbitfield barriers) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMemoryBarrier (barriers); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glMemoryBarrierByRegion (GLbitfield barriers) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMemoryBarrierByRegion (barriers); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetMultisamplefv (pname, index, val); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glSampleMaski (GLuint maskNumber, GLbitfield mask) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glSampleMaski (maskNumber, mask); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetTexLevelParameteriv (target, level, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetTexLevelParameterfv (target, level, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBindVertexBuffer (bindingindex, buffer, offset, stride); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void tracepath_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glVertexAttribIFormat (attribindex, size, type, relativeoffset); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glVertexAttribBinding (attribindex, bindingindex); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glVertexBindingDivisor (bindingindex, divisor); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} \ No newline at end of file diff --git a/src/wraps/coregl_gl.c b/src/wraps/coregl_gl.c index ba7eda9..365601a 100644 --- a/src/wraps/coregl_gl.c +++ b/src/wraps/coregl_gl.c @@ -1536,3 +1536,405 @@ glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsize ovr_glGetInternalformativ(target, internalformat, pname, bufSize, params); } +/* GLES3.1 API */ +GLuint +glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +{ + return ovr_glCreateShaderProgramv(type, count, strings); +} + +void +glGenProgramPipelines( GLsizei n, GLuint *pipelines) +{ + ovr_glGenProgramPipelines(n, pipelines); +} + +void +glBindProgramPipeline( GLuint pipeline) +{ + ovr_glBindProgramPipeline(pipeline); +} + +void +glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) +{ + ovr_glGetProgramPipelineiv(pipeline, pname, params); +} + +void +glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) +{ + ovr_glDeleteProgramPipelines(n, pipelines); +} + +GLboolean +glIsProgramPipeline( GLuint pipeline) +{ + return ovr_glIsProgramPipeline(pipeline); +} + +void +glValidateProgramPipeline(GLuint pipeline) +{ + ovr_glValidateProgramPipeline(pipeline); +} + +void +glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +{ + ovr_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); +} + +void +glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +{ + ovr_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); +} + +void +glDispatchComputeIndirect( GLintptr indirect) +{ + ovr_glDispatchComputeIndirect(indirect); +} + +void +glDrawArraysIndirect(GLenum mode, GLvoid const *indirect) +{ + ovr_glDrawArraysIndirect(mode, indirect); +} + +void +glDrawElementsIndirect(GLenum mode, GLenum type, GLvoid const *indirect) +{ + ovr_glDrawElementsIndirect(mode, type, indirect); +} + +void +glFramebufferParameteri(GLenum target, GLenum pname, GLint param) +{ + ovr_glFramebufferParameteri(target, pname, param); +} + +void +glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint * params) +{ + ovr_glGetFramebufferParameteriv(target, pname, params); +} + +void +glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +{ + ovr_glGetProgramInterfaceiv(program, programInterface, pname, params); +} + +GLuint +glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +{ + return ovr_glGetProgramResourceIndex(program, programInterface, name); +} + +void +glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +{ + ovr_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); +} + +void +glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +{ + ovr_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); +} + +GLint +glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +{ + return ovr_glGetProgramResourceLocation(program, programInterface, name); +} + +void +glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +{ + ovr_glUseProgramStages(pipeline, stages, program); +} + +void +glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform1iv(program, location, count, value); +} + +void +glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform2iv(program, location, count, value); +} + +void +glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform3iv(program, location, count, value); +} + +void +glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +{ + ovr_glProgramUniform4iv(program, location, count, value); +} + +void +glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform1fv(program, location, count, value); +} + +void +glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform2fv(program, location, count, value); +} + +void +glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform3fv(program, location, count, value); +} + +void +glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +{ + ovr_glProgramUniform4fv(program, location, count, value); +} + +void +glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix2fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix3fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix4fv(program, location, count, transpose, value); +} + +void +glProgramUniform1i(GLuint program, GLint location, GLint x) +{ + ovr_glProgramUniform1i(program, location, x); +} + +void +glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) +{ + ovr_glProgramUniform2i(program, location, x, y); +} + +void +glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +{ + ovr_glProgramUniform3i(program, location, x, y, z); +} + +void +glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +{ + ovr_glProgramUniform4i(program, location, x, y, z, w); +} + +void +glProgramUniform1f(GLuint program, GLint location, GLfloat x) +{ + ovr_glProgramUniform1f(program, location, x); +} + +void +glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +{ + ovr_glProgramUniform2f(program, location, x, y); +} + +void +glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +{ + ovr_glProgramUniform3f(program, location, x, y, z); +} + +void +glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + ovr_glProgramUniform4f(program, location, x, y, z, w); +} + +void +glProgramUniform1ui(GLuint program, GLint location, GLuint x) +{ + ovr_glProgramUniform1ui(program, location, x); +} + +void +glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) +{ + ovr_glProgramUniform2ui(program, location, x, y); +} + +void +glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +{ + ovr_glProgramUniform3ui(program, location, x, y, z); +} + +void +glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +{ + ovr_glProgramUniform4ui(program, location, x, y, z, w); +} + +void +glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform1uiv(program, location, count, value); +} + +void +glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform2uiv(program, location, count, value); +} + +void +glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform3uiv(program, location, count, value); +} + +void +glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +{ + ovr_glProgramUniform4uiv(program, location, count, value); +} + +void +glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); +} + +void +glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +{ + ovr_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); +} + +void +glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +{ + ovr_glBindImageTexture (unit, texture, level, layered, layer, access, format); +} + +void +glGetBooleani_v (GLenum target, GLuint index, GLboolean *data) +{ + ovr_glGetBooleani_v (target, index, data); +} + +void +glMemoryBarrier (GLbitfield barriers) +{ + ovr_glMemoryBarrier (barriers); +} + +void +glMemoryBarrierByRegion (GLbitfield barriers) +{ + ovr_glMemoryBarrierByRegion (barriers); +} + +void +glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +{ + ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); +} + +void +glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val) +{ + ovr_glGetMultisamplefv (pname, index, val); +} + +void +glSampleMaski (GLuint maskNumber, GLbitfield mask) +{ + ovr_glSampleMaski (maskNumber, mask); +} + +void +glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +{ + ovr_glGetTexLevelParameteriv (target, level, pname, params); +} + +void +glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +{ + ovr_glGetTexLevelParameterfv (target, level, pname, params); +} + +void +glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +{ + ovr_glBindVertexBuffer (bindingindex, buffer, offset, stride); +} + +void +glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +{ + ovr_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); +} + +void +glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +{ + ovr_glVertexAttribIFormat (attribindex, size, type, relativeoffset); +} + +void +glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) +{ + ovr_glVertexAttribBinding (attribindex, bindingindex); +} + +void +glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) +{ + ovr_glVertexBindingDivisor (bindingindex, divisor); +} -- 2.7.4 From bfef8696b6200121b41e7cbfc51fc4643b3af0eb Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Wed, 25 Nov 2015 00:19:56 +0900 Subject: [PATCH 03/16] Add egl.pc Remove unused file Fix description on package config file Change-Id: I1cda3fcd47c89726676c2c37d94a766521f14cd4 --- CMakeLists.txt | 4 ---- COREGL.pc.in | 13 ------------- pkgconfig/egl.pc | 11 +++++++++++ pkgconfig/gles11.pc | 2 +- pkgconfig/gles20.pc | 2 +- pkgconfig/glesv1.pc | 2 +- pkgconfig/glesv1_cm.pc | 2 +- pkgconfig/glesv2.pc | 2 +- 8 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 COREGL.pc.in create mode 100644 pkgconfig/egl.pc diff --git a/CMakeLists.txt b/CMakeLists.txt index b4f61c8..4d4c75b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,14 +114,10 @@ SET_TARGET_PROPERTIES(${GLES2} PROPERTIES VERSION ${GLES2_VERSION}) #SET_TARGET_PROPERTIES(${COREGL} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common}) TARGET_LINK_LIBRARIES(${GLES2} ${pkg_common_LDFLAGS} ${dlog_LIBRARIES} "-ldl -g -O2 -fvisibility=hidden -Wall -std=c99 -lpthread") -CONFIGURE_FILE(${COREGL}.pc.in ${COREGL}.pc @ONLY) - INSTALL(TARGETS ${COREGL} DESTINATION lib COMPONENT RuntimeLibraries) INSTALL(TARGETS ${EGL} DESTINATION lib COMPONENT RuntimeLibraries) INSTALL(TARGETS ${GLES2} DESTINATION lib COMPONENT RuntimeLibraries) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${COREGL}.pc DESTINATION lib/pkgconfig) - #FOREACH(hfile ${HEADERS_common}) # INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/coregl) #ENDFOREACH(hfile) diff --git a/COREGL.pc.in b/COREGL.pc.in deleted file mode 100644 index ca32f1b..0000000 --- a/COREGL.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -# Package Information for pkg-config - -prefix=@PREFIX@ -exec_prefix=@EXEC_PREFIX@ -libdir=@LIBDIR@ -includedir=@INCLUDEDIR@ - -Name: coregl -Description: SAMSUNG Linux platform application library -Version: @VERSION@ -Requires: x11 dlog -Libs: -L${libdir} -lcoregl -Cflags: -I${includedir} -I${includedir}/coregl diff --git a/pkgconfig/egl.pc b/pkgconfig/egl.pc new file mode 100644 index 0000000..855639f --- /dev/null +++ b/pkgconfig/egl.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=/usr/include + +Name: egl +Description: CoreGL EGL library +Version: 0.1 +Requires: +Libs: -L${libdir} -lEGL +Cflags: -I${includedir} diff --git a/pkgconfig/gles11.pc b/pkgconfig/gles11.pc index 9306e86..1ddec10 100644 --- a/pkgconfig/gles11.pc +++ b/pkgconfig/gles11.pc @@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include Name: gles11 -Description: OpenGL-ES 1.1 Library for ARM Mali 400MP +Description: CoreGL OpenGL-ES 1.1 Library Version: 0.1 Requires: Libs: -L${libdir} -lGLESv1_CM -lEGL diff --git a/pkgconfig/gles20.pc b/pkgconfig/gles20.pc index 2b99820..d1d7c14 100644 --- a/pkgconfig/gles20.pc +++ b/pkgconfig/gles20.pc @@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include Name: gles20 -Description: OpenGL-ES 2.0 Library for ARM Mali 400MP +Description: CoreGL OpenGL-ES 2.0 Library Version: 0.1 Requires: Libs: -L${libdir} -lGLESv2 -lEGL diff --git a/pkgconfig/glesv1.pc b/pkgconfig/glesv1.pc index da7cf0e..e09cefd 100644 --- a/pkgconfig/glesv1.pc +++ b/pkgconfig/glesv1.pc @@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include Name: glesv1 -Description: OpenGL-ES 1.1 Library for ARM Mali 400MP +Description: CoreGL OpenGL-ES 1.1 Library Version: 0.1 Requires: Libs: -L${libdir} -lGLESv1_CM -lEGL diff --git a/pkgconfig/glesv1_cm.pc b/pkgconfig/glesv1_cm.pc index 153fd3b..54d77f2 100644 --- a/pkgconfig/glesv1_cm.pc +++ b/pkgconfig/glesv1_cm.pc @@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include Name: glesv1_cm -Description: OpenGL-ES 1.1 Library for ARM Mali 400MP +Description: CoreGL OpenGL-ES 1.1 Library Version: 0.1 Requires: Libs: -L${libdir} -lGLESv1_CM -lEGL diff --git a/pkgconfig/glesv2.pc b/pkgconfig/glesv2.pc index a73e902..7e3cbaa 100644 --- a/pkgconfig/glesv2.pc +++ b/pkgconfig/glesv2.pc @@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include Name: glesv2 -Description: OpenGL-ES 2.0 Library for ARM Mali 400MP +Description: CoreGL OpenGL-ES 2.0 Library Version: 0.1 Requires: Libs: -L${libdir} -lGLESv2 -lEGL -- 2.7.4 From 73a17439b2daf80270acb8275b5699e235492b26 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 7 Dec 2015 13:28:53 +0900 Subject: [PATCH 04/16] Add ix86 and x86_64 to Build Architecture. Change-Id: I2d47b050ffca66c021afa8bd46908e618231330c --- CMakeLists.txt | 2 ++ packaging/coregl.spec | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d4c75b..6c1b233 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ SET(BUILD_ARCH "$ENV{RPM_ARCH}") IF(${BUILD_ARCH} MATCHES "aarch64") SET(LIBDIR "/usr/lib64") +ELSEIF(${BUILD_ARCH} MATCHES "x86_64") +SET(LIBDIR "/usr/lib64") ELSE(${BUILD_ARCH} MATCHES "aarch64") SET(LIBDIR "/usr/lib") ENDIF(${BUILD_ARCH} MATCHES "aarch64") diff --git a/packaging/coregl.spec b/packaging/coregl.spec index 1e2957c..2bd548e 100644 --- a/packaging/coregl.spec +++ b/packaging/coregl.spec @@ -4,7 +4,6 @@ Name: coregl Summary: CoreGL FastPath Optimization Version: 0.1.10 Release: 02 -ExclusiveArch: %arm aarch64 Group: Graphics License: Apache 2.0 URL: http://www.tizen.org -- 2.7.4 From 13cd81887dd6152fa5390f10440c05dd3f845a95 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 7 Dec 2015 15:30:09 +0900 Subject: [PATCH 05/16] Add devel package requires. libwayland-egl libgbm-devel Change-Id: Ib50c214f4f2e91d3bb8285c7b494b3bd06d11f27 --- packaging/coregl.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/coregl.spec b/packaging/coregl.spec index 2bd548e..0604938 100644 --- a/packaging/coregl.spec +++ b/packaging/coregl.spec @@ -27,6 +27,8 @@ Supported versions: Summary: Development files for EGL 1.4 and OpenGL ES 1.1 and 2.0 Group: Graphics Requires: %{name} = %{version}-%{release} +Requires: libgbm-devel +Requires: libwayland-egl %description devel This package contains the development libraries and header files needed by -- 2.7.4 From 86f4ff2b048c9edc4cbecc5f2298cdf1a97cd626 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 7 Dec 2015 15:52:29 +0900 Subject: [PATCH 06/16] Fix egl package config version match to mesa egl version. Change-Id: Ida942be9ace41c9893dadd5d88af3b6a7211e0df --- pkgconfig/egl.pc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgconfig/egl.pc b/pkgconfig/egl.pc index 855639f..cb03cd6 100644 --- a/pkgconfig/egl.pc +++ b/pkgconfig/egl.pc @@ -5,7 +5,7 @@ includedir=/usr/include Name: egl Description: CoreGL EGL library -Version: 0.1 +Version: 10.3.0 Requires: Libs: -L${libdir} -lEGL Cflags: -I${includedir} -- 2.7.4 From af04a32d08541164a385753498e563b3e7fa13a8 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 14 Dec 2015 14:36:16 +0900 Subject: [PATCH 07/16] Add wayland specs to eglext.h Change-Id: I1d997f51b299d53e6b0444877953c6fc3794abb1 --- include_KHR/EGL/eglext.h | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/include_KHR/EGL/eglext.h b/include_KHR/EGL/eglext.h index 860d9fb..027b2ed 100644 --- a/include_KHR/EGL/eglext.h +++ b/include_KHR/EGL/eglext.h @@ -798,7 +798,7 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void); #endif /* EGL_TIZEN_image_native_surface */ /******************************************************************************/ -/* 20140709-sw815.ha: SEC proprietary specs */ +/* SEC proprietary specs */ #ifndef EGL_SEC_client_pixmap #define EGL_SEC_client_pixmap 1 #define EGL_CLINET_MEM_PIXMAP_SEC 0x3200 /* eglCreateClientPixmapFromClientBufferSEC buftype */ @@ -839,6 +839,44 @@ EGLAPI EGLBoolean EGLAPIENTRY eglGetImageAttribSEC (EGLDisplay dpy, EGLImageKHR #endif /*EGL_ANDROID_PIXMAP_image /******************************************************************************/ +/******************************************************************************/ +/* WAYLAND specs */ +#ifndef EGL_WL_bind_wayland_display +#define EGL_WL_bind_wayland_display 1 + +#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ +#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */ + +#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */ + +#define EGL_TEXTURE_Y_U_V_WL 0x31D7 +#define EGL_TEXTURE_Y_UV_WL 0x31D8 +#define EGL_TEXTURE_Y_XUXV_WL 0x31D9 + +struct wl_display; +struct wl_resource; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); +#endif +typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); + +#endif + +#ifndef EGL_WL_create_wayland_buffer_from_image +#define EGL_WL_create_wayland_buffer_from_image 1 + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); +#endif +typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image); + +#endif +/******************************************************************************/ + #ifdef __cplusplus } #endif -- 2.7.4 From 50c6136ac4336c383cafd3a8fff5916a92c0f288 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Thu, 24 Dec 2015 12:57:15 +0900 Subject: [PATCH 08/16] Add error checking code for initialize of real EGL. Change-Id: Id635f0e87c5d5d6309b3ca10dd7df7c82bb82e69 --- src/coregl_export_egl.c | 170 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 136 insertions(+), 34 deletions(-) diff --git a/src/coregl_export_egl.c b/src/coregl_export_egl.c index da04740..b8ae001 100644 --- a/src/coregl_export_egl.c +++ b/src/coregl_export_egl.c @@ -8,8 +8,10 @@ Mutex init_export_mutex = MUTEX_INITIALIZER; mutex_lock(&init_export_mutex); \ if (export_initialized == 0) \ { \ - coregl_initialize(); \ - export_initialized = 1; \ + if (coregl_initialize() != 0) \ + { \ + export_initialized = 1; \ + } \ } \ mutex_unlock(&init_export_mutex); \ } @@ -18,49 +20,70 @@ EGLint coregl_api_eglGetError(void) { INIT_EXPORT(); - return ovr_eglGetError(); + if (!export_initialized) + return EGL_NOT_INITIALIZED; + else + return ovr_eglGetError(); } EGLDisplay coregl_api_eglGetDisplay(EGLNativeDisplayType display_id) { INIT_EXPORT(); - return ovr_eglGetDisplay(display_id); + if (!export_initialized) + return NULL; + else + return ovr_eglGetDisplay(display_id); } EGLBoolean coregl_api_eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) { INIT_EXPORT(); - return ovr_eglInitialize(dpy, major, minor); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglInitialize(dpy, major, minor); } EGLBoolean coregl_api_eglTerminate(EGLDisplay dpy) { INIT_EXPORT(); - return ovr_eglTerminate(dpy); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglTerminate(dpy); } EGLBoolean coregl_api_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) { INIT_EXPORT(); - return ovr_eglGetConfigs(dpy, configs, config_size, num_config); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglGetConfigs(dpy, configs, config_size, num_config); } EGLBoolean coregl_api_eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) { INIT_EXPORT(); - return ovr_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config); } EGLBoolean coregl_api_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { INIT_EXPORT(); - return ovr_eglGetConfigAttrib(dpy, config, attribute, value); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglGetConfigAttrib(dpy, config, attribute, value); } @@ -68,146 +91,208 @@ EGLSurface coregl_api_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) { INIT_EXPORT(); - return ovr_eglCreateWindowSurface(dpy, config, win, attrib_list); + if (!export_initialized) + return EGL_NO_SURFACE; + else + return ovr_eglCreateWindowSurface(dpy, config, win, attrib_list); } EGLSurface coregl_api_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) { INIT_EXPORT(); - return ovr_eglCreatePbufferSurface(dpy, config, attrib_list); + if (!export_initialized) + return EGL_NO_SURFACE; + else + return ovr_eglCreatePbufferSurface(dpy, config, attrib_list); } EGLSurface coregl_api_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) { INIT_EXPORT(); - return ovr_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list); + if (!export_initialized) + return EGL_NO_SURFACE; + else + return ovr_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list); } EGLBoolean coregl_api_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { INIT_EXPORT(); - return ovr_eglDestroySurface(dpy, surface); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglDestroySurface(dpy, surface); } EGLBoolean coregl_api_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) { INIT_EXPORT(); - return ovr_eglQuerySurface(dpy, surface, attribute, value); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglQuerySurface(dpy, surface, attribute, value); } EGLBoolean coregl_api_eglBindAPI(EGLenum api) { INIT_EXPORT(); - return ovr_eglBindAPI(api); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglBindAPI(api); } EGLenum coregl_api_eglQueryAPI(void) { INIT_EXPORT(); - return ovr_eglQueryAPI(); + if (!export_initialized) + return EGL_NONE; + else + return ovr_eglQueryAPI(); } EGLBoolean coregl_api_eglWaitClient(void) { INIT_EXPORT(); - return ovr_eglWaitClient(); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglWaitClient(); } EGLBoolean coregl_api_eglReleaseThread(void) { INIT_EXPORT(); - return ovr_eglReleaseThread(); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglReleaseThread(); } EGLSurface coregl_api_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) { INIT_EXPORT(); - return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); + if (!export_initialized) + return EGL_NO_SURFACE; + else + return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); } EGLBoolean coregl_api_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) { INIT_EXPORT(); - return ovr_eglSurfaceAttrib(dpy, surface, attribute, value); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglSurfaceAttrib(dpy, surface, attribute, value); } EGLBoolean coregl_api_eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { INIT_EXPORT(); - return ovr_eglBindTexImage(dpy, surface, buffer); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglBindTexImage(dpy, surface, buffer); } EGLBoolean coregl_api_eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { INIT_EXPORT(); - return ovr_eglReleaseTexImage(dpy, surface, buffer); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglReleaseTexImage(dpy, surface, buffer); } EGLBoolean coregl_api_eglSwapInterval(EGLDisplay dpy, EGLint interval) { INIT_EXPORT(); - return ovr_eglSwapInterval(dpy, interval); + if (!export_initialized) + EGL_FALSE; + else + return ovr_eglSwapInterval(dpy, interval); } EGLContext coregl_api_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) { INIT_EXPORT(); - return ovr_eglCreateContext(dpy, config, share_context, attrib_list); + if (!export_initialized) + return EGL_NO_CONTEXT; + else + return ovr_eglCreateContext(dpy, config, share_context, attrib_list); } EGLBoolean coregl_api_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { INIT_EXPORT(); - return ovr_eglDestroyContext(dpy, ctx); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglDestroyContext(dpy, ctx); } EGLBoolean coregl_api_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) { INIT_EXPORT(); - return ovr_eglMakeCurrent(dpy, draw, read, ctx); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglMakeCurrent(dpy, draw, read, ctx); } EGLContext coregl_api_eglGetCurrentContext(void) { INIT_EXPORT(); - return ovr_eglGetCurrentContext(); + if (!export_initialized) + return EGL_NO_CONTEXT; + else + return ovr_eglGetCurrentContext(); } EGLSurface coregl_api_eglGetCurrentSurface(EGLint readdraw) { INIT_EXPORT(); - return ovr_eglGetCurrentSurface(readdraw); + if (!export_initialized) + return EGL_NO_SURFACE; + else + return ovr_eglGetCurrentSurface(readdraw); } EGLDisplay coregl_api_eglGetCurrentDisplay(void) { INIT_EXPORT(); - return ovr_eglGetCurrentDisplay(); + if (!export_initialized) + return EGL_NO_DISPLAY; + else + return ovr_eglGetCurrentDisplay(); } EGLBoolean coregl_api_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) { INIT_EXPORT(); + if (!export_initialized) + return EGL_FALSE; return ovr_eglQueryContext(dpy, ctx, attribute, value); } @@ -215,41 +300,58 @@ EGLBoolean coregl_api_eglWaitGL(void) { INIT_EXPORT(); - return ovr_eglWaitGL(); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglWaitGL(); } EGLBoolean coregl_api_eglWaitNative(EGLint engine) { INIT_EXPORT(); - return ovr_eglWaitNative(engine); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglWaitNative(engine); } EGLBoolean coregl_api_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { INIT_EXPORT(); - return ovr_eglSwapBuffers(dpy, surface); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglSwapBuffers(dpy, surface); } EGLBoolean coregl_api_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) { INIT_EXPORT(); - return ovr_eglCopyBuffers(dpy, surface, target); + if (!export_initialized) + return EGL_FALSE; + else + return ovr_eglCopyBuffers(dpy, surface, target); } _eng_fn coregl_api_eglGetProcAddress(const char* procname) { INIT_EXPORT(); - return ovr_eglGetProcAddress(procname); + if (!export_initialized) + return NULL; + else + return ovr_eglGetProcAddress(procname); } const char * coregl_api_eglQueryString(EGLDisplay dpy, EGLint name) { INIT_EXPORT(); + if (!export_initialized) + return NULL; return ovr_eglQueryString(dpy, name); } -- 2.7.4 From 19ba76af2ebc858a1373845f7c60d8253776a87a Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 4 Jan 2016 23:02:12 +0900 Subject: [PATCH 09/16] Fix package-config file's library directory for 64bit architecture. Change-Id: If8c4f3e65d5b8567982af573843fdc7f3e7862a9 --- CMakeLists.txt | 13 +++++++++++++ pkgconfig/{egl.pc => egl.pc.in} | 4 ++-- pkgconfig/{gles11.pc => gles11.pc.in} | 2 +- pkgconfig/{gles20.pc => gles20.pc.in} | 2 +- pkgconfig/{glesv1.pc => glesv1.pc.in} | 2 +- pkgconfig/{glesv1_cm.pc => glesv1_cm.pc.in} | 2 +- pkgconfig/{glesv2.pc => glesv2.pc.in} | 2 +- 7 files changed, 20 insertions(+), 7 deletions(-) rename pkgconfig/{egl.pc => egl.pc.in} (72%) rename pkgconfig/{gles11.pc => gles11.pc.in} (88%) rename pkgconfig/{gles20.pc => gles20.pc.in} (87%) rename pkgconfig/{glesv1.pc => glesv1.pc.in} (87%) rename pkgconfig/{glesv1_cm.pc => glesv1_cm.pc.in} (87%) rename pkgconfig/{glesv2.pc => glesv2.pc.in} (87%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c1b233..9670c96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,13 +16,26 @@ SET(GLES2_VERSION "${GLES2_VERSION_MAJOR}.${GLES2_VERSION_MINOR}") SET(BUILD_ARCH "$ENV{RPM_ARCH}") IF(${BUILD_ARCH} MATCHES "aarch64") +SET(LIB "lib64") SET(LIBDIR "/usr/lib64") ELSEIF(${BUILD_ARCH} MATCHES "x86_64") +SET(LIB "lib64") SET(LIBDIR "/usr/lib64") ELSE(${BUILD_ARCH} MATCHES "aarch64") +SET(LIB "lib") SET(LIBDIR "/usr/lib") ENDIF(${BUILD_ARCH} MATCHES "aarch64") +################################################################# +# Build Package Config File +# ------------------------------ +CONFIGURE_FILE(pkgconfig/egl.pc.in pkgconfig/egl.pc @ONLY) +CONFIGURE_FILE(pkgconfig/gles11.pc.in pkgconfig/gles11.pc @ONLY) +CONFIGURE_FILE(pkgconfig/gles20.pc.in pkgconfig/gles20.pc @ONLY) +CONFIGURE_FILE(pkgconfig/glesv1_cm.pc.in pkgconfig/glesv1_cm.pc @ONLY) +CONFIGURE_FILE(pkgconfig/glesv1.pc.in pkgconfig/glesv1.pc @ONLY) +CONFIGURE_FILE(pkgconfig/glesv2.pc.in pkgconfig/glesv2.pc @ONLY) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include_KHR) ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") diff --git a/pkgconfig/egl.pc b/pkgconfig/egl.pc.in similarity index 72% rename from pkgconfig/egl.pc rename to pkgconfig/egl.pc.in index cb03cd6..d1c6369 100644 --- a/pkgconfig/egl.pc +++ b/pkgconfig/egl.pc.in @@ -1,7 +1,7 @@ prefix=/usr exec_prefix=${prefix} -libdir=/usr/lib -includedir=/usr/include +libdir=${exec_prefix}/@LIB@ +includedir=${prefix}/include Name: egl Description: CoreGL EGL library diff --git a/pkgconfig/gles11.pc b/pkgconfig/gles11.pc.in similarity index 88% rename from pkgconfig/gles11.pc rename to pkgconfig/gles11.pc.in index 1ddec10..842e471 100644 --- a/pkgconfig/gles11.pc +++ b/pkgconfig/gles11.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/lib +libdir={exec_prefix}/@LIB@ includedir=${prefix}/include Name: gles11 diff --git a/pkgconfig/gles20.pc b/pkgconfig/gles20.pc.in similarity index 87% rename from pkgconfig/gles20.pc rename to pkgconfig/gles20.pc.in index d1d7c14..4bd595b 100644 --- a/pkgconfig/gles20.pc +++ b/pkgconfig/gles20.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/lib +libdir=${exec_prefix}/@LIB@ includedir=${prefix}/include Name: gles20 diff --git a/pkgconfig/glesv1.pc b/pkgconfig/glesv1.pc.in similarity index 87% rename from pkgconfig/glesv1.pc rename to pkgconfig/glesv1.pc.in index e09cefd..2be4671 100644 --- a/pkgconfig/glesv1.pc +++ b/pkgconfig/glesv1.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/lib +libdir=${exec_prefix}/@LIB@ includedir=${prefix}/include Name: glesv1 diff --git a/pkgconfig/glesv1_cm.pc b/pkgconfig/glesv1_cm.pc.in similarity index 87% rename from pkgconfig/glesv1_cm.pc rename to pkgconfig/glesv1_cm.pc.in index 54d77f2..0beafaf 100644 --- a/pkgconfig/glesv1_cm.pc +++ b/pkgconfig/glesv1_cm.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/lib +libdir=${exec_prefix}/@LIB@ includedir=${prefix}/include Name: glesv1_cm diff --git a/pkgconfig/glesv2.pc b/pkgconfig/glesv2.pc.in similarity index 87% rename from pkgconfig/glesv2.pc rename to pkgconfig/glesv2.pc.in index 7e3cbaa..8273d13 100644 --- a/pkgconfig/glesv2.pc +++ b/pkgconfig/glesv2.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/lib +libdir=${exec_prefix}/@LIB@ includedir=${prefix}/include Name: glesv2 -- 2.7.4 From e10b3590be99bad4a58637e0b3c2e7fdf22ce620 Mon Sep 17 00:00:00 2001 From: "xing.huang" Date: Thu, 26 Nov 2015 15:02:29 +0800 Subject: [PATCH 10/16] 1.add fastpath APIs for OpenGLES_DDK 2.open macro to support GL_OES_EGL_image_external and GL_EXT_disjoint_timer_query 3.add support for the api which not needed by fastpath mode 4.egl extension call API through eglGetProcAddress Change-Id: I0c8084f21c7d3d840ef98d95b71842408ab89a2a --- include_KHR/GLES/glext.h | 2 + include_KHR/GLES2/gl2ext.h | 8 + src/coregl_export_gl.c | 29 +- src/headers/gl.h | 2 + src/headers/sym_gl.h | 160 +++- src/modules/fastpath/coregl_fastpath.c | 61 +- src/modules/fastpath/coregl_fastpath_gl.c | 1375 +++++++++++++++++++++++++++ src/modules/tracepath/coregl_tracepath.c | 17 +- src/modules/tracepath/coregl_tracepath_gl.c | 1342 +++++++++++++++++++++++++- src/wraps/coregl_gl.c | 47 + 10 files changed, 3003 insertions(+), 40 deletions(-) diff --git a/include_KHR/GLES/glext.h b/include_KHR/GLES/glext.h index 0373451..6d6f375 100644 --- a/include_KHR/GLES/glext.h +++ b/include_KHR/GLES/glext.h @@ -688,6 +688,7 @@ GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params); GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); +GL_API void GL_APIENTRY glMultiTexCoord4bOES (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q); GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); @@ -743,6 +744,7 @@ typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, c typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q); #endif /* GL_OES_framebuffer_object */ diff --git a/include_KHR/GLES2/gl2ext.h b/include_KHR/GLES2/gl2ext.h index e004151..bcd0a8f 100644 --- a/include_KHR/GLES2/gl2ext.h +++ b/include_KHR/GLES2/gl2ext.h @@ -140,7 +140,13 @@ typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuin typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); #ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glPopDebugGroup (void); +GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); @@ -152,6 +158,8 @@ GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); #endif #endif /* GL_KHR_debug */ diff --git a/src/coregl_export_gl.c b/src/coregl_export_gl.c index 6f84da3..c4c8dd7 100644 --- a/src/coregl_export_gl.c +++ b/src/coregl_export_gl.c @@ -1610,18 +1610,21 @@ coregl_api_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, co ovr_glProgramUniform1iv(program, location, count, value); } + void coregl_api_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) { ovr_glProgramUniform2iv(program, location, count, value); } + void coregl_api_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) { ovr_glProgramUniform3iv(program, location, count, value); } + void coregl_api_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) { @@ -1634,18 +1637,21 @@ coregl_api_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, co ovr_glProgramUniform1fv(program, location, count, value); } + void coregl_api_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { ovr_glProgramUniform2fv(program, location, count, value); } + void coregl_api_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { ovr_glProgramUniform3fv(program, location, count, value); } + void coregl_api_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { @@ -1658,12 +1664,14 @@ coregl_api_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei cou ovr_glProgramUniformMatrix2fv(program, location, count, transpose, value); } + void coregl_api_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3fv(program, location, count, transpose, value); } + void coregl_api_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { @@ -1676,42 +1684,49 @@ coregl_api_glProgramUniform1i(GLuint program, GLint location, GLint x) ovr_glProgramUniform1i(program, location, x); } + void coregl_api_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) { ovr_glProgramUniform2i(program, location, x, y); } + void coregl_api_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) { ovr_glProgramUniform3i(program, location, x, y, z); } + void coregl_api_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) { ovr_glProgramUniform4i(program, location, x, y, z, w); } + void coregl_api_glProgramUniform1f(GLuint program, GLint location, GLfloat x) { ovr_glProgramUniform1f(program, location, x); } + void coregl_api_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) { ovr_glProgramUniform2f(program, location, x, y); } + void coregl_api_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) { ovr_glProgramUniform3f(program, location, x, y, z); } + void coregl_api_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { @@ -1748,18 +1763,21 @@ coregl_api_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, c ovr_glProgramUniform1uiv(program, location, count, value); } + void coregl_api_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) { ovr_glProgramUniform2uiv(program, location, count, value); } + void coregl_api_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) { ovr_glProgramUniform3uiv(program, location, count, value); } + void coregl_api_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) { @@ -1884,4 +1902,13 @@ void coregl_api_glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) { ovr_glVertexBindingDivisor (bindingindex, divisor); -} \ No newline at end of file +} + +void +coregl_api_glGetPointerv(GLenum pname, GLvoid **params) +{ + ovr_glGetPointerv(pname, params); +} + + + diff --git a/src/headers/gl.h b/src/headers/gl.h index f995e08..ef2defa 100644 --- a/src/headers/gl.h +++ b/src/headers/gl.h @@ -25,7 +25,9 @@ typedef khronos_float_t GLclampf; typedef khronos_int32_t GLfixed; typedef khronos_intptr_t GLintptr; typedef khronos_ssize_t GLsizeiptr; +typedef khronos_int32_t GLclampx; +typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); /* OpenGL ES 3.0 */ typedef unsigned short GLhalf; diff --git a/src/headers/sym_gl.h b/src/headers/sym_gl.h index cac9801..2df8795 100644 --- a/src/headers/sym_gl.h +++ b/src/headers/sym_gl.h @@ -179,7 +179,99 @@ _COREGL_SYMBOL(void, glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfl _COREGL_SYMBOL(void, glVertexAttrib4fv, (GLuint index, const GLfloat* values)) _COREGL_SYMBOL(void, glVertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer)) _COREGL_SYMBOL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)) - +_COREGL_SYMBOL(void, glGetPointerv,(GLenum pname, GLvoid **params)) + +_COREGL_EXT_SYMBOL(void, glBindFramebufferOES, (GLenum target, GLuint framebuffer)) +_COREGL_EXT_SYMBOL(void, glBindRenderbufferOES, (GLenum target, GLuint renderbuffer)) +_COREGL_EXT_SYMBOL(void, glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers)) +_COREGL_EXT_SYMBOL(void, glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers)) +_COREGL_EXT_SYMBOL(void, glDepthRangefOES, (GLclampf zNear, GLclampf zFar)) +_COREGL_EXT_SYMBOL(void, glDepthRangexOES, (GLclampx zNear, GLclampx zFar)) +_COREGL_EXT_SYMBOL(void, glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) +_COREGL_EXT_SYMBOL(void, glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) +_COREGL_EXT_SYMBOL(void, glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers)) +_COREGL_EXT_SYMBOL(void, glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers)) +_COREGL_EXT_SYMBOL(void, glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params)) +_COREGL_EXT_SYMBOL(void, glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) +_COREGL_EXT_SYMBOL(GLboolean, glIsFramebufferOES, (GLuint framebuffer)) +_COREGL_EXT_SYMBOL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer)) +_COREGL_EXT_SYMBOL(void, glAlphaFuncxOES,(GLenum func, GLclampx ref)) +_COREGL_EXT_SYMBOL(void, glBlendBarrierKHR, (void)) +_COREGL_EXT_SYMBOL(void, glBlendEquationOES, (GLenum mode)) +_COREGL_EXT_SYMBOL(void, glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha)) +_COREGL_EXT_SYMBOL(void, glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) +_COREGL_EXT_SYMBOL(GLenum, glCheckFramebufferStatusOES, (GLenum target)) +_COREGL_EXT_SYMBOL(void, glClearColorxOES,(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)) +_COREGL_EXT_SYMBOL(void, glClearDepthfOES,(GLclampf depth)) +_COREGL_EXT_SYMBOL(void, glClearDepthxOES,(GLclampx depth)) +_COREGL_EXT_SYMBOL(void, glClipPlanefOES,(GLenum plane, GLfloat const *equation)) +_COREGL_EXT_SYMBOL(void, glClipPlanexOES,(GLenum plane, GLfixed const *equation)) +_COREGL_EXT_SYMBOL(void, glColor4xOES,(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)) +_COREGL_EXT_SYMBOL(void, glFogxOES,(GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glFogxvOES,(GLenum pname, GLfixed const *params)) +_COREGL_EXT_SYMBOL(void, glFrustumxOES,(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) +_COREGL_EXT_SYMBOL(void, glFrustumfOES,(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) +_COREGL_EXT_SYMBOL(void, glGenerateMipmapOES,(GLenum target)) +_COREGL_EXT_SYMBOL(void,glGetClipPlanefOES,(GLenum pname, GLfloat eqn[4])) +_COREGL_EXT_SYMBOL(void,glGetClipPlanexOES,(GLenum pname, GLfixed eqn[4])) +_COREGL_EXT_SYMBOL(GLuint,glGetDebugMessageLog,(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)) +_COREGL_EXT_SYMBOL(void,glGetObjectLabel,(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void,glGetObjectPtrLabel,(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void,glGetPointervKHR,(GLenum pname, GLvoid **params)) +_COREGL_EXT_SYMBOL(void, glDebugMessageCallback,(GLDEBUGPROCKHR callback, void const *userParam)) +_COREGL_EXT_SYMBOL(void, glDebugMessageControl,(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled)) +_COREGL_EXT_SYMBOL(void, glDebugMessageInsert,(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf)) +_COREGL_EXT_SYMBOL(void, glDebugMessageCallbackKHR,(GLDEBUGPROCKHR callback, void const *userParam)) +_COREGL_EXT_SYMBOL(void, glDebugMessageControlKHR,(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled)) +_COREGL_EXT_SYMBOL(void, glDebugMessageInsertKHR,(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf)) +_COREGL_EXT_SYMBOL(GLuint,glGetDebugMessageLogKHR,(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)) +_COREGL_EXT_SYMBOL(void,glGetObjectLabelKHR,(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void,glGetObjectPtrLabelKHR,(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void, glObjectLabelKHR, (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glObjectPtrLabelKHR, (const void *ptr, GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glPopDebugGroupKHR, (void)) +_COREGL_EXT_SYMBOL(void, glPushDebugGroupKHR, (GLenum source, GLuint id, GLsizei length, const GLchar *message)) +_COREGL_EXT_SYMBOL(void,glGetFixedvOES,(GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void,glGetLightxvOES,(GLenum light, GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void,glGetMaterialxvOES,(GLenum face, GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void,glGetRenderbufferParameterivOES,(GLenum target, GLenum pname, GLint *params)) +_COREGL_EXT_SYMBOL(void,glGetTexEnvxvOES,(GLenum env, GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void,glGetTexParameterxvOES,(GLenum target, GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glLightModelxOES, (GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glLightModelxvOES, (GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glLightxOES, (GLenum light, GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glLineWidthxOES, (GLfixed width)) +_COREGL_EXT_SYMBOL(void, glLoadMatrixxOES, (const GLfixed *m)) +_COREGL_EXT_SYMBOL(void, glMaterialxOES, (GLenum face, GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glMultMatrixxOES, (const GLfixed *m)) +_COREGL_EXT_SYMBOL(void, glMultiTexCoord4bOES, (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q)) +_COREGL_EXT_SYMBOL(void, glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)) +_COREGL_EXT_SYMBOL(void, glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz)) +_COREGL_EXT_SYMBOL(void, glObjectLabel, (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glObjectPtrLabel, (const void *ptr, GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) +_COREGL_EXT_SYMBOL(void, glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) +_COREGL_EXT_SYMBOL(void, glPointParameterxOES, (GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glPointParameterxvOES, (GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glPointSizexOES, (GLfixed size)) +_COREGL_EXT_SYMBOL(void, glPolygonOffsetxOES, (GLfixed factor, GLfixed units)) +_COREGL_EXT_SYMBOL(void, glPopDebugGroup, (void)) +_COREGL_EXT_SYMBOL(void, glPushDebugGroup, (GLenum source, GLuint id, GLsizei length, const GLchar *message)) +_COREGL_EXT_SYMBOL(void, glQueryCounterEXT, (GLuint id, GLenum target)) +_COREGL_EXT_SYMBOL(void, glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_EXT_SYMBOL(void, glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z)) +_COREGL_EXT_SYMBOL(void, glSampleCoveragexOES, (GLclampx value, GLboolean invert)) +_COREGL_EXT_SYMBOL(void, glScalexOES, (GLfixed x, GLfixed y, GLfixed z)) +_COREGL_EXT_SYMBOL(void, glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glTexStorage2DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_EXT_SYMBOL(void, glTexStorage3DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) +_COREGL_EXT_SYMBOL(void, glTexStorage3DMultisampleOES, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) +_COREGL_EXT_SYMBOL(void, glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z)) /* OpenGL ES 3.0 */ _COREGL_START_API(COREGL_GLAPI_3) _COREGL_SYMBOL(void, glReadBuffer, (GLenum mode)) @@ -365,7 +457,9 @@ _COREGL_END_API(COREGL_GLAPI_31) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_EGL_image", 1.1, -1) _COREGL_EXT_SYMBOL(void, glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image)) _COREGL_EXT_SYMBOL(void, glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image)) -//_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_EGL_image_external", 1.1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_EGL_image_external", 1.1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_surfaceless_context", 1.1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_fixed_point", 1.1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_get_program_binary", 2.0, -1) _COREGL_EXT_SYMBOL(void, glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)) @@ -408,6 +502,20 @@ _COREGL_EXT_SYMBOL(void, glProgramUniformMatrix4fvEXT, (GLuint program, GLint lo _COREGL_EXT_SYMBOL(void, glValidateProgramPipelineEXT, (GLuint pipeline)) _COREGL_EXT_SYMBOL(void, glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei *length, char *infoLog)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjecti64vEXT,(GLuint id, GLenum pname, GLint64 *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjectivEXT,(GLuint id, GLenum pname, GLint *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjectui64vEXT,(GLuint id, GLenum pname, GLuint64 *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint* params)) +_COREGL_EXT_SYMBOL(void, glGetQueryivEXT, (GLenum target, GLenum pname, GLint* params)) +_COREGL_EXT_SYMBOL(void, glBeginQueryEXT, (GLenum target, GLuint id)) +_COREGL_EXT_SYMBOL(void, glDeleteQueriesEXT, (GLsizei n, const GLuint* ids)) +_COREGL_EXT_SYMBOL(void, glGenQueriesEXT, (GLsizei n, GLuint* ids)) +_COREGL_EXT_SYMBOL(GLboolean, glIsQueryEXT, (GLuint id)) +_COREGL_EXT_SYMBOL(void, glEndQueryEXT, (GLenum target)) +_COREGL_EXT_SYMBOL(void, glBindVertexArrayOES,(GLuint array)) +_COREGL_EXT_SYMBOL(void, glDeleteVertexArraysOES,(GLsizei n, GLuint const *arrays)) +_COREGL_EXT_SYMBOL(GLboolean, glIsVertexArrayOES,(GLuint array)) +_COREGL_EXT_SYMBOL(void, glGenVertexArraysOES,(GLsizei n, GLuint *arrays)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_multisampled_render_to_texture", 2.0, -1) _COREGL_EXT_SYMBOL(void, glRenderbufferStorageMultisampleEXT, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) _COREGL_EXT_SYMBOL(void, glFramebufferTexture2DMultisampleEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)) @@ -416,25 +524,25 @@ _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_discard_framebuffer", 1.0, -1) _COREGL_EXT_SYMBOL(void, glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum* attachments)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_3D", 2.0, -1) -_COREGL_EXT_SYMBOL(void, glTexImage3DOES, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)) +_COREGL_EXT_SYMBOL(void, glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels)) _COREGL_EXT_SYMBOL(void, glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)) _COREGL_EXT_SYMBOL(void, glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _COREGL_EXT_SYMBOL(void, glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)) _COREGL_EXT_SYMBOL(void, glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)) -_COREGL_EXT_SYMBOL(void, glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) + _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_mapbuffer", 1.1, -1) _COREGL_EXT_SYMBOL(void, glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid** params)) -_COREGL_EXT_SYMBOL(void *, glMapBufferOES, (GLenum target, GLenum access)) +_COREGL_EXT_SYMBOL(void*, glMapBufferOES, (GLenum target, GLenum access)) _COREGL_EXT_SYMBOL(GLboolean, glUnmapBufferOES, (GLenum target)) - +/* _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_framebuffer_blit", 1.1, -1) _COREGL_EXT_SYMBOL(void, glBlitFramebufferANGLE, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_framebuffer_multisample", 1.1, -1) _COREGL_EXT_SYMBOL(void, glRenderbufferStorageMultisampleANGLE, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) - +*/ /* Fastpath Verified extensions */ @@ -534,6 +642,8 @@ _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_QCOM_tiled_rendering", 1.0, -1) _COREGL_EXT_SYMBOL_FASTPATH_PASS(glStartTilingQCOM) _COREGL_EXT_SYMBOL_FASTPATH_PASS(glEndTilingQCOM) +_COREGL_EXT_SYMBOL_FASTPATH_PASS(glGetTexLevelParameterfv) +_COREGL_EXT_SYMBOL_FASTPATH_PASS(glGetTexLevelParameteriv) /* Fastpath Blocked extensions */ @@ -547,24 +657,24 @@ _COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetnUniformivEXT) _COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glLabelObjectEXT) _COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetObjectLabelEXT) -//_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_disjoint_timer_query", 2.0, -1) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGenQueriesEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glDeleteQueriesEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glIsQueryEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glBeginQueryEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glEndQueryEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glQueryCounterEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryivEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjectivEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjectuivEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjecti64vEXT) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjectui64vEXT) - -//_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_vertex_array_object", 1.1, -1) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glBindVertexArrayOES) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glDeleteVertexArraysOES) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGenVertexArraysOES) -_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glIsVertexArrayOES) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_disjoint_timer_query", 2.0, -1) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGenQueriesEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glDeleteQueriesEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glIsQueryEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glBeginQueryEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glEndQueryEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glQueryCounterEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryivEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjectivEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjectuivEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjecti64vEXT) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGetQueryObjectui64vEXT) + +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_vertex_array_object", 1.1, -1) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glBindVertexArrayOES) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glDeleteVertexArraysOES) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glGenVertexArraysOES) +//_COREGL_EXT_SYMBOL_FASTPATH_BLOCK(glIsVertexArrayOES) //_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_QCOM_alpha_test", 2.0, -1) diff --git a/src/modules/fastpath/coregl_fastpath.c b/src/modules/fastpath/coregl_fastpath.c index b9842c9..0c61c31 100644 --- a/src/modules/fastpath/coregl_fastpath.c +++ b/src/modules/fastpath/coregl_fastpath.c @@ -417,15 +417,51 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix2fvEXT); COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix3fvEXT); COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix4fvEXT); - COREGL_OVERRIDE(fastpath_, glProgramParameteriEXT); - COREGL_OVERRIDE(fastpath_, glProgramParameteriEXT); - COREGL_OVERRIDE(fastpath_, glProgramParameteriEXT); - COREGL_OVERRIDE(fastpath_, glProgramParameteriEXT); - COREGL_OVERRIDE(fastpath_, glProgramParameteriEXT); COREGL_OVERRIDE(fastpath_, glFramebufferTexture2DMultisampleEXT); COREGL_OVERRIDE(fastpath_, glFramebufferTexture3DOES); + COREGL_OVERRIDE(fastpath_, glBindFramebufferOES); + COREGL_OVERRIDE(fastpath_, glBindRenderbufferOES); + COREGL_OVERRIDE(fastpath_, glClearBufferfi); + COREGL_OVERRIDE(fastpath_, glClearBufferfv); + COREGL_OVERRIDE(fastpath_, glClearBufferiv); + COREGL_OVERRIDE(fastpath_, glClearBufferuiv); + COREGL_OVERRIDE(fastpath_, glDeleteFramebuffersOES); + COREGL_OVERRIDE(fastpath_, glDeleteRenderbuffersOES); + COREGL_OVERRIDE(fastpath_, glDepthRangefOES); + COREGL_OVERRIDE(fastpath_, glDepthRangexOES); + COREGL_OVERRIDE(fastpath_, glFramebufferParameteri); + COREGL_OVERRIDE(fastpath_, glGetFramebufferParameteriv); + COREGL_OVERRIDE(fastpath_, glFramebufferRenderbufferOES); + COREGL_OVERRIDE(fastpath_, glFramebufferTexture2DOES); + COREGL_OVERRIDE(fastpath_, glGenFramebuffersOES); + COREGL_OVERRIDE(fastpath_, glGenRenderbuffersOES); + COREGL_OVERRIDE(fastpath_, glGetFramebufferAttachmentParameterivOES); + COREGL_OVERRIDE(fastpath_, glGetQueryObjecti64vEXT); + COREGL_OVERRIDE(fastpath_, glGetQueryObjectivEXT); + COREGL_OVERRIDE(fastpath_, glGetQueryObjectui64vEXT); + COREGL_OVERRIDE(fastpath_, glGetQueryObjectuivEXT); + COREGL_OVERRIDE(fastpath_, glGetQueryivEXT); + COREGL_OVERRIDE(fastpath_, glBeginQueryEXT); + COREGL_OVERRIDE(fastpath_, glDeleteQueriesEXT); + COREGL_OVERRIDE(fastpath_, glGenQueriesEXT); + COREGL_OVERRIDE(fastpath_, glIsFramebufferOES); + COREGL_OVERRIDE(fastpath_, glIsQueryEXT); + COREGL_OVERRIDE(fastpath_, glIsRenderbufferOES); + COREGL_OVERRIDE(fastpath_, glBlendEquationOES); + COREGL_OVERRIDE(fastpath_, glBlendEquationSeparateOES); + COREGL_OVERRIDE(fastpath_, glBlendFuncSeparateOES); + COREGL_OVERRIDE(fastpath_, glPolygonOffsetxOES); + COREGL_OVERRIDE(fastpath_, glLineWidthxOES); + COREGL_OVERRIDE(fastpath_, glSampleCoveragexOES); + COREGL_OVERRIDE(fastpath_, glQueryCounterEXT); + COREGL_OVERRIDE(fastpath_, glBindVertexArrayOES); + COREGL_OVERRIDE(fastpath_, glDeleteVertexArraysOES); + COREGL_OVERRIDE(fastpath_, glGenVertexArraysOES); + COREGL_OVERRIDE(fastpath_, glIsVertexArrayOES); + COREGL_OVERRIDE(fastpath_, glClearDepthfOES ); + COREGL_OVERRIDE(fastpath_, glClearDepthxOES ); /* Start overriding GLES 3.0 */ if(driver_gl_version >= COREGL_GLAPI_3) { COREGL_OVERRIDE(fastpath_, glReadBuffer); @@ -1701,18 +1737,27 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) { STATE_COMPARE(gl_framebuffer_binding_read[0]) { - CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_READ_FRAMEBUFFER, newctx->gl_framebuffer_binding_read[0])) + if(driver_gl_version >=2) + CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_READ_FRAMEBUFFER, newctx->gl_framebuffer_binding_read[0])) + else + CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_READ_FRAMEBUFFER, newctx->gl_framebuffer_binding_read[0])) } STATE_COMPARE(gl_framebuffer_binding_draw[0]) { - CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_DRAW_FRAMEBUFFER, newctx->gl_framebuffer_binding_draw[0])) + if(driver_gl_version >=2) + CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_DRAW_FRAMEBUFFER, newctx->gl_framebuffer_binding_draw[0])) + else + CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_DRAW_FRAMEBUFFER, newctx->gl_framebuffer_binding_draw[0])) } } else { STATE_COMPARE(gl_framebuffer_binding[0]) { - CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_FRAMEBUFFER, newctx->gl_framebuffer_binding[0])) + if(driver_gl_version >=2) + CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_FRAMEBUFFER, newctx->gl_framebuffer_binding[0])) + else + CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_FRAMEBUFFER, newctx->gl_framebuffer_binding[0])) } } STATE_COMPARE(gl_renderbuffer_binding[0]) diff --git a/src/modules/fastpath/coregl_fastpath_gl.c b/src/modules/fastpath/coregl_fastpath_gl.c index 172045e..0fe6928 100644 --- a/src/modules/fastpath/coregl_fastpath_gl.c +++ b/src/modules/fastpath/coregl_fastpath_gl.c @@ -7349,3 +7349,1378 @@ fastpath_glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) finish: _COREGL_FASTPATH_FUNC_END(); } +void +fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) + { + _set_gl_error(GL_OUT_OF_MEMORY); + goto finish; + } + + if (target == GL_FRAMEBUFFER) + { + if (current_ctx->gl_framebuffer_binding_read_used == 1) + { + CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) + { + if (real_obj == 0) + current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); + else + current_ctx->_bind_flag1 |= _BIND_FLAG1_BIT_gl_framebuffer_binding_read; + current_ctx->gl_framebuffer_binding_read[0] = real_obj; + } + } + CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) + { + if (real_obj == 0) + current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); + else + current_ctx->_bind_flag1 |= _BIND_FLAG1_BIT_gl_framebuffer_binding_draw; + current_ctx->gl_framebuffer_binding_draw[0] = real_obj; + } + } + } + else + { + CURR_STATE_COMPARE(gl_framebuffer_binding, real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) + { + if (real_obj == 0) + current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding); + else + current_ctx->_bind_flag1 |= _BIND_FLAG1_BIT_gl_framebuffer_binding; + current_ctx->gl_framebuffer_binding[0] = real_obj; + } + } + } + } + else if (target == GL_READ_FRAMEBUFFER && current_ctx->gl_framebuffer_binding_read_used) + { + CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) + { + if (real_obj == 0) + current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); + else + current_ctx->_bind_flag1 |= _BIND_FLAG1_BIT_gl_framebuffer_binding_read; + current_ctx->gl_framebuffer_binding_read[0] = real_obj; + } + } + } + else if (target == GL_DRAW_FRAMEBUFFER && current_ctx->gl_framebuffer_binding_draw_used) + { + CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) + { + if (real_obj == 0) + current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); + else + current_ctx->_bind_flag1 |= _BIND_FLAG1_BIT_gl_framebuffer_binding_draw; + current_ctx->gl_framebuffer_binding_draw[0] = real_obj; + } + } + } + else + { + _set_gl_error(GL_INVALID_ENUM); + goto finish; + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) + { + _set_gl_error(GL_OUT_OF_MEMORY); + goto finish; + } + + if (target == GL_RENDERBUFFER) + { + CURR_STATE_COMPARE(gl_renderbuffer_binding, real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindRenderbufferOES(target, real_obj)) + { + if (real_obj == 0) + current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_renderbuffer_binding); + else + current_ctx->_bind_flag1 |= _BIND_FLAG1_BIT_gl_renderbuffer_binding; + current_ctx->gl_renderbuffer_binding[0] = real_obj; + } + } + } + else + { + _set_gl_error(GL_INVALID_ENUM); + goto finish; + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) + { + goto finish; + } + + _orig_fastpath_glClearBufferfi(real_obj, drawbuffer, depth, stencil); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glClearBufferfv(GLenum buffer, GLint drawbuffer, GLfloat const *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) + { + goto finish; + } + + _orig_fastpath_glClearBufferfv(buffer, drawbuffer, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glClearBufferiv(GLenum buffer, GLint drawbuffer, GLint const *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) + { + goto finish; + } + + _orig_fastpath_glClearBufferiv(buffer, drawbuffer, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glClearBufferuiv(GLenum buffer, GLint drawbuffer, GLuint const *value) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) + { + goto finish; + } + + _orig_fastpath_glClearBufferuiv(buffer, drawbuffer, value); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (framebuffers == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + { + int real_n = 0; + + for (i = 0; i < n; i++) + { + int real_objid = _COREGL_INT_INIT_VALUE; + if (framebuffers[i] == 0) continue; + + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]); + if (real_objid == 0) continue; + + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]) == 1); + objid_array[real_n++] = real_objid; + } + + IF_GL_SUCCESS(_orig_fastpath_glDeleteFramebuffersOES(real_n, objid_array)) + { + for (i = 0; i < real_n; i++) + { + General_Trace_List *current = NULL; + current = current_ctx->ostate.shared->using_gctxs; + + while (current != NULL) + { + GLGlueContext *cur_gctx = (GLGlueContext *)current->value; + + if (cur_gctx->gl_framebuffer_binding[0] == objid_array[i]) + { + cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding); + cur_gctx->gl_framebuffer_binding[0] = 0; + } + if (cur_gctx->gl_framebuffer_binding_read[0] == objid_array[i]) + { + cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); + cur_gctx->gl_framebuffer_binding_read[0] = 0; + } + if (cur_gctx->gl_framebuffer_binding_draw[0] == objid_array[i]) + { + cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); + cur_gctx->gl_framebuffer_binding_draw[0] = 0; + } + + current = current->next; + } + } + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (renderbuffers == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + { + int real_n = 0; + + for (i = 0; i < n; i++) + { + int real_objid = _COREGL_INT_INIT_VALUE; + if (renderbuffers[i] == 0) continue; + + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]); + if (real_objid == 0) continue; + + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]) == 1); + objid_array[real_n++] = real_objid; + } + + IF_GL_SUCCESS(_orig_fastpath_glDeleteRenderbuffersOES(real_n, objid_array)) + { + for (i = 0; i < real_n; i++) + { + General_Trace_List *current = NULL; + current = current_ctx->ostate.shared->using_gctxs; + + while (current != NULL) + { + GLGlueContext *cur_gctx = (GLGlueContext *)current->value; + + if (cur_gctx->gl_renderbuffer_binding[0] == objid_array[i]) + { + cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_renderbuffer_binding); + cur_gctx->gl_renderbuffer_binding[0] = 0; + } + + current = current->next; + } + } + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDepthRangefOES(GLclampf zNear, GLclampf zFar) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((current_ctx->gl_depth_range[0] != zNear) || + (current_ctx->gl_depth_range[1] != zFar)) + { + IF_GL_SUCCESS(_orig_fastpath_glDepthRangefOES(zNear, zFar)) + { + current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_range; + current_ctx->gl_depth_range[0] = zNear; + current_ctx->gl_depth_range[1] = zFar; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDepthRangexOES(GLclampx zNear, GLclampx zFar) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((current_ctx->gl_depth_range[0] != zNear) || + (current_ctx->gl_depth_range[1] != zFar)) + { + IF_GL_SUCCESS(_orig_fastpath_glDepthRangexOES(zNear, zFar)) + { + current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_range; + current_ctx->gl_depth_range[0] = zNear; + current_ctx->gl_depth_range[1] = zFar; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) +{ + GLint real_obj = 0, fa_type = 0; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + switch (pname) + { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + param = 0; + _orig_fastpath_glFramebufferParameteri(target, pname, real_obj); + _orig_fastpath_glFramebufferParameteri(target, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, fa_type); + switch (fa_type) + { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)¶m) != 1) + { + param = 0; + goto finish; + } + break; + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)¶m) != 1) + { + param = 0; + goto finish; + } + break; + } + break; + default: + _orig_fastpath_glFramebufferParameteri(target, pname, param); + break; + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params) +{ + GLint real_obj = 0, fa_type = 0;; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + switch (pname) + { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + params[0] = 0; + _orig_fastpath_glGetFramebufferParameteriv(target, pname, &real_obj); + _orig_fastpath_glGetFramebufferParameteriv(target, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); + switch (fa_type) + { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) + { + params[0] = 0; + goto finish; + } + break; + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)params) != 1) + { + params[0] = 0; + goto finish; + } + break; + } + break; + default: + _orig_fastpath_glGetFramebufferParameteriv(target, pname, params); + break; + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) + { + _set_gl_error(GL_OUT_OF_MEMORY); + goto finish; + } + + _orig_fastpath_glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) + { + _set_gl_error(GL_OUT_OF_MEMORY); + goto finish; + } + + _orig_fastpath_glFramebufferTexture2DOES(target, attachment, textarget, real_obj, level); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (framebuffers == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + + IF_GL_SUCCESS(_orig_fastpath_glGenFramebuffersOES(n, objid_array)) + { + for (i = 0; i < n; i++) + { + framebuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, objid_array[i]); + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (renderbuffers == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + + IF_GL_SUCCESS(_orig_fastpath_glGenRenderbuffersOES(n, objid_array)) + { + for (i = 0; i < n; i++) + { + renderbuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, objid_array[i]); + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint *params) +{ + GLint real_obj, fa_type; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + switch (pname) + { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + params[0] = 0; + _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, pname, &real_obj); + _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); + switch (fa_type) + { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) + { + params[0] = 0; + goto finish; + } + break; + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)params) != 1) + { + params[0] = 0; + goto finish; + } + break; + } + break; + default: + _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params); + break; + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + _orig_fastpath_glGetQueryObjecti64vEXT(real_obj, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + _orig_fastpath_glGetQueryObjectivEXT(real_obj, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + _orig_fastpath_glGetQueryObjectui64vEXT(real_obj, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + _orig_fastpath_glGetQueryObjectuivEXT(real_obj, pname, params); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) +{ + GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + _orig_fastpath_glGetQueryivEXT(target, pname, params); + + switch (pname) + { + case GL_CURRENT_QUERY: + if (params[0] != 0) + { + AST(GET_GLUE_OBJ(GL_OBJECT_TYPE_QUERY, params[0], &glue_obj_id) == 1); + params[0] = glue_obj_id; + } + break; + } + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glBeginQueryEXT(GLenum target, GLuint id) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + // TODO : Begin - Context Switch + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + _orig_fastpath_glBeginQueryEXT(target, real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (ids == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + { + int real_n = 0; + + for (i = 0; i < n; i++) + { + int real_objid = _COREGL_INT_INIT_VALUE; + if (ids[i] == 0) continue; + + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, ids[i]); + if (real_objid == 0) continue; + + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, ids[i]) == 1); + objid_array[real_n++] = real_objid; + } + + _orig_fastpath_glDeleteQueriesEXT(real_n, objid_array); + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGenQueriesEXT(GLsizei n, GLuint* ids) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (ids == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + + IF_GL_SUCCESS(_orig_fastpath_glGenQueriesEXT(n, objid_array)) + { + for (i = 0; i < n; i++) + { + ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, objid_array[i]); + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +GLboolean +fastpath_glIsFramebufferOES(GLuint framebuffer) +{ + GLboolean ret = GL_FALSE; + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) + { + ret = GL_FALSE; + goto finish; + } + + ret = _orig_fastpath_glIsFramebufferOES(real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +GLboolean +fastpath_glIsQueryEXT(GLuint id) +{ + GLboolean ret = GL_FALSE; + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + ret = GL_FALSE; + goto finish; + } + + ret = _orig_fastpath_glIsQueryEXT(real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +GLboolean +fastpath_glIsRenderbufferOES(GLuint renderbuffer) +{ + GLboolean ret = GL_FALSE; + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) + { + ret = GL_FALSE; + goto finish; + } + + ret = _orig_fastpath_glIsRenderbufferOES(real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + +void +fastpath_glBlendEquationOES(GLenum mode) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + IF_GL_SUCCESS(_orig_fastpath_glBlendEquationOES(mode)) + { + current_ctx->_blend_flag |= + _BLEND_FLAG_BIT_gl_blend_equation_rgb | + _BLEND_FLAG_BIT_gl_blend_equation_alpha; + + _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint*) & (current_ctx->gl_blend_equation_rgb)); + _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint*) & (current_ctx->gl_blend_equation_alpha)); + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((current_ctx->gl_blend_equation_rgb[0] != modeRGB) || + (current_ctx->gl_blend_equation_alpha[0] != modeAlpha)) + { + IF_GL_SUCCESS(_orig_fastpath_glBlendEquationSeparateOES(modeRGB, modeAlpha)) + { + current_ctx->_blend_flag |= + _BLEND_FLAG_BIT_gl_blend_equation_rgb | + _BLEND_FLAG_BIT_gl_blend_equation_alpha; + + current_ctx->gl_blend_equation_rgb[0] = modeRGB; + current_ctx->gl_blend_equation_alpha[0] = modeAlpha; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((current_ctx->gl_blend_src_rgb[0] != srcRGB) || + (current_ctx->gl_blend_dst_rgb[0] != dstRGB) || + (current_ctx->gl_blend_src_alpha[0] != srcAlpha) || + (current_ctx->gl_blend_dst_alpha[0] != dstAlpha)) + { + IF_GL_SUCCESS(_orig_fastpath_glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha)) + { + current_ctx->_blend_flag |= + _BLEND_FLAG_BIT_gl_blend_src_rgb | + _BLEND_FLAG_BIT_gl_blend_src_alpha | + _BLEND_FLAG_BIT_gl_blend_dst_rgb | + _BLEND_FLAG_BIT_gl_blend_dst_alpha; + + current_ctx->gl_blend_src_rgb[0] = srcRGB; + current_ctx->gl_blend_dst_rgb[0] = dstRGB; + current_ctx->gl_blend_src_alpha[0] = srcAlpha; + current_ctx->gl_blend_dst_alpha[0] = dstAlpha; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glPolygonOffsetxOES(GLfixed factor, GLfixed units) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((current_ctx->gl_polygon_offset_factor[0] != factor) || + (current_ctx->gl_polygon_offset_units[0] != units)) + { + IF_GL_SUCCESS(_orig_fastpath_glPolygonOffsetxOES(factor, units)) + { + current_ctx->_misc_flag1 |= + _MISC_FLAG1_BIT_gl_polygon_offset_factor | + _MISC_FLAG1_BIT_gl_polygon_offset_units; + + current_ctx->gl_polygon_offset_factor[0] = factor; + current_ctx->gl_polygon_offset_units[0] = units; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glLineWidthxOES(GLfixed width) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + CURR_STATE_COMPARE(gl_line_width, width) + { + IF_GL_SUCCESS(_orig_fastpath_glLineWidthxOES(width)) + { + current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_line_width; + current_ctx->gl_line_width[0] = width; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glSampleCoveragexOES(GLclampx value, GLboolean invert) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if ((current_ctx->gl_sample_coverage_value[0] != value) || + (current_ctx->gl_sample_coverage_invert[0] != invert)) + { + IF_GL_SUCCESS(_orig_fastpath_glSampleCoveragexOES(value, invert)) + { + current_ctx->_misc_flag1 |= + _MISC_FLAG1_BIT_gl_sample_coverage_value | + _MISC_FLAG1_BIT_gl_sample_coverage_invert; + + current_ctx->gl_sample_coverage_value[0] = value; + current_ctx->gl_sample_coverage_invert[0] = invert; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glQueryCounterEXT(GLuint id, GLenum target) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) + { + // TODO : Begin - Context Switch + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + + _orig_fastpath_glQueryCounterEXT(real_obj,target); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glGenVertexArraysOES(GLsizei n, GLuint* arrays) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (arrays == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + + IF_GL_SUCCESS(_orig_fastpath_glGenVertexArraysOES(n, objid_array)) + { + for (i = 0; i < n; i++) + { + arrays[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, objid_array[i]); + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + + +void +fastpath_glBindVertexArrayOES(GLuint array) +{ + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) + { + _set_gl_error(GL_INVALID_OPERATION); + goto finish; + } + if (current_ctx->gl_vertex_array_binding[0] != real_obj) + { + IF_GL_SUCCESS(_orig_fastpath_glBindVertexArrayOES(real_obj)) + { + current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_vertex_array_binding; + current_ctx->gl_vertex_array_binding[0] = real_obj; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + + +GLboolean +fastpath_glIsVertexArrayOES(GLuint array) +{ + GLboolean ret = GL_FALSE; + GLuint real_obj; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) + { + ret = GL_FALSE; + goto finish; + } + + ret = _orig_fastpath_glIsVertexArrayOES(real_obj); + + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; +} + + +void +fastpath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) +{ + int i; + GLuint *objid_array = NULL; + + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + if (n < 0) + { + _set_gl_error(GL_INVALID_VALUE); + goto finish; + } + if (n == 0) goto finish; + if (arrays == NULL) goto finish; + + AST(current_ctx->ostate.shared != NULL); + + objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); + { + int real_n = 0; + + for (i = 0; i < n; i++) + { + int real_objid = _COREGL_INT_INIT_VALUE; + if (arrays[i] == 0) continue; + + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]); + if (real_objid == 0) continue; + + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]) == 1); + objid_array[real_n++] = real_objid; + } + + IF_GL_SUCCESS(_orig_fastpath_glDeleteVertexArraysOES(real_n, objid_array)) + { + for (i = 0; i < real_n; i++) + { + General_Trace_List *current = NULL; + current = current_ctx->ostate.shared->using_gctxs; + + while (current != NULL) + { + GLGlueContext *cur_gctx = (GLGlueContext *)current->value; + + if (cur_gctx->gl_vertex_array_binding[0] == objid_array[i]) + cur_gctx->gl_vertex_array_binding[0] = 0; + + current = current->next; + } + } + } + } + + goto finish; + +finish: + if (objid_array != NULL) + { + free(objid_array); + objid_array = NULL; + } + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glClearDepthfOES(GLclampf depth) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + CURR_STATE_COMPARE(gl_depth_clear_value, depth) + { + IF_GL_SUCCESS(_orig_fastpath_glClearDepthfOES(depth)) + { + current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_clear_value; + current_ctx->gl_depth_clear_value[0] = depth; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} + +void +fastpath_glClearDepthxOES(GLclampx depth) +{ + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); + + CURR_STATE_COMPARE(gl_depth_clear_value, depth) + { + IF_GL_SUCCESS(_orig_fastpath_glClearDepthxOES(depth)) + { + current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_clear_value; + current_ctx->gl_depth_clear_value[0] = depth; + } + } + goto finish; + +finish: + _COREGL_FASTPATH_FUNC_END(); +} diff --git a/src/modules/tracepath/coregl_tracepath.c b/src/modules/tracepath/coregl_tracepath.c index 6b2125e..563088b 100644 --- a/src/modules/tracepath/coregl_tracepath.c +++ b/src/modules/tracepath/coregl_tracepath.c @@ -1184,6 +1184,7 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd png_struct *png = NULL; png_info *info = NULL; png_byte **rows = NULL; + GLenum ret_value = _COREGL_INT_INIT_VALUE; if (!png_lib_handle) { @@ -1308,7 +1309,11 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb); _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, sdata->fbo); - if (_orig_tracepath_glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE) + if(driver_gl_version >=2) + ret_value = _orig_tracepath_glCheckFramebufferStatus(GL_FRAMEBUFFER); + else + ret_value = _orig_tracepath_glCheckFramebufferStatusOES(GL_FRAMEBUFFER); + if (ret_value == GL_FRAMEBUFFER_COMPLETE) { _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, oldfb); width = sdata->tex_w; @@ -1348,10 +1353,16 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, sdata->fbo); int atttype = _COREGL_INT_INIT_VALUE; - _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); + if(driver_gl_version >=2) + _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); + else + _orig_tracepath_glGetFramebufferAttachmentParameterivOES(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); AST(atttype != sdata->tex); int attname = _COREGL_INT_INIT_VALUE; - _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); + if(driver_gl_version >=2) + _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); + else + _orig_tracepath_glGetFramebufferAttachmentParameterivOES(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); switch (atttype) { case GL_TEXTURE: diff --git a/src/modules/tracepath/coregl_tracepath_gl.c b/src/modules/tracepath/coregl_tracepath_gl.c index 8b9b0c8..cffb3c2 100644 --- a/src/modules/tracepath/coregl_tracepath_gl.c +++ b/src/modules/tracepath/coregl_tracepath_gl.c @@ -2370,7 +2370,7 @@ finish: } void -tracepath_glTexImage3DOES(GLenum target, GLint level, GLint GLinternalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) +tracepath_glTexImage3DOES(GLenum target, GLint level, GLenum GLinternalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glTexImage3DOES(target, level, GLinternalFormat, width, height, depth, border, format, type, pixels); @@ -4350,7 +4350,7 @@ tracepath_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum tex finish: _COREGL_TRACEPATH_FUNC_END(); } - +/* void tracepath_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { @@ -4454,6 +4454,7 @@ finish: } #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO } +*/ void @@ -5324,4 +5325,1339 @@ void tracepath_glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) finish: _COREGL_TRACEPATH_FUNC_END(); -} \ No newline at end of file +} +void +tracepath_glBindFramebufferOES(GLenum target, GLuint framebuffer) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + if (unlikely(trace_surface_flag == 1)) + { + GLint oldfb; + _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb); + if (oldfb != 0) + { + _COREGL_TRACE_SURFACE(0, 2, "GLBINDFBO"); + } + + tracepath_fbdump_update(0); + } +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + _orig_tracepath_glBindFramebufferOES(target, framebuffer); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + if (unlikely(trace_surface_flag == 1)) + { + tracepath_fbdump_update(1); + } +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBindRenderbufferOES(target, renderbuffer); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(0); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + _orig_tracepath_glDeleteFramebuffersOES(n, framebuffers); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(1); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(0); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + _orig_tracepath_glDeleteRenderbuffersOES(n, renderbuffers); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(1); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +#ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO + if (trace_mem_flag == 1) + { + MY_MODULE_TSTATE *tstate = NULL; + + GET_MY_TSTATE(tstate, get_current_thread_state()); + AST(tstate != NULL); + if (tstate->ctx != NULL) + { + for (int i = 0; i < n; i++) + { + if (renderbuffers[i] == 0) continue; + _remove_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], "Renderbuffer"); + } + } + } +#endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO +} + +void +tracepath_glDepthRangefOES(GLclampf zNear, GLclampf zFar) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDepthRangefOES(zNear, zFar); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDepthRangexOES(GLclampx zNear, GLclampx zFar) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDepthRangexOES(zNear, zFar); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(0); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + _orig_tracepath_glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(1); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(0); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + _orig_tracepath_glFramebufferTexture2DOES(target, attachment, textarget, texture, level); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO + tracepath_fbdump_update(1); +#endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGenFramebuffersOES(n, framebuffers); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGenRenderbuffersOES(n, renderbuffers); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +#ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO + if (trace_mem_flag == 1) + { + MY_MODULE_TSTATE *tstate = NULL; + + GET_MY_TSTATE(tstate, get_current_thread_state()); + AST(tstate != NULL); + if (tstate->ctx != NULL) + { + for (int i = 0; i < n; i++) + { + if (renderbuffers[i] == 0) continue; + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], "Renderbuffer", 0, 0, 0, "Unknown"); + } + } + } +#endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO +} + +void +tracepath_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetQueryObjecti64vEXT(id, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetQueryObjectivEXT(id, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetQueryObjectui64vEXT(id, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetQueryObjectuivEXT(id, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetQueryivEXT(target, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glBeginQueryEXT(GLenum target, GLuint id) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBeginQueryEXT(target, id); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void +tracepath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDeleteQueriesEXT(n, ids); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGenQueriesEXT(GLsizei n, GLuint* ids) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGenQueriesEXT(n, ids); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLboolean +tracepath_glIsFramebufferOES(GLuint framebuffer) +{ + GLboolean ret = GL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glIsFramebufferOES(framebuffer); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +GLboolean +tracepath_glIsQueryEXT(GLuint id) +{ + GLboolean ret = GL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glIsQueryEXT(id); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +GLboolean +tracepath_glIsRenderbufferOES(GLuint renderbuffer) +{ + GLboolean ret; + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glIsRenderbufferOES(renderbuffer); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void +tracepath_glEndQueryEXT(GLenum target) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glEndQueryEXT(target); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glAlphaFuncxOES(GLenum func, GLclampx ref) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glAlphaFuncxOES(func, ref); + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glBlendBarrierKHR() +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBlendBarrierKHR(); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glBlendEquationOES(GLenum mode) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBlendEquationOES(mode); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBlendEquationSeparateOES(modeRGB, modeAlpha); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLenum tracepath_glCheckFramebufferStatusOES(GLenum target) +{ + GLenum ret = _COREGL_INT_INIT_VALUE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glCheckFramebufferStatusOES(target); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + + +void tracepath_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glClearColorxOES(red, green, blue, alpha); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glClearDepthfOES(GLclampf depth) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glClearDepthfOES(depth); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glClearDepthxOES(GLclampx depth) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glClearDepthxOES(depth); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glClipPlanefOES(GLenum plane, GLfloat const *equation) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glClipPlanefOES(plane, equation); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void tracepath_glClipPlanexOES(GLenum plane, GLfixed const *equation) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glClipPlanexOES(plane, equation); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glColor4xOES(red, green, blue, alpha); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glDebugMessageCallback(GLDEBUGPROCKHR callback, void const *userParam) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDebugMessageCallback(callback, userParam); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDebugMessageInsert(source, type, id, severity, length, buf); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDebugMessageControl(source, type, severity, count, ids, enabled); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glFogxOES(GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glFogxOES(pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glFogxvOES(GLenum pname, GLfixed const *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glFogxvOES(pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glFrustumxOES(left, right, bottom, top, zNear, zFar); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glFrustumfOES(left, right, bottom, top, zNear, zFar); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGenerateMipmapOES(GLenum target) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGenerateMipmapOES(target); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetClipPlanefOES(pname, eqn); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetClipPlanexOES(pname, eqn); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLuint tracepath_glGetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) +{ + GLuint ret = GL_INVALID_INDEX; + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog); + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void tracepath_glGetFixedvOES(GLenum pname, GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetFixedvOES(pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetLightxvOES(light, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetMaterialxvOES(face, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetObjectLabel(identifier, name, bufSize, length, label); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetObjectPtrLabel(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetObjectPtrLabel(ptr, bufSize, length, label); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetPointervKHR(GLenum pname, GLvoid **params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetPointervKHR(pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetRenderbufferParameterivOES(target, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetTexEnvxvOES(env, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetTexParameterxvOES(target, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void +tracepath_glLightModelxOES (GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glLightModelxOES (pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void +tracepath_glLightModelxvOES (GLenum pname, const GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glLightModelxvOES (pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void +tracepath_glLightxOES (GLenum light, GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glLightxOES (light, pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void +tracepath_glLightxvOES (GLenum light, GLenum pname, const GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glLightxvOES (light, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glLineWidthxOES (GLfixed width) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glLineWidthxOES (width); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glLoadMatrixxOES (const GLfixed *m) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glLoadMatrixxOES (m); + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glMaterialxOES (GLenum face, GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMaterialxOES (face, pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMaterialxvOES (face, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glMultMatrixxOES (const GLfixed *m) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMultMatrixxOES (m); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glMultiTexCoord4bOES (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMultiTexCoord4bOES (target, s, t, r, q); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glMultiTexCoord4xOES (target, s, t, r, q); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glNormal3xOES (nx, ny, nz); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glObjectLabel (identifier, name, length, label); + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glObjectPtrLabel (ptr, length, label); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glOrthofOES (left, right, bottom, top, zNear, zFar); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glOrthoxOES (left, right, bottom, top, zNear, zFar); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPointParameterxOES (GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPointParameterxOES (pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPointParameterxvOES (GLenum pname, const GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPointParameterxvOES (pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPointSizexOES (GLfixed size) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPointSizexOES (size); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPolygonOffsetxOES (GLfixed factor, GLfixed units) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPolygonOffsetxOES (factor, units); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPopDebugGroup (void) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPopDebugGroup (); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPushDebugGroup (source, id, length, message); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glQueryCounterEXT (GLuint id, GLenum target) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glQueryCounterEXT (id, target); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glRenderbufferStorageOES (target, internalformat, width, height); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glRotatexOES (angle, x, y, z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glSampleCoveragexOES (GLclampx value, GLboolean invert) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glSampleCoveragexOES (value, invert); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glScalexOES (GLfixed x, GLfixed y, GLfixed z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glScalexOES (x, y, z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexEnvxOES (GLenum target, GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexEnvxOES (target, pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexEnvxvOES (target, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexParameterxOES (GLenum target, GLenum pname, GLfixed param) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexParameterxOES (target, pname, param); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexParameterxvOES (target, pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexStorage2DEXT (target, levels, internalformat, width, height); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexStorage3DEXT (target, levels, internalformat, width, height, depth); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTexStorage3DMultisampleOES (target, samples, internalformat, width, height, depth, fixedsamplelocations); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glTranslatexOES (GLfixed x, GLfixed y, GLfixed z) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glTranslatexOES (x, y, z); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glBindVertexArrayOES(GLuint array) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glBindVertexArrayOES(array); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDeleteVertexArraysOES(n, arrays); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGenVertexArraysOES(GLsizei n, GLuint* arrays) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGenVertexArraysOES(n, arrays); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLboolean +tracepath_glIsVertexArrayOES(GLuint array) +{ + GLboolean ret = GL_FALSE; + + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glIsVertexArrayOES(array); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void tracepath_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, void const *userParam) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDebugMessageCallbackKHR(callback, userParam); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + + +void tracepath_glDebugMessageControlKHR(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDebugMessageControlKHR(source, type, severity, count, ids, enabled); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glDebugMessageInsertKHR(source, type, id, severity, length, buf); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +GLuint tracepath_glGetDebugMessageLogKHR(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) +{ + GLuint ret = GL_INVALID_INDEX; + _COREGL_TRACEPATH_FUNC_BEGIN(); + ret = _orig_tracepath_glGetDebugMessageLogKHR(count, bufsize, sources, types, ids, severities, lengths, messageLog); + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); + return ret; +} + +void tracepath_glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetObjectLabelKHR(identifier, name, bufSize, length, label); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void tracepath_glGetObjectPtrLabelKHR(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetObjectPtrLabelKHR(ptr, bufSize, length, label); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glGetPointerv(GLenum pname, GLvoid **params) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glGetPointerv(pname, params); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glObjectLabelKHR (identifier, name, length, label); + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glObjectPtrLabelKHR (ptr, length, label); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPopDebugGroupKHR (void) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPopDebugGroupKHR (); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + +void +tracepath_glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message) +{ + _COREGL_TRACEPATH_FUNC_BEGIN(); + _orig_tracepath_glPushDebugGroupKHR (source, id, length, message); + + goto finish; + +finish: + _COREGL_TRACEPATH_FUNC_END(); +} + diff --git a/src/wraps/coregl_gl.c b/src/wraps/coregl_gl.c index 365601a..957fa56 100644 --- a/src/wraps/coregl_gl.c +++ b/src/wraps/coregl_gl.c @@ -1663,42 +1663,50 @@ glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint * ovr_glProgramUniform1iv(program, location, count, value); } + void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) { ovr_glProgramUniform2iv(program, location, count, value); } + void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) { ovr_glProgramUniform3iv(program, location, count, value); } + void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) { ovr_glProgramUniform4iv(program, location, count, value); } + + void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { ovr_glProgramUniform1fv(program, location, count, value); } + void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { ovr_glProgramUniform2fv(program, location, count, value); } + void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { ovr_glProgramUniform3fv(program, location, count, value); } + void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) { @@ -1711,12 +1719,14 @@ glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboole ovr_glProgramUniformMatrix2fv(program, location, count, transpose, value); } + void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3fv(program, location, count, transpose, value); } + void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { @@ -1729,42 +1739,49 @@ glProgramUniform1i(GLuint program, GLint location, GLint x) ovr_glProgramUniform1i(program, location, x); } + void glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) { ovr_glProgramUniform2i(program, location, x, y); } + void glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) { ovr_glProgramUniform3i(program, location, x, y, z); } + void glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) { ovr_glProgramUniform4i(program, location, x, y, z, w); } + void glProgramUniform1f(GLuint program, GLint location, GLfloat x) { ovr_glProgramUniform1f(program, location, x); } + void glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) { ovr_glProgramUniform2f(program, location, x, y); } + void glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) { ovr_glProgramUniform3f(program, location, x, y, z); } + void glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { @@ -1777,18 +1794,21 @@ glProgramUniform1ui(GLuint program, GLint location, GLuint x) ovr_glProgramUniform1ui(program, location, x); } + void glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) { ovr_glProgramUniform2ui(program, location, x, y); } + void glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) { ovr_glProgramUniform3ui(program, location, x, y, z); } + void glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) { @@ -1801,6 +1821,7 @@ glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint ovr_glProgramUniform1uiv(program, location, count, value); } + void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) { @@ -1825,12 +1846,14 @@ glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboo ovr_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); } + void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); } + void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { @@ -1843,98 +1866,122 @@ glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboo ovr_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); } + void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); } + void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); } + void glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) { ovr_glBindImageTexture (unit, texture, level, layered, layer, access, format); } + void glGetBooleani_v (GLenum target, GLuint index, GLboolean *data) { ovr_glGetBooleani_v (target, index, data); } + void glMemoryBarrier (GLbitfield barriers) { ovr_glMemoryBarrier (barriers); } + void glMemoryBarrierByRegion (GLbitfield barriers) { ovr_glMemoryBarrierByRegion (barriers); } + void glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); } + void glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val) { ovr_glGetMultisamplefv (pname, index, val); } + void glSampleMaski (GLuint maskNumber, GLbitfield mask) { ovr_glSampleMaski (maskNumber, mask); } + void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) { ovr_glGetTexLevelParameteriv (target, level, pname, params); } + void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) { ovr_glGetTexLevelParameterfv (target, level, pname, params); } + void glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { ovr_glBindVertexBuffer (bindingindex, buffer, offset, stride); } + void glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { ovr_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); } + void glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { ovr_glVertexAttribIFormat (attribindex, size, type, relativeoffset); } + void glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) { ovr_glVertexAttribBinding (attribindex, bindingindex); } + void glVertexBindingDivisor (GLuint bindingindex, GLuint divisor) { ovr_glVertexBindingDivisor (bindingindex, divisor); } + +void +glGetPointerv(GLenum pname, GLvoid **params) +{ + ovr_glGetPointerv(pname, params); +} + + -- 2.7.4 From 7a77f354316fc6a7c7d6f34b4fa1702a158861fd Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Fri, 22 Jan 2016 12:49:43 +0900 Subject: [PATCH 11/16] Fix memory bug and prevent potential leak. Change-Id: Iadeb173177b09b21fb3674b1ed726e1da7b3d994 --- src/modules/fastpath/coregl_fastpath.c | 21 ++++++++++++++++----- src/modules/fastpath/coregl_fastpath_gl.c | 22 ++++++++++++++++------ 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/modules/fastpath/coregl_fastpath.c b/src/modules/fastpath/coregl_fastpath.c index 0c61c31..85cc12a 100644 --- a/src/modules/fastpath/coregl_fastpath.c +++ b/src/modules/fastpath/coregl_fastpath.c @@ -1107,23 +1107,35 @@ fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, GLui { GL_Object *newobj = (GL_Object *)calloc(1, sizeof(GL_Object)); - AST(newobj != NULL); + if (newobj == NULL) + goto finish; newobj->id = (int)type + newid; newobj->real_id = real_name; newobj->ref_count = 1; - ret = newobj->id; + GL_Object_Hash *newobj_hash = (GL_Object_Hash *)calloc(1, sizeof(GL_Object_Hash)); - AST(newobj_hash != NULL); + if (newobj_hash == NULL) + { + free(newobj); + goto finish; + } newobj_hash->item = newobj; newobj_hash->hash_key = newid; _add_hash(hash_base, newobj_hash); GL_Object_Hash *newobj_hash_real = (GL_Object_Hash *)calloc(1, sizeof(GL_Object_Hash)); - AST(newobj_hash_real != NULL); + if (newobj_hash_real == NULL) + { + free(newobj); + free(newobj_hash); + goto finish; + } newobj_hash_real->item = newobj; newobj_hash_real->hash_key = real_name; _add_hash(hash_base_real, newobj_hash_real); + + ret = newobj->id; } _ostate_hash_check(hash_base); @@ -1212,7 +1224,6 @@ finish: return ret; } - /* Check if the context's state contains object of a given type */ GLuint fastpath_ostate_has_object_type(GL_Object_State *ostate, GL_Object_Type type) diff --git a/src/modules/fastpath/coregl_fastpath_gl.c b/src/modules/fastpath/coregl_fastpath_gl.c index 0fe6928..887dcec 100644 --- a/src/modules/fastpath/coregl_fastpath_gl.c +++ b/src/modules/fastpath/coregl_fastpath_gl.c @@ -137,15 +137,21 @@ _create_program_object(GL_Object_State *ostate, int is_program, GLenum shader_ty if (real_obj != 0) { ret = fastpath_ostate_create_object(ostate, GL_OBJECT_TYPE_PROGRAM, real_obj); - Program_object_attached_tag *poat = NULL; - poat = (Program_object_attached_tag *)calloc(1, sizeof(Program_object_attached_tag)); - AST(poat != NULL); - poat->is_deleting = 0; - poat->shader_count = 0; + if (ret != _COREGL_INT_INIT_VALUE) + { + poat = (Program_object_attached_tag *)calloc(1, sizeof(Program_object_attached_tag)); + if (poat == NULL) + { + AST(poat != NULL); + fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, ret); + } + poat->is_deleting = 0; + poat->shader_count = 0; - fastpath_ostate_set_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, ret, poat); + fastpath_ostate_set_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, ret, poat); + } } return ret; @@ -203,7 +209,11 @@ _detach_program_object(GL_Object_State *ostate, GLuint real_object, int is_progr if (poat->is_deleting == 0) { poat->is_deleting = 1; + /* Ref count increased when glCreateProgram/initial attach */ fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); + /* Ref count increased when glCreateProgram/create object */ + /* So, we have to call the under function twice.*/ + fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); } } else -- 2.7.4 From 7473d37a365f9ab07d9ea72272f22fd8766e8816 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Wed, 27 Jan 2016 16:53:52 +0900 Subject: [PATCH 12/16] Add EGL_PLATFORM_TBM_EXT specs to eglext.h Change-Id: I392a04f3f85263161885305f28bb36fccb801a34 --- include_KHR/EGL/eglext.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include_KHR/EGL/eglext.h b/include_KHR/EGL/eglext.h index 027b2ed..6ee20e3 100644 --- a/include_KHR/EGL/eglext.h +++ b/include_KHR/EGL/eglext.h @@ -567,6 +567,11 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, #define EGL_PLATFORM_WAYLAND_EXT 0x31D8 #endif /* EGL_EXT_platform_wayland */ +#ifndef EGL_EXT_platform_tbm +#define EGL_EXT_platform_tbm 1 +#define EGL_PLATFORM_TBM_EXT 0x31D9 +#endif /* EGL_EXT_platform_tbm */ + #ifndef EGL_EXT_platform_x11 #define EGL_EXT_platform_x11 1 #define EGL_PLATFORM_X11_EXT 0x31D5 -- 2.7.4 From 481a5c97710cc9c9c05df0b8f63c1e56636eb43b Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Fri, 12 Feb 2016 16:17:58 +0900 Subject: [PATCH 13/16] Add glActiveShaderProgram wrapper function. Change-Id: Ib1b31665c153d75f91d49dd2a8ae06dcf1d1201e --- src/wraps/coregl_gl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wraps/coregl_gl.c b/src/wraps/coregl_gl.c index 957fa56..8fffdc7 100644 --- a/src/wraps/coregl_gl.c +++ b/src/wraps/coregl_gl.c @@ -840,6 +840,12 @@ glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLf } void +glActiveShaderProgram(GLuint pipeline, GLuint program) +{ + ovr_glActiveShaderProgram(pipeline, program); +} + +void glUseProgram(GLuint program) { ovr_glUseProgram(program); -- 2.7.4 From d8afad72f4e18eef49533eea543eea69af8703df Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Fri, 19 Feb 2016 14:48:23 +0900 Subject: [PATCH 14/16] Add coding style guide. Apply coding style. Change-Id: Ie735827982a9304e161742fbc6f210c4a5d993d2 --- coding_guide.txt | 39 + include_KHR/EGL/egl.h | 86 +- include_KHR/EGL/eglext.h | 415 ++-- include_KHR/EGL/eglplatform.h | 6 +- include_KHR/GLES/gl.h | 175 +- include_KHR/GLES/glext.h | 662 ++++-- include_KHR/GLES2/gl2.h | 243 +- include_KHR/GLES2/gl2ext.h | 1200 +++++++--- include_KHR/GLES3/gl3.h | 473 ++-- include_KHR/GLES3/gl31.h | 659 ++++-- include_KHR/KHR/khrplatform.h | 10 +- src/coregl.c | 48 +- src/coregl_export_egl.c | 46 +- src/coregl_export_gl.c | 590 +++-- src/coregl_internal.h | 24 +- src/coregl_thread_pthread.c | 14 +- src/coregl_thread_pthread_and_gcc_tlv.c | 2 +- src/coregl_trace.c | 6 +- src/headers/gl.h | 6 +- src/headers/sym.h | 12 +- src/headers/sym_egl.h | 114 +- src/headers/sym_gl.h | 1068 ++++++--- src/headers/sym_glx.h | 59 +- src/modules/appopt/coregl_appopt.c | 3 +- src/modules/appopt/coregl_appopt.h | 3 +- src/modules/coregl_module.h | 3 +- src/modules/fastpath/coregl_fastpath.c | 1161 +++++---- src/modules/fastpath/coregl_fastpath.h | 95 +- src/modules/fastpath/coregl_fastpath_egl.c | 549 ++--- src/modules/fastpath/coregl_fastpath_gl.c | 3269 ++++++++++++-------------- src/modules/fastpath/coregl_fastpath_state.h | 498 ++-- src/modules/tracepath/coregl_tracepath.c | 767 +++--- src/modules/tracepath/coregl_tracepath.h | 255 +- src/modules/tracepath/coregl_tracepath_egl.c | 250 +- src/modules/tracepath/coregl_tracepath_gl.c | 1832 +++++++++------ src/modules/tracepath/png.h | 2151 +++++++++-------- src/modules/tracepath/pngconf.h | 122 +- src/modules/tracepath/zconf.h | 66 +- src/modules/tracepath/zlib.h | 192 +- src/wraps/coregl_egl.c | 40 +- src/wraps/coregl_gl.c | 528 +++-- 41 files changed, 10015 insertions(+), 7726 deletions(-) create mode 100644 coding_guide.txt diff --git a/coding_guide.txt b/coding_guide.txt new file mode 100644 index 0000000..94ca52e --- /dev/null +++ b/coding_guide.txt @@ -0,0 +1,39 @@ +1. Coding Style + + You should follow the style of the file you're editing. In general, we + try to follow the rules below. + + 1) indent with tabs, and a tab is always 8 characters wide + 2) opening braces are on the same line as the if statement + 3) no braces in an if-body with just one statement + 4) if one of the branches of an if-else codition has braces, than the + other branch should also have braces + 5) there is always an empty line between variable declarations and the code + + static int + my_function(void) + { + int a = 0; + if (a) + b(); + else + c(); + if (a) { + b(); + c(); + } else { + d(); + } + } + + 6) lines should be less than 80 characters wide + 7) when breaking lines with functions calls, the parameters are aligned + with the opening parenthesis + 8) when assigning a variable with the result of a function call, if the + line would be longer we break it around the equal '=' sign if it makes sense + + long_variable_name = + function_with_a_really_long_name(parameter1, parameter2, + parameter3, parameter4); + x = function_with_a_really_long_name(parameter1, parameter2, + parameter3, parameter4); diff --git a/include_KHR/EGL/egl.h b/include_KHR/EGL/egl.h index f7df2b6..00a747b 100644 --- a/include_KHR/EGL/egl.h +++ b/include_KHR/EGL/egl.h @@ -118,27 +118,44 @@ typedef void (*__eglMustCastToProperFunctionPointerType)(void); #define EGL_VERSION 0x3054 #define EGL_WIDTH 0x3057 #define EGL_WINDOW_BIT 0x0004 -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, + const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, + EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, + EGLSurface surface, EGLNativePixmapType target); +EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, + EGLConfig config, EGLContext share_context, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, + EGLConfig config, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, + EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, + EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, + EGLContext ctx); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, + EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, + EGLConfig config, EGLint attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, + EGLint config_size, EGLint *num_config); EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void); EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw); EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id); EGLAPI EGLint EGLAPIENTRY eglGetError (void); -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); +EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress ( + const char *procname); +EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, + EGLint *minor); +EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, + EGLint attribute, EGLint *value); EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, + EGLSurface surface, EGLint attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, + EGLSurface surface); EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); @@ -160,9 +177,12 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); #define EGL_TEXTURE_RGB 0x305D #define EGL_TEXTURE_RGBA 0x305E #define EGL_TEXTURE_TARGET 0x3081 -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); +EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, + EGLSurface surface, EGLint buffer); +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, + EGLSurface surface, EGLint buffer); +EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, + EGLSurface surface, EGLint attribute, EGLint value); EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); #endif /* EGL_VERSION_1_1 */ @@ -201,7 +221,9 @@ typedef void *EGLClientBuffer; #define EGL_VERTICAL_RESOLUTION 0x3091 EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, + EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, + const EGLint *attrib_list); EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); #endif /* EGL_VERSION_1_2 */ @@ -284,16 +306,24 @@ typedef void *EGLImage; #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 #define EGL_IMAGE_PRESERVED 0x30D2 #define EGL_NO_IMAGE ((EGLImage)0) -EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); +EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, + const EGLAttrib *attrib_list); EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); -EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, + EGLint flags, EGLTime timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, + EGLint attribute, EGLAttrib *value); +EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, + EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image); -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); +EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, + void *native_display, const EGLAttrib *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, + EGLConfig config, void *native_window, const EGLAttrib *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, + EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, + EGLint flags); #endif /* EGL_VERSION_1_5 */ #ifdef __cplusplus diff --git a/include_KHR/EGL/eglext.h b/include_KHR/EGL/eglext.h index 6ee20e3..5b41d76 100644 --- a/include_KHR/EGL/eglext.h +++ b/include_KHR/EGL/eglext.h @@ -60,9 +60,11 @@ extern "C" { #define EGL_KHR_cl_event2 1 typedef void *EGLSyncKHR; typedef intptr_t EGLAttribKHR; -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, + EGLenum type, const EGLAttribKHR *attrib_list); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, + const EGLAttribKHR *attrib_list); #endif #endif /* EGL_KHR_cl_event2 */ @@ -146,11 +148,17 @@ EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, typedef void *EGLImageKHR; #define EGL_NATIVE_PIXMAP_KHR 0x30B0 #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, + EGLContext ctx, EGLenum target, EGLClientBuffer buffer, + const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, + EGLImageKHR image); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, + EGLContext ctx, EGLenum target, EGLClientBuffer buffer, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, + EGLImageKHR image); #endif #endif /* EGL_KHR_image */ @@ -186,11 +194,15 @@ EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR im #define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD #define EGL_LOWER_LEFT_KHR 0x30CE #define EGL_UPPER_LEFT_KHR 0x30CF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, + EGLSurface surface, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, + EGLSurface surface); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, + EGLSurface surface, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, + EGLSurface surface); #endif #endif /* EGL_KHR_lock_surface */ @@ -201,9 +213,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface su #ifndef EGL_KHR_lock_surface3 #define EGL_KHR_lock_surface3 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, + EGLSurface surface, EGLint attribute, EGLAttribKHR *value); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, + EGLSurface surface, EGLint attribute, EGLAttribKHR *value); #endif #endif /* EGL_KHR_lock_surface3 */ @@ -242,17 +256,27 @@ typedef khronos_utime_nanoseconds_t EGLTimeKHR; #define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 #define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull #define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, + EGLenum type, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, + EGLSyncKHR sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, + EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, + EGLSyncKHR sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, + EGLSyncKHR sync, EGLint attribute, EGLint *value); +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, + EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, + EGLint flags, EGLTimeKHR timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, + EGLenum mode); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, + EGLSyncKHR sync, EGLint attribute, EGLint *value); #endif #endif /* KHRONOS_SUPPORT_INT64 */ #endif /* EGL_KHR_reusable_sync */ @@ -275,17 +299,27 @@ typedef khronos_uint64_t EGLuint64KHR; #define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A #define EGL_BAD_STREAM_KHR 0x321B #define EGL_BAD_STATE_KHR 0x321C -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, + const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, + EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLint value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLint *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, + EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLint value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); #endif #endif /* KHRONOS_SUPPORT_INT64 */ #endif /* EGL_KHR_stream */ @@ -294,13 +328,19 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR #define EGL_KHR_stream_consumer_gltexture 1 #ifdef EGL_KHR_stream #define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) ( + EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) ( + EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) ( + EGLDisplay dpy, EGLStreamKHR stream); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR ( + EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, + EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, + EGLStreamKHR stream); #endif #endif /* EGL_KHR_stream */ #endif /* EGL_KHR_stream_consumer_gltexture */ @@ -310,11 +350,15 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLSt typedef int EGLNativeFileDescriptorKHR; #ifdef EGL_KHR_stream #define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) -typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP + PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) +(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR ( + EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR ( + EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); #endif #endif /* EGL_KHR_stream */ #endif /* EGL_KHR_stream_cross_process_fd */ @@ -326,9 +370,11 @@ EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay #define EGL_STREAM_TIME_NOW_KHR 0x31FD #define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE #define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); #endif #endif /* EGL_KHR_stream */ #endif /* EGL_KHR_stream_fifo */ @@ -343,9 +389,12 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKH #define EGL_KHR_stream_producer_eglsurface 1 #ifdef EGL_KHR_stream #define EGL_STREAM_BIT_KHR 0x0800 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) ( + EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, + const EGLint *attrib_list); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, + EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); #endif #endif /* EGL_KHR_stream */ #endif /* EGL_KHR_stream_producer_eglsurface */ @@ -361,20 +410,26 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, #ifndef EGL_KHR_wait_sync #define EGL_KHR_wait_sync 1 -typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, + EGLSyncKHR sync, EGLint flags); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, + EGLint flags); #endif #endif /* EGL_KHR_wait_sync */ #ifndef EGL_ANDROID_blob_cache #define EGL_ANDROID_blob_cache 1 typedef khronos_ssize_t EGLsizeiANDROID; -typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); -typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); -typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); +typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, + const void *value, EGLsizeiANDROID valueSize); +typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, + EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); +typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, + EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); +EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, + EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); #endif #endif /* EGL_ANDROID_blob_cache */ @@ -394,9 +449,11 @@ EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobF #define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 #define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 #define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 -typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync); +typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, + EGLSyncKHR sync); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, + EGLSyncKHR sync); #endif #endif /* EGL_ANDROID_native_fence_sync */ @@ -412,9 +469,11 @@ EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR #ifndef EGL_ANGLE_query_surface_pointer #define EGL_ANGLE_query_surface_pointer 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) ( + EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, + EGLSurface surface, EGLint attribute, void **value); #endif #endif /* EGL_ANGLE_query_surface_pointer */ @@ -450,15 +509,23 @@ typedef void *EGLDeviceEXT; #define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0)) #define EGL_BAD_DEVICE_EXT 0x322B #define EGL_DEVICE_EXT 0x322C -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) ( + EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); +typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) ( + EGLDeviceEXT device, EGLint name); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, + EGLDeviceEXT *devices, EGLint *num_devices); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) ( + EGLDisplay dpy, EGLint attribute, EGLAttrib *value); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, + EGLint attribute, EGLAttrib *value); +EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, + EGLint name); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, + EGLDeviceEXT *devices, EGLint *num_devices); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, + EGLint attribute, EGLAttrib *value); #endif #endif /* EGL_EXT_device_base */ @@ -512,23 +579,43 @@ typedef void *EGLOutputPortEXT; #define EGL_BAD_OUTPUT_LAYER_EXT 0x322D #define EGL_BAD_OUTPUT_PORT_EXT 0x322E #define EGL_SWAP_INTERVAL_EXT 0x322F -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, + const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, + EGLint *num_layers); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, + const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, + EGLint *num_ports); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) ( + EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) ( + EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); +typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) ( + EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, + EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) ( + EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); +typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) ( + EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, + const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, + EGLint *num_layers); +EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, + const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, + EGLint *num_ports); +EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, + EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, + EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); +EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, + EGLOutputLayerEXT layer, EGLint name); +EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, + EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, + EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); +EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, + EGLOutputPortEXT port, EGLint name); #endif #endif /* EGL_EXT_output_base */ @@ -547,13 +634,21 @@ EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLO #ifndef EGL_EXT_platform_base #define EGL_EXT_platform_base 1 -typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); +typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) ( + EGLenum platform, void *native_display, const EGLint *attrib_list); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) ( + EGLDisplay dpy, EGLConfig config, void *native_window, + const EGLint *attrib_list); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) ( + EGLDisplay dpy, EGLConfig config, void *native_pixmap, + const EGLint *attrib_list); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); +EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, + void *native_display, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, + EGLConfig config, void *native_window, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, + EGLConfig config, void *native_pixmap, const EGLint *attrib_list); #endif #endif /* EGL_EXT_platform_base */ @@ -585,32 +680,38 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, #ifndef EGL_EXT_stream_consumer_egloutput #define EGL_EXT_stream_consumer_egloutput 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) ( + EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, + EGLStreamKHR stream, EGLOutputLayerEXT layer); #endif #endif /* EGL_EXT_stream_consumer_egloutput */ #ifndef EGL_EXT_swap_buffers_with_damage #define EGL_EXT_swap_buffers_with_damage 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) ( + EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, + EGLSurface surface, EGLint *rects, EGLint n_rects); #endif #endif /* EGL_EXT_swap_buffers_with_damage */ #ifndef EGL_HI_clientpixmap #define EGL_HI_clientpixmap 1 struct EGLClientPixmapHI { - void *pData; - EGLint iWidth; - EGLint iHeight; - EGLint iStride; + void *pData; + EGLint iWidth; + EGLint iHeight; + EGLint iStride; }; #define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) ( + EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, + EGLConfig config, struct EGLClientPixmapHI *pixmap); #endif #endif /* EGL_HI_clientpixmap */ @@ -639,11 +740,15 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfi #define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 #define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 #define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, + const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, + EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, + EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); #endif #endif /* EGL_MESA_drm_image */ @@ -654,17 +759,21 @@ EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR #ifndef EGL_NOK_swap_region #define EGL_NOK_swap_region 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) ( + EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, + EGLSurface surface, EGLint numRects, const EGLint *rects); #endif #endif /* EGL_NOK_swap_region */ #ifndef EGL_NOK_swap_region2 #define EGL_NOK_swap_region2 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) ( + EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, + EGLSurface surface, EGLint numRects, const EGLint *rects); #endif #endif /* EGL_NOK_swap_region2 */ @@ -712,13 +821,19 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurfa #ifndef EGL_NV_native_query #define EGL_NV_native_query 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) ( + EGLDisplay dpy, EGLNativeDisplayType *display_id); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, + EGLSurface surf, EGLNativeWindowType *window); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, + EGLSurface surf, EGLNativePixmapType *pixmap); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, + EGLNativeDisplayType *display_id); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, + EGLSurface surf, EGLNativeWindowType *window); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, + EGLSurface surf, EGLNativePixmapType *pixmap); #endif #endif /* EGL_NV_native_query */ @@ -729,18 +844,22 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface #ifndef EGL_NV_post_sub_buffer #define EGL_NV_post_sub_buffer 1 #define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE -typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, + EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, + EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); #endif #endif /* EGL_NV_post_sub_buffer */ #ifndef EGL_NV_stream_sync #define EGL_NV_stream_sync 1 #define EGL_SYNC_NEW_FRAME_NV 0x321F -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, + EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); #endif #endif /* EGL_NV_stream_sync */ @@ -762,19 +881,26 @@ typedef khronos_utime_nanoseconds_t EGLTimeNV; #define EGL_SYNC_CONDITION_NV 0x30EE #define EGL_SYNC_FENCE_NV 0x30EF #define EGL_NO_SYNC_NV ((EGLSyncNV)0) -typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, + EGLenum condition, const EGLint *attrib_list); typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, + EGLint flags, EGLTimeNV timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, + EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, + EGLint attribute, EGLint *value); #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, + EGLenum condition, const EGLint *attrib_list); EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, + EGLTimeNV timeout); EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, + EGLint attribute, EGLint *value); #endif #endif /* KHRONOS_SUPPORT_INT64 */ #endif /* EGL_NV_sync */ @@ -812,9 +938,14 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void); #define EGL_CLIENT_PIXMAP_WIDTH_SEC 0x3212 /* eglCreateImageKHR attribute */ #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface eglCreateClientPixmapFromClientBufferSEC (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); +EGLAPI EGLSurface eglCreateClientPixmapFromClientBufferSEC (EGLDisplay dpy, + EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, + const EGLint *attrib_list); #endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATECLIENTPIXMAPFROMCLIENTBUFFERSECPROC) (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); +typedef EGLSurface (EGLAPIENTRYP + PFNEGLCREATECLIENTPIXMAPFROMCLIENTBUFFERSECPROC) (EGLDisplay dpy, + EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, + const EGLint *attrib_list); #endif #ifndef EGL_SEC_image_map @@ -832,9 +963,11 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATECLIENTPIXMAPFROMCLIENTBUFFERSECPROC #define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b /* More config attribute value, for EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC */ #define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c /* GetImageAttribSEC target */ #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void * EGLAPIENTRY eglMapImageSEC (EGLDisplay dpy, EGLImageKHR image); -EGLAPI EGLBoolean EGLAPIENTRY eglUnmapImageSEC (EGLDisplay dpy, EGLImageKHR image); -EGLAPI EGLBoolean EGLAPIENTRY eglGetImageAttribSEC (EGLDisplay dpy, EGLImageKHR image, EGLint attribute, EGLint *value); +EGLAPI void *EGLAPIENTRY eglMapImageSEC (EGLDisplay dpy, EGLImageKHR image); +EGLAPI EGLBoolean EGLAPIENTRY eglUnmapImageSEC (EGLDisplay dpy, + EGLImageKHR image); +EGLAPI EGLBoolean EGLAPIENTRY eglGetImageAttribSEC (EGLDisplay dpy, + EGLImageKHR image, EGLint attribute, EGLint *value); #endif /* EGL_EGLEXT_PROTOTYPES */ #endif /* EGL_SEC_image_map */ @@ -861,13 +994,19 @@ EGLAPI EGLBoolean EGLAPIENTRY eglGetImageAttribSEC (EGLDisplay dpy, EGLImageKHR struct wl_display; struct wl_resource; #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); -EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, + struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, + struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, + struct wl_resource *buffer, EGLint attribute, EGLint *value); #endif -typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, + struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, + struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, + struct wl_resource *buffer, EGLint attribute, EGLint *value); #endif @@ -875,9 +1014,11 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st #define EGL_WL_create_wayland_buffer_from_image 1 #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); +EGLAPI struct wl_buffer *EGLAPIENTRY eglCreateWaylandBufferFromImageWL( + EGLDisplay dpy, EGLImageKHR image); #endif -typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image); +typedef struct wl_buffer *(EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) ( + EGLDisplay dpy, EGLImageKHR image); #endif /******************************************************************************/ diff --git a/include_KHR/EGL/eglplatform.h b/include_KHR/EGL/eglplatform.h index 5f82bba..5f00d3c 100644 --- a/include_KHR/EGL/eglplatform.h +++ b/include_KHR/EGL/eglplatform.h @@ -89,9 +89,9 @@ typedef void *EGLNativePixmapType; struct egl_native_pixmap_t; -typedef struct ANativeWindow* EGLNativeWindowType; -typedef struct egl_native_pixmap_t* EGLNativePixmapType; -typedef void* EGLNativeDisplayType; +typedef struct ANativeWindow *EGLNativeWindowType; +typedef struct egl_native_pixmap_t *EGLNativePixmapType; +typedef void *EGLNativeDisplayType; /* 20140708-sw815.ha: add additional macro checking to verify X11 window system */ /* #elif defined(__unix__) */ diff --git a/include_KHR/GLES/gl.h b/include_KHR/GLES/gl.h index 5b8d85a..d0ea44f 100644 --- a/include_KHR/GLES/gl.h +++ b/include_KHR/GLES/gl.h @@ -591,42 +591,58 @@ typedef khronos_ssize_t GLsizeiptr; /* Available only in Common profile */ GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref); -GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha); GL_API void GL_APIENTRY glClearDepthf (GLclampf depth); GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation); -GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, + GLfloat alpha); GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param); GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, + GLfloat top, GLfloat zNear, GLfloat zFar); GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]); GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, + GLfloat *params); +GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, + GLfloat *params); +GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, + GLfloat *params); +GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, + GLfloat *params); GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param); GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, + const GLfloat *params); GL_API void GL_APIENTRY glLineWidth (GLfloat width); GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m); GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, + const GLfloat *params); GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, + GLfloat r, GLfloat q); GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); -GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, + GLfloat top, GLfloat zNear, GLfloat zFar); GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, + const GLfloat *params); GL_API void GL_APIENTRY glPointSize (GLfloat size); GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, + GLfloat z); GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, + const GLfloat *params); +GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, + GLfloat param); +GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, + const GLfloat *params); GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); /* Available in both Common and Common-Lite profiles */ @@ -635,22 +651,36 @@ GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref); GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, + const GLvoid *data, GLenum usage); +GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, + GLsizeiptr size, const GLvoid *data); GL_API void GL_APIENTRY glClear (GLbitfield mask); -GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, + GLclampx blue, GLclampx alpha); GL_API void GL_APIENTRY glClearDepthx (GLclampx depth); GL_API void GL_APIENTRY glClearStencil (GLint s); GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture); GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, + GLubyte alpha); +GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha); +GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha); +GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer); +GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data); +GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLsizei imageSize, const GLvoid *data); +GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, + GLint border); +GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); GL_API void GL_APIENTRY glCullFace (GLenum mode); GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); @@ -660,7 +690,8 @@ GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar); GL_API void GL_APIENTRY glDisable (GLenum cap); GL_API void GL_APIENTRY glDisableClientState (GLenum array); GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices); GL_API void GL_APIENTRY glEnable (GLenum cap); GL_API void GL_APIENTRY glEnableClientState (GLenum array); GL_API void GL_APIENTRY glFinish (void); @@ -668,23 +699,30 @@ GL_API void GL_APIENTRY glFlush (void); GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param); GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params); GL_API void GL_APIENTRY glFrontFace (GLenum mode); -GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, + GLfixed top, GLfixed zNear, GLfixed zFar); GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); -GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, + GLint *params); GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]); GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); GL_API GLenum GL_APIENTRY glGetError (void); GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params); GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, + GLfixed *params); +GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, + GLfixed *params); GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params); -GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name); +GL_API const GLubyte *GL_APIENTRY glGetString (GLenum name); GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, + GLfixed *params); +GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, + GLint *params); +GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, + GLfixed *params); GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode); GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap); @@ -692,50 +730,72 @@ GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture); GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param); GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params); GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glLineWidthx (GLfixed width); GL_API void GL_APIENTRY glLoadIdentity (void); GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m); GL_API void GL_APIENTRY glLogicOp (GLenum opcode); GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glMatrixMode (GLenum mode); GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, + GLfixed r, GLfixed q); GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, + const GLvoid *pointer); +GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, + GLfixed top, GLfixed zNear, GLfixed zFar); GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glPointSizex (GLfixed size); GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); GL_API void GL_APIENTRY glPopMatrix (void); GL_API void GL_APIENTRY glPushMatrix (void); -GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, + GLfixed z); GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, + GLsizei height); GL_API void GL_APIENTRY glShadeModel (GLenum mode); GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); GL_API void GL_APIENTRY glStencilMask (GLuint mask); GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer); GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, + const GLint *params); +GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, + const GLfixed *params); +GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels); +GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, + GLint param); +GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, + GLfixed param); +GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, + const GLint *params); +GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, + const GLfixed *params); +GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *pixels); GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, + GLsizei height); /*------------------------------------------------------------------------* * Required OES extension functions @@ -754,7 +814,8 @@ GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei hei /* GL_OES_point_size_array */ #ifndef GL_OES_point_size_array #define GL_OES_point_size_array 1 -GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, + const GLvoid *pointer); #endif /* GL_OES_point_sprite */ diff --git a/include_KHR/GLES/glext.h b/include_KHR/GLES/glext.h index 6d6f375..8c4f459 100644 --- a/include_KHR/GLES/glext.h +++ b/include_KHR/GLES/glext.h @@ -65,7 +65,7 @@ extern "C" { /* GL_OES_EGL_image */ #ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; +typedef void *GLeglImageOES; #endif /* GL_OES_EGL_image_external */ @@ -562,18 +562,22 @@ typedef struct __GLsync *GLsync; #ifndef GL_OES_blend_equation_separate #define GL_OES_blend_equation_separate 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); +GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, + GLenum modeAlpha); #endif -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, + GLenum modeAlpha); #endif /* GL_OES_blend_func_separate */ #ifndef GL_OES_blend_func_separate #define GL_OES_blend_func_separate 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha); #endif -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, + GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); #endif /* GL_OES_blend_subtract */ @@ -609,22 +613,30 @@ typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode); #ifndef GL_OES_draw_texture #define GL_OES_draw_texture 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); -GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, + GLshort width, GLshort height); +GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, + GLint height); +GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, + GLfixed width, GLfixed height); GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); -GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, + GLfloat width, GLfloat height); GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); #endif -typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, + GLshort z, GLshort width, GLshort height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, + GLint width, GLint height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, + GLfixed z, GLfixed width, GLfixed height); typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords); typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, + GLfloat z, GLfloat width, GLfloat height); typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); #endif @@ -632,11 +644,15 @@ typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); #ifndef GL_OES_EGL_image #define GL_OES_EGL_image 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, + GLeglImageOES image); +GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, + GLeglImageOES image); #endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, + GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) ( + GLenum target, GLeglImageOES image); #endif /* GL_OES_EGL_image_external */ @@ -665,86 +681,138 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenu #define GL_OES_fixed_point 1 #ifdef GL_GLEXT_PROTOTYPES GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref); -GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, + GLclampx blue, GLclampx alpha); GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth); GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha); GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar); GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param); GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]); GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, + GLfixed *params); +GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, + GLfixed *params); +GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, + GLfixed *params); +GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, + GLfixed *params); GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param); GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params); GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width); GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, + GLfixed param); +GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4bOES (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q); -GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glMultiTexCoord4bOES (GLenum target, GLbyte s, GLbyte t, + GLbyte r, GLbyte q); +GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, + GLfixed t, GLfixed r, GLfixed q); GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glPointSizexOES (GLfixed size); GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, + GLfixed z); GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert); GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); +GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, + GLfixed param); +GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, + const GLfixed *params); +GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, + GLfixed param); +GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, + const GLfixed *params); GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); #endif typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, + GLclampx green, GLclampx blue, GLclampx alpha); typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); -typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, + const GLfixed *equation); +typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, + GLfixed blue, GLfixed alpha); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, + GLclampx zFar); typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]); -typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, + const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, + GLfixed eqn[4]); +typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, + GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, + GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, + GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, + GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, + GLenum pname, GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, + GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, + const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, + GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, + const GLfixed *params); typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, + GLfixed param); +typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, + const GLfixed *params); typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); -typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, + GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, + GLfixed nz); +typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, + GLfixed param); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, + const GLfixed *params); typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); -typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, + GLfixed units); +typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, + GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, + GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, + GLfixed z); +typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, + GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, + const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, + GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, + GLenum pname, const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, + GLfixed z); +typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum target, + GLbyte s, GLbyte t, GLbyte r, GLbyte q); #endif /* GL_OES_framebuffer_object */ @@ -752,35 +820,58 @@ typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum target, GLbyte s #define GL_OES_framebuffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer); -GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer); -GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers); -GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers); -GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params); +GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, + GLuint renderbuffer); +GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, + const GLuint *renderbuffers); +GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, + GLuint *renderbuffers); +GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, + GLenum pname, GLint *params); GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer); -GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer); -GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers); -GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers); +GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, + GLuint framebuffer); +GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, + const GLuint *framebuffers); +GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint *framebuffers); GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target); -GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params); +GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, + GLenum attachment, GLenum pname, GLint *params); GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target); #endif -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) ( + GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, + GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, + const GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, + GLuint *renderbuffers); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) ( + GLenum target, GLenum pname, GLint *params); typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, + GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, + const GLuint *framebuffers); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, + GLuint *framebuffers); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) ( + GLenum target); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) ( + GLenum target, GLenum attachment, GLenum pname, GLint *params); typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); #endif @@ -788,13 +879,16 @@ typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); #ifndef GL_OES_mapbuffer #define GL_OES_mapbuffer 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); +GL_API void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params); +GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, + GLvoid **params); #endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, + GLenum access); typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, + GLenum pname, GLvoid **params); #endif /* GL_OES_matrix_get */ @@ -808,13 +902,18 @@ typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum #ifdef GL_GLEXT_PROTOTYPES GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void); -GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer); +GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer); #endif -typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); +typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) ( + GLuint matrixpaletteindex); typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); -typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, + GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer); #endif /* GL_OES_packed_depth_stencil */ @@ -831,9 +930,11 @@ typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, #ifndef GL_OES_query_matrix #define GL_OES_query_matrix 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]); +GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], + GLint exponent[16]); #endif -typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]); +typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) ( + GLfixed mantissa[16], GLint exponent[16]); #endif /* GL_OES_rgb8_rgba8 */ @@ -846,17 +947,24 @@ typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16] #define GL_OES_single_precision 1 #ifdef GL_GLEXT_PROTOTYPES GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar); -GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); #endif -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar); -typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, + GLclampf zFar); +typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, + const GLfloat *equation); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, + GLfloat eqn[4]); typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); #endif @@ -884,25 +992,42 @@ typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); #ifndef GL_OES_texture_cube_map #define GL_OES_texture_cube_map 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); +GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, + GLfloat param); +GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, + const GLfloat *params); GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); -#endif -typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, + const GLint *params); +GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, + GLfixed param); +GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, + const GLfixed *params); +GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, + GLfloat *params); +GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, + GLint *params); +GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, + GLfixed *params); +#endif +typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, + GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, + const GLfloat *params); +typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, + GLint param); +typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, + const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, + GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, + const GLfixed *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, + GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, + GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, + GLfixed *params); #endif /* GL_OES_texture_env_crossbar */ @@ -920,13 +1045,16 @@ typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, #define GL_OES_vertex_array_object 1 #ifdef GL_GLEXT_PROTOTYPES GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, + const GLuint *arrays); GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); #endif typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, + const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, + GLuint *arrays); typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); #endif @@ -952,19 +1080,25 @@ typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); #ifndef GL_APPLE_copy_texture_levels #define GL_APPLE_copy_texture_levels 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, + GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); #endif -typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) ( + GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, + GLsizei sourceLevelCount); #endif /* GL_APPLE_framebuffer_multisample */ #ifndef GL_APPLE_framebuffer_multisample #define GL_APPLE_framebuffer_multisample 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, + GLenum, GLsizei, GLsizei); GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); #endif @@ -975,18 +1109,26 @@ typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); -GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, + GLuint64 timeout); +GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, + GLuint64 timeout); GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); -GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, + GLsizei bufSize, GLsizei *length, GLint *values); #endif -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, + GLbitfield flags); typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, + GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, + GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, + GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, + GLsizei bufSize, GLsizei *length, GLint *values); #endif /* GL_APPLE_texture_2D_limited_npot */ @@ -1026,42 +1168,58 @@ typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, #ifndef GL_EXT_discard_framebuffer #define GL_EXT_discard_framebuffer 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, + GLsizei numAttachments, const GLenum *attachments); #endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, + GLsizei numAttachments, const GLenum *attachments); #endif /* GL_EXT_map_buffer_range */ #ifndef GL_EXT_map_buffer_range #define GL_EXT_map_buffer_range 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY *glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); +GL_API void GL_APIENTRY *glMapBufferRangeEXT (GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access); +GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, + GLintptr offset, GLsizeiptr length); #endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, + GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, + GLintptr offset, GLsizeiptr length); #endif /* GL_EXT_multisampled_render_to_texture */ #ifndef GL_EXT_multisampled_render_to_texture #define GL_EXT_multisampled_render_to_texture 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, + GLenum, GLsizei, GLsizei); +GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, + GLenum, GLuint, GLint, GLsizei); #endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) ( + GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples); #endif /* GL_EXT_multi_draw_arrays */ #ifndef GL_EXT_multi_draw_arrays #define GL_EXT_multi_draw_arrays 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei); -GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); +GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, + const GLsizei *, GLsizei); +GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, + const GLvoid **, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, + const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, + const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); #endif /* GL_EXT_read_format_bgra */ @@ -1074,14 +1232,21 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL #define GL_EXT_robustness 1 #ifdef GL_GLEXT_PROTOTYPES GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); -GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params); -GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, + GLsizei bufSize, float *params); +GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, + GLsizei bufSize, GLint *params); #endif typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, + GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, + void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, + GLint location, GLsizei bufSize, float *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, + GLint location, GLsizei bufSize, GLint *params); #endif /* GL_EXT_sRGB */ @@ -1113,19 +1278,35 @@ typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint loc #ifndef GL_EXT_texture_storage #define GL_EXT_texture_storage 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width); +GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width); +GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth); +#endif +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); #endif /*------------------------------------------------------------------------* @@ -1154,19 +1335,27 @@ typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum GL_API void GL_APIENTRY glClipPlanefIMG (GLenum, const GLfloat *); GL_API void GL_APIENTRY glClipPlanexIMG (GLenum, const GLfixed *); #endif -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, + const GLfloat *eqn); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, + const GLfixed *eqn); #endif /* GL_IMG_multisampled_render_to_texture */ #ifndef GL_IMG_multisampled_render_to_texture #define GL_IMG_multisampled_render_to_texture 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); +GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, + GLenum, GLsizei, GLsizei); +GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, + GLenum, GLuint, GLint, GLsizei); #endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) ( + GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples); #endif /*------------------------------------------------------------------------* @@ -1185,13 +1374,16 @@ GL_API void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); GL_API void GL_APIENTRY glFinishFenceNV (GLuint); GL_API void GL_APIENTRY glSetFenceNV (GLuint, GLenum); #endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, + const GLuint *fences); typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, + GLint *params); typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, + GLenum condition); #endif /*------------------------------------------------------------------------* @@ -1202,53 +1394,85 @@ typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition) #ifndef GL_QCOM_driver_control #define GL_QCOM_driver_control 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, + GLuint *driverControls); +GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, + GLsizei bufSize, GLsizei *length, GLchar *driverControlString); GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); #endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, + GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) ( + GLuint driverControl, GLsizei bufSize, GLsizei *length, + GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) ( + GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) ( + GLuint driverControl); #endif /* GL_QCOM_extended_get */ #ifndef GL_QCOM_extended_get #define GL_QCOM_extended_get 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); +GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, + GLint maxTextures, GLint *numTextures); +GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, + GLint *numBuffers); +GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, + GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, + GLint maxFramebuffers, GLint *numFramebuffers); +GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, + GLenum face, GLint level, GLenum pname, GLint *params); +GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, + GLenum pname, GLint param); +GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, + GLvoid **params); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, + GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, + GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) ( + GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) ( + GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) ( + GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) ( + GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, + GLvoid **params); #endif /* GL_QCOM_extended_get2 */ #ifndef GL_QCOM_extended_get2 #define GL_QCOM_extended_get2 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, + GLint *numShaders); +GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, + GLint maxPrograms, GLint *numPrograms); GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, + GLenum shadertype, GLchar *source, GLint *length); #endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, + GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, + GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) ( + GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) ( + GLuint program, GLenum shadertype, GLchar *source, GLint *length); #endif /* GL_QCOM_perfmon_global_mode */ @@ -1265,10 +1489,12 @@ typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint progr #ifndef GL_QCOM_tiled_rendering #define GL_QCOM_tiled_rendering 1 #ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, + GLuint height, GLbitfield preserveMask); GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); #endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, + GLuint width, GLuint height, GLbitfield preserveMask); typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); #endif diff --git a/include_KHR/GLES2/gl2.h b/include_KHR/GLES2/gl2.h index 2f776c1..6969e22 100644 --- a/include_KHR/GLES2/gl2.h +++ b/include_KHR/GLES2/gl2.h @@ -376,84 +376,130 @@ typedef khronos_uint8_t GLubyte; #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, + const GLchar *name); GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, + GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, + GLuint renderbuffer); GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha); GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, + GLenum modeAlpha); GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, + GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, + const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, + GLsizeiptr size, const void *data); GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha); GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha); GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, + GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, + const GLuint *framebuffers); GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, + const GLuint *renderbuffers); GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, + const GLuint *textures); GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); GL_APICALL void GL_APIENTRY glDisable (GLenum cap); GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, + GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, + GLenum type, const void *indices); GL_APICALL void GL_APIENTRY glEnable (GLenum cap); GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); GL_APICALL void GL_APIENTRY glFinish (void); GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level); GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, + GLuint *renderbuffers); GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, + GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, + const GLchar *name); GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, + GLint *params); GL_APICALL GLenum GL_APIENTRY glGetError (void); GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv ( + GLenum target, GLenum attachment, GLenum pname, GLint *params); GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, + GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, + GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *source); GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, + GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, + const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, + GLenum pname, void **pointer); GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); @@ -466,60 +512,97 @@ GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, void *pixels); GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, + const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, + const GLchar *const *string, const GLint *length); GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, + GLint ref, GLuint mask); GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, + GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, + GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, + GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, + const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, + GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, + const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const void *pixels); GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, + const GLfloat *value); GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, + GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, + const GLfloat *value); GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, + GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, + GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, + GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, + GLfloat y); GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, + GLfloat y, GLfloat z); GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w); GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, + GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, + GLsizei height); #endif /* GL_ES_VERSION_2_0 */ /******************************************************************************/ -/* 20140709 joonbum.ko@samsung.com: Add GL_STENCIL_INDEX */ +/* Add GL_STENCIL_INDEX */ #define GL_STENCIL_INDEX 0x1901 /******************************************************************************/ @@ -527,4 +610,4 @@ GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei } #endif -#endif \ No newline at end of file +#endif diff --git a/include_KHR/GLES2/gl2ext.h b/include_KHR/GLES2/gl2ext.h index bcd0a8f..195e543 100644 --- a/include_KHR/GLES2/gl2ext.h +++ b/include_KHR/GLES2/gl2ext.h @@ -88,7 +88,9 @@ GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void); #ifndef GL_KHR_debug #define GL_KHR_debug 1 -typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source, GLenum type, + GLuint id, GLenum severity, GLsizei length, const GLchar *message, + const void *userParam); #define GL_SAMPLER 0x82E6 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 @@ -129,37 +131,67 @@ typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id, #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 #define GL_STACK_OVERFLOW_KHR 0x0503 #define GL_STACK_UNDERFLOW_KHR 0x0504 -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam); -typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, + GLenum type, GLenum severity, GLsizei count, const GLuint *ids, + GLboolean enabled); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, + GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) ( + GLDEBUGPROCKHR callback, const void *userParam); +typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, + GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, + GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, + GLuint id, GLsizei length, const GLchar *message); typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void); -typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, + GLuint name, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, + GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, + GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, + GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, + void **params); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, + GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, + GLsizei bufSize, GLsizei *length, GLchar *label); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, + GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, + const GLchar *label); GL_APICALL void GL_APIENTRY glPopDebugGroup (void); -GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); -GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, + GLsizei length, const GLchar *message); +GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, + GLenum type, GLenum severity, GLsizei count, const GLuint *ids, + GLboolean enabled); +GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, + GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, + const void *userParam); +GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, + GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, + GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, + GLsizei length, const GLchar *message); GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void); -GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, + GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, + GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, + GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, + GLsizei bufSize, GLsizei *length, GLchar *label); GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params); -GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, + GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, + GLsizei bufSize, GLsizei *length, GLchar *label); #endif #endif /* GL_KHR_debug */ @@ -178,16 +210,25 @@ GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSiz #define GL_NO_RESET_NOTIFICATION_KHR 0x8261 #define GL_CONTEXT_LOST_KHR 0x0507 typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, + GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, + void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, + GLint location, GLsizei bufSize, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, + GLint location, GLsizei bufSize, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, + GLint location, GLsizei bufSize, GLuint *params); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void); -GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, + GLsizei bufSize, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, + GLsizei bufSize, GLint *params); +GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, + GLsizei bufSize, GLuint *params); #endif #endif /* GL_KHR_robustness */ @@ -230,11 +271,15 @@ GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, #ifndef GL_OES_EGL_image #define GL_OES_EGL_image 1 typedef void *GLeglImageOES; -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, + GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) ( + GLenum target, GLeglImageOES image); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, + GLeglImageOES image); +GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES ( + GLenum target, GLeglImageOES image); #endif #endif /* GL_OES_EGL_image */ @@ -300,11 +345,15 @@ GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum targe #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, + GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, + GLenum binaryFormat, const void *binary, GLint length); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length); +GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, + GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, + GLenum binaryFormat, const void *binary, GLint length); #endif #endif /* GL_OES_get_program_binary */ @@ -314,13 +363,16 @@ GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFor #define GL_BUFFER_ACCESS_OES 0x88BB #define GL_BUFFER_MAPPED_OES 0x88BC #define GL_BUFFER_MAP_POINTER_OES 0x88BD -typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, + GLenum access); typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, + GLenum pname, void **params); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, + void **params); #endif #endif /* GL_OES_mapbuffer */ @@ -404,19 +456,45 @@ GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value); #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 #define GL_SAMPLER_3D_OES 0x8B5F #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, + GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, + GLint level, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const void *data); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLint zoffset); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, + GLint level, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const void *data); +GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLint zoffset); #endif #endif /* GL_OES_texture_3D */ @@ -478,9 +556,13 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum att #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedsamplelocations); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedsamplelocations); #endif #endif /* GL_OES_texture_storage_multisample_2d_array */ @@ -488,12 +570,15 @@ GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei #define GL_OES_vertex_array_object 1 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, + const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, + GLuint *arrays); typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, + const GLuint *arrays); GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); #endif @@ -531,29 +616,51 @@ GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 #define GL_PERFMON_RESULT_AMD 0x8BC6 -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); -typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, + GLsizei groupsSize, GLuint *groups); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, + GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, + GLuint *counters); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, + GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) ( + GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, + GLchar *counterString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, + GLuint counter, GLenum pname, void *data); +typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, + GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, + GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) ( + GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, + GLuint *counterList); typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) ( + GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, + GLint *bytesWritten); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, + GLsizei groupsSize, GLuint *groups); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, + GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, + GLuint *counters); +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, + GLsizei bufSize, GLsizei *length, GLchar *groupString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, + GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, + GLuint counter, GLenum pname, void *data); GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, + GLuint *monitors); +GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, + GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, + GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); #endif #endif /* GL_AMD_performance_monitor */ @@ -576,9 +683,13 @@ GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLen #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, + GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, + GLint dstY1, GLbitfield mask, GLenum filter); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); #endif #endif /* GL_ANGLE_framebuffer_blit */ @@ -587,22 +698,32 @@ GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GL #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 #define GL_MAX_SAMPLES_ANGLE 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); #endif #endif /* GL_ANGLE_framebuffer_multisample */ #ifndef GL_ANGLE_instanced_arrays #define GL_ANGLE_instanced_arrays 1 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, + GLint first, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, + GLsizei count, GLenum type, const void *indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, + GLuint divisor); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, + GLint first, GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, + GLsizei count, GLenum type, const void *indices, GLsizei primcount); +GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, + GLuint divisor); #endif #endif /* GL_ANGLE_instanced_arrays */ @@ -635,9 +756,11 @@ GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint div #ifndef GL_ANGLE_translated_shader_source #define GL_ANGLE_translated_shader_source 1 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 -typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); +typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) ( + GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); +GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, + GLsizei bufsize, GLsizei *length, GLchar *source); #endif #endif /* GL_ANGLE_translated_shader_source */ @@ -660,9 +783,12 @@ GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLs #ifndef GL_APPLE_copy_texture_levels #define GL_APPLE_copy_texture_levels 1 -typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) ( + GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, + GLsizei sourceLevelCount); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, + GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); #endif #endif /* GL_APPLE_copy_texture_levels */ @@ -675,10 +801,14 @@ GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); #endif #endif /* GL_APPLE_framebuffer_multisample */ @@ -709,21 +839,31 @@ GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); #define GL_WAIT_FAILED_APPLE 0x911D #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, + GLbitfield flags); typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, + GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, + GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, + GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, + GLsizei bufSize, GLsizei *length, GLint *values); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); +GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, + GLbitfield flags); GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, + GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, + GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, + GLint64 *params); +GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, + GLsizei bufSize, GLsizei *length, GLint *values); #endif #endif /* GL_APPLE_sync */ @@ -800,9 +940,15 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei #ifndef GL_EXT_copy_image #define GL_EXT_copy_image 1 -typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, + GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, + GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, + GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, + GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, + GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, + GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); #endif #endif /* GL_EXT_copy_image */ @@ -815,22 +961,30 @@ GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTar #define GL_QUERY_OBJECT_EXT 0x9153 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 #define GL_TRANSFORM_FEEDBACK 0x8E22 -typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, + GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, + GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, + GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, + GLsizei bufSize, GLsizei *length, GLchar *label); #endif #endif /* GL_EXT_debug_label */ #ifndef GL_EXT_debug_marker #define GL_EXT_debug_marker 1 -typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, + const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, + const GLchar *marker); typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, + const GLchar *marker); +GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, + const GLchar *marker); GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); #endif #endif /* GL_EXT_debug_marker */ @@ -840,9 +994,11 @@ GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); #define GL_COLOR_EXT 0x1800 #define GL_DEPTH_EXT 0x1801 #define GL_STENCIL_EXT 0x1802 -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, + GLsizei numAttachments, const GLenum *attachments); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, + GLsizei numAttachments, const GLenum *attachments); #endif #endif /* GL_EXT_discard_framebuffer */ @@ -856,16 +1012,22 @@ GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numA #define GL_TIMESTAMP_EXT 0x8E28 #define GL_GPU_DISJOINT_EXT 0x8FBB typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); +typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, + const GLuint *ids); typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, + GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, + GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, + GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, + GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, + GLenum pname, GLuint64 *params); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); @@ -873,11 +1035,16 @@ GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); +GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, + GLuint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, + GLint64 *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, + GLuint64 *params); #endif #endif /* GL_EXT_disjoint_timer_query */ @@ -917,7 +1084,8 @@ GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, G #define GL_COLOR_ATTACHMENT13_EXT 0x8CED #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, + const GLenum *bufs); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); #endif @@ -929,31 +1097,45 @@ GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); #define GL_MAX 0x8008 typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index); typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, + GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, + GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, + GLenum dst); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, + GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, + GLboolean g, GLboolean b, GLboolean a); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, + GLuint index); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index); GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index); GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst); -GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, + GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, + GLenum dst); +GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, + GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, + GLboolean g, GLboolean b, GLboolean a); GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index); #endif #endif /* GL_EXT_draw_buffers_indexed */ #ifndef GL_EXT_draw_instanced #define GL_EXT_draw_instanced 1 -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, + GLint start, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, + GLsizei count, GLenum type, const void *indices, GLsizei primcount); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, + GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, + GLsizei count, GLenum type, const void *indices, GLsizei primcount); #endif #endif /* GL_EXT_draw_instanced */ @@ -996,9 +1178,11 @@ GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei cou #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 #define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, + GLenum attachment, GLuint texture, GLint level); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, + GLenum attachment, GLuint texture, GLint level); #endif #endif /* GL_EXT_geometry_shader */ @@ -1009,9 +1193,11 @@ GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attac #ifndef GL_EXT_instanced_arrays #define GL_EXT_instanced_arrays 1 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, + GLuint divisor); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, + GLuint divisor); #endif #endif /* GL_EXT_instanced_arrays */ @@ -1023,21 +1209,31 @@ GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divis #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 -typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, + GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, + GLintptr offset, GLsizeiptr length); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, + GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, + GLintptr offset, GLsizeiptr length); #endif #endif /* GL_EXT_map_buffer_range */ #ifndef GL_EXT_multi_draw_arrays #define GL_EXT_multi_draw_arrays 1 -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, + const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, + const GLsizei *count, GLenum type, const void *const *indices, + GLsizei primcount); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); +GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, + const GLint *first, const GLsizei *count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, + const GLsizei *count, GLenum type, const void *const *indices, + GLsizei primcount); #endif #endif /* GL_EXT_multi_draw_arrays */ @@ -1047,11 +1243,18 @@ GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei * #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 #define GL_MAX_SAMPLES_EXT 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) ( + GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples); #endif #endif /* GL_EXT_multisampled_render_to_texture */ @@ -1062,13 +1265,18 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, #define GL_DRAW_BUFFER_EXT 0x0C01 #define GL_READ_BUFFER_EXT 0x0C02 #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 -typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, + GLint index); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, + const GLenum *location, const GLint *indices); +typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, + GLuint index, GLint *data); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); -GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); -GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); +GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, + const GLenum *location, const GLint *indices); +GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, + GLint *data); #endif #endif /* GL_EXT_multiview_draw_buffers */ @@ -1081,9 +1289,13 @@ GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLi #ifndef GL_EXT_primitive_bounding_box #define GL_EXT_primitive_bounding_box 1 #define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE -typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, + GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, + GLfloat maxZ, GLfloat maxW); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, + GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, + GLfloat maxZ, GLfloat maxW); #endif #endif /* GL_EXT_primitive_bounding_box */ @@ -1113,14 +1325,21 @@ GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat min #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 #define GL_NO_RESET_NOTIFICATION_EXT 0x8261 typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, + GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, + void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, + GLint location, GLsizei bufSize, GLfloat *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, + GLint location, GLsizei bufSize, GLint *params); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); -GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, + GLsizei bufSize, GLfloat *params); +GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, + GLsizei bufSize, GLint *params); #endif #endif /* GL_EXT_robustness */ @@ -1145,95 +1364,185 @@ GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF #define GL_PROGRAM_SEPARABLE_EXT 0x8258 #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A -typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); +typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, + GLuint program); typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, + GLsizei count, const GLchar **strings); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, + const GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, + GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) ( + GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, + GLenum pname, GLint *params); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) ( + GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, + GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, + GLint location, GLfloat v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, + GLint location, GLint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, + GLint location, GLfloat v0, GLfloat v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, + GLint location, GLint v0, GLint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, + GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, + GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, + GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, + GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, + GLbitfield stages, GLuint program); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) ( + GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, + GLint location, GLuint v0); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, + GLint location, GLuint v0, GLuint v1); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, + GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, + GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, + GLint location, GLsizei count, const GLuint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) ( + GLuint program, GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) ( + GLuint program, GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) ( + GLuint program, GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) ( + GLuint program, GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) ( + GLuint program, GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) ( + GLuint program, GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); +GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, + GLuint program); GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, + GLsizei count, const GLchar **strings); +GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, + const GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, + GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, + GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, + GLenum pname, GLint *params); GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); +GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, + GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, + GLint location, GLfloat v0); +GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, + GLint location, GLint v0); +GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, + GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, + GLint location, GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, + GLint location, GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, + GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, + GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, + GLint location, GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, + GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, + GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, + GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, + GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, + GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, + GLbitfield stages, GLuint program); GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, + GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, + GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, + GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, + GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); #endif #endif /* GL_EXT_separate_shader_objects */ @@ -1322,7 +1631,8 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin #define GL_TESS_EVALUATION_SHADER_EXT 0x8E87 #define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008 #define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010 -typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, + GLint value); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value); #endif @@ -1332,23 +1642,39 @@ GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value); #define GL_EXT_texture_border_clamp 1 #define GL_TEXTURE_BORDER_COLOR_EXT 0x1004 #define GL_CLAMP_TO_BORDER_EXT 0x812D -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, + GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, + GLenum pname, const GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, + GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, + GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, + GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, + GLenum pname, const GLuint *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, + GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, + GLenum pname, GLuint *params); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, + const GLint *params); +GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, + const GLuint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, + GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, + GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, + GLenum pname, const GLuint *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, + GLenum pname, GLuint *params); #endif #endif /* GL_EXT_texture_border_clamp */ @@ -1368,11 +1694,15 @@ GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum #define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 #define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D #define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E -typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, + GLenum internalformat, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, + GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); -GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, + GLenum internalformat, GLuint buffer); +GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, + GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); #endif #endif /* GL_EXT_texture_buffer */ @@ -1442,19 +1772,36 @@ GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalf #define GL_LUMINANCE_ALPHA16F_EXT 0x881F #define GL_R32F_EXT 0x822E #define GL_RG32F_EXT 0x8230 -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, + GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width); +GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, + GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); #endif #endif /* GL_EXT_texture_storage */ @@ -1470,9 +1817,13 @@ GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target #define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD #define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, + GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, + GLuint numlevels, GLuint minlayer, GLuint numlayers); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, + GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers); #endif #endif /* GL_EXT_texture_view */ @@ -1494,11 +1845,18 @@ GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLu #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 #define GL_MAX_SAMPLES_IMG 0x9135 #define GL_TEXTURE_SAMPLES_IMG 0x9136 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) ( + GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples); #endif #endif /* GL_IMG_multisampled_render_to_texture */ @@ -1555,26 +1913,46 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, #define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF #define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); +typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, + GLuint *queryHandle); typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); -typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); -typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); -typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, + GLuint *nextQueryId); +typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, + GLuint counterId, GLuint counterNameLength, GLchar *counterName, + GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, + GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, + GLuint64 *rawCounterMaxValue); +typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, + GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) ( + GLchar *queryName, GLuint *queryId); +typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, + GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, + GLuint *noInstances, GLuint *capsMask); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); -GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); +GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, + GLuint *queryHandle); GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); -GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); -GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); -GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); +GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, + GLuint *nextQueryId); +GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, + GLuint counterId, GLuint counterNameLength, GLchar *counterName, + GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, + GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, + GLuint64 *rawCounterMaxValue); +GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, + GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, + GLuint *queryId); +GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, + GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, + GLuint *noInstances, GLuint *capsMask); #endif #endif /* GL_INTEL_performance_query */ @@ -1629,7 +2007,8 @@ GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint quer #define GL_UNCORRELATED_NV 0x9282 #define GL_VIVIDLIGHT_NV 0x92A6 #define GL_XOR_NV 0x1506 -typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, + GLint value); typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value); @@ -1646,9 +2025,11 @@ GL_APICALL void GL_APIENTRY glBlendBarrierNV (void); #define GL_NV_copy_buffer 1 #define GL_COPY_READ_BUFFER_NV 0x8F36 #define GL_COPY_WRITE_BUFFER_NV 0x8F37 -typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, + GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, + GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); #endif #endif /* GL_NV_copy_buffer */ @@ -1711,7 +2092,8 @@ GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); #define GL_COLOR_ATTACHMENT13_NV 0x8CED #define GL_COLOR_ATTACHMENT14_NV 0x8CEE #define GL_COLOR_ATTACHMENT15_NV 0x8CEF -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, + const GLenum *bufs); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); #endif @@ -1719,11 +2101,15 @@ GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); #ifndef GL_NV_draw_instanced #define GL_NV_draw_instanced 1 -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, + GLint first, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, + GLsizei count, GLenum type, const void *indices, GLsizei primcount); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, + GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, + GLsizei count, GLenum type, const void *indices, GLsizei primcount); #endif #endif /* GL_NV_draw_instanced */ @@ -1741,19 +2127,23 @@ GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei coun #define GL_ALL_COMPLETED_NV 0x84F2 #define GL_FENCE_STATUS_NV 0x84F3 #define GL_FENCE_CONDITION_NV 0x84F4 -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, + const GLuint *fences); typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, + GLint *params); typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, + GLenum condition); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); -GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, + GLint *params); GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence); GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); #endif @@ -1765,9 +2155,13 @@ GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, + GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, + GLint dstY1, GLbitfield mask, GLenum filter); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); #endif #endif /* GL_NV_framebuffer_blit */ @@ -1776,9 +2170,12 @@ GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 #define GL_MAX_SAMPLES_NV 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLsizei height); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); #endif #endif /* GL_NV_framebuffer_multisample */ @@ -1789,9 +2186,11 @@ GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, G #ifndef GL_NV_instanced_arrays #define GL_NV_instanced_arrays 1 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); +typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, + GLuint divisor); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, + GLuint divisor); #endif #endif /* GL_NV_instanced_arrays */ @@ -1803,19 +2202,31 @@ GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint diviso #define GL_FLOAT_MAT3x4_NV 0x8B68 #define GL_FLOAT_MAT4x2_NV 0x8B69 #define GL_FLOAT_MAT4x3_NV 0x8B6A -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value); #endif #endif /* GL_NV_non_square_matrices */ @@ -1903,13 +2314,20 @@ GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); #ifndef GL_QCOM_driver_control #define GL_QCOM_driver_control 1 -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, + GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) ( + GLuint driverControl, GLsizei bufSize, GLsizei *length, + GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) ( + GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) ( + GLuint driverControl); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, + GLuint *driverControls); +GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, + GLsizei bufSize, GLsizei *length, GLchar *driverControlString); GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); #endif @@ -1928,37 +2346,62 @@ GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); #define GL_TEXTURE_TARGET_QCOM 0x8BDA #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB #define GL_STATE_RESTORE 0x8BDC -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, + GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, + GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) ( + GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) ( + GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) ( + GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) ( + GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, + void **params); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); -GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params); +GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, + GLint maxTextures, GLint *numTextures); +GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, + GLint maxBuffers, GLint *numBuffers); +GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, + GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, + GLint maxFramebuffers, GLint *numFramebuffers); +GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, + GLenum face, GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, + GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, void *texels); +GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, + void **params); #endif #endif /* GL_QCOM_extended_get */ #ifndef GL_QCOM_extended_get2 #define GL_QCOM_extended_get2 1 -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, + GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, + GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) ( + GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) ( + GLuint program, GLenum shadertype, GLchar *source, GLint *length); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, + GLint maxShaders, GLint *numShaders); +GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, + GLint maxPrograms, GLint *numPrograms); GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, + GLenum shadertype, GLchar *source, GLint *length); #endif #endif /* GL_QCOM_extended_get2 */ @@ -2001,10 +2444,12 @@ GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLe #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, + GLuint width, GLuint height, GLbitfield preserveMask); typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, + GLuint height, GLbitfield preserveMask); GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); #endif #endif /* GL_QCOM_tiled_rendering */ @@ -2036,13 +2481,18 @@ GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); #ifndef GL_IMG_texture_stream2 #define GL_IMG_texture_stream2 1 -typedef void (GL_APIENTRYP PFNGLTEXBINDSTREAMIMGPROC) (GLint device, GLint deviceoffset); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETTEXSTREAMDEVICENAMEIMGPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETTEXSTREAMDEVICEATTRIBUTEIVIMGPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXBINDSTREAMIMGPROC) (GLint device, + GLint deviceoffset); +typedef const GLubyte *(GL_APIENTRYP PFNGLGETTEXSTREAMDEVICENAMEIMGPROC) ( + GLenum target); +typedef void (GL_APIENTRYP PFNGLGETTEXSTREAMDEVICEATTRIBUTEIVIMGPROC) ( + GLenum target, GLenum pname, GLint *params); #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexBindStreamIMG(GLint device, GLint deviceoffset); -GL_APICALL void GL_APIENTRY glGetTexStreamDeviceAttributeivIMG(GLint device, GLenum pname, GLint *params); -GL_APICALL const GLubyte * GL_APIENTRY glGetTexStreamDeviceNameIMG(GLint device); +GL_APICALL void GL_APIENTRY glTexBindStreamIMG(GLint device, + GLint deviceoffset); +GL_APICALL void GL_APIENTRY glGetTexStreamDeviceAttributeivIMG(GLint device, + GLenum pname, GLint *params); +GL_APICALL const GLubyte *GL_APIENTRY glGetTexStreamDeviceNameIMG(GLint device); #endif #endif /* GL_IMG_texture_stream2 */ diff --git a/include_KHR/GLES3/gl3.h b/include_KHR/GLES3/gl3.h index e3a52f8..769b19c 100644 --- a/include_KHR/GLES3/gl3.h +++ b/include_KHR/GLES3/gl3.h @@ -376,84 +376,130 @@ typedef khronos_uint8_t GLubyte; #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, + const GLchar *name); GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, + GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, + GLuint renderbuffer); GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha); GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, + GLenum modeAlpha); GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, + GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, + const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, + GLsizeiptr size, const void *data); GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha); GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha); GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, + GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, + const GLuint *framebuffers); GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, + const GLuint *renderbuffers); GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, + const GLuint *textures); GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); GL_APICALL void GL_APIENTRY glDisable (GLenum cap); GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, + GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, + GLenum type, const void *indices); GL_APICALL void GL_APIENTRY glEnable (GLenum cap); GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); GL_APICALL void GL_APIENTRY glFinish (void); GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level); GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, + GLuint *renderbuffers); GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, + GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, + const GLchar *name); GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, + GLint *params); GL_APICALL GLenum GL_APIENTRY glGetError (void); GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv ( + GLenum target, GLenum attachment, GLenum pname, GLint *params); GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, + GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, + GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *source); GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, + GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, + const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, + GLenum pname, void **pointer); GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); @@ -466,56 +512,93 @@ GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, void *pixels); GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, + const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, + const GLchar *const *string, const GLint *length); GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, + GLint ref, GLuint mask); GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, + GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, + GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, + GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, + const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, + GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, + const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const void *pixels); GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, + const GLfloat *value); GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, + GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, + const GLfloat *value); GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, + GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, + GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, + GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, + GLfloat y); GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, + GLfloat y, GLfloat z); GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w); GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, + GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, + GLsizei height); #endif /* GL_ES_VERSION_2_0 */ #ifndef GL_ES_VERSION_3_0 @@ -827,109 +910,195 @@ typedef unsigned short GLhalf; #define GL_NUM_SAMPLE_COUNTS 0x9380 #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); -GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const void *data); GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, + GLuint *params); GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, + void **params); GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, + GLintptr offset, GLsizeiptr length); GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, + const GLuint *arrays); GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, + GLint *data); GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); -GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, + GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, + GLuint buffer); +GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, + GLsizei count, const GLchar *const *varyings, GLenum bufferMode); +GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, + GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name); +GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, + GLenum type, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, + GLuint *params); +GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, + GLint z, GLint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, + GLuint y, GLuint z, GLuint w); GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, + GLuint *params); +GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, + const GLchar *name); GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, + GLuint v2); +GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, + GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, + const GLint *value); +GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, + const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil); GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); -GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, + GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, + GLsizei uniformCount, const GLchar *const *uniformNames, + GLuint *uniformIndices); +GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, + GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, + GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, + const GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, + GLuint uniformBlockIndex, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, + GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, + GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, + GLsizei count, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, + GLenum type, const void *indices, GLsizei instancecount); GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, + GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, + GLuint64 timeout); GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, + GLsizei bufSize, GLsizei *length, GLint *values); +GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, + GLint64 *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, + GLenum pname, GLint64 *params); GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, + const GLuint *samplers); GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, + GLint param); +GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, + const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, + GLfloat param); +GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, + const GLfloat *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, + GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, + GLuint divisor); GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, + const GLuint *ids); GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); -GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, + GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, + GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, + GLint value); +GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, + GLsizei numAttachments, const GLenum *attachments); +GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, + GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, + GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); #endif /* GL_ES_VERSION_3_0 */ #ifdef __cplusplus diff --git a/include_KHR/GLES3/gl31.h b/include_KHR/GLES3/gl31.h index ca811ec..0ea4a10 100644 --- a/include_KHR/GLES3/gl31.h +++ b/include_KHR/GLES3/gl31.h @@ -376,84 +376,130 @@ typedef khronos_uint8_t GLubyte; #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, + const GLchar *name); GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, + GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, + GLuint renderbuffer); GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha); GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, + GLenum modeAlpha); GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, + GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, + const void *data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, + GLsizeiptr size, const void *data); GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha); GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha); GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, + GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, + GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, + const GLuint *framebuffers); GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, + const GLuint *renderbuffers); GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, + const GLuint *textures); GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); GL_APICALL void GL_APIENTRY glDisable (GLenum cap); GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, + GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, + GLenum type, const void *indices); GL_APICALL void GL_APIENTRY glEnable (GLenum cap); GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); GL_APICALL void GL_APIENTRY glFinish (void); GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level); GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, + GLuint *renderbuffers); GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, + GLsizei maxCount, GLsizei *count, GLuint *shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, + const GLchar *name); GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, + GLint *params); GL_APICALL GLenum GL_APIENTRY glGetError (void); GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv ( + GLenum target, GLenum attachment, GLenum pname, GLint *params); GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, + GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, + GLenum precisiontype, GLint *range, GLint *precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *source); GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, + GLint *params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, + const GLchar *name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, + GLfloat *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, + GLenum pname, void **pointer); GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); @@ -466,56 +512,93 @@ GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, void *pixels); GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, + const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, + const GLchar *const *string, const GLint *length); GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, + GLint ref, GLuint mask); GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, + GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, + GLenum dpfail, GLenum dppass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, + GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, + const GLfloat *params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, + GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, + const GLint *params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const void *pixels); GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, + const GLfloat *value); GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, + GLfloat v1); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, + const GLfloat *value); GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, + GLfloat v2); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, + GLint v2); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, + GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, + GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, + const GLint *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, + GLfloat y); GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, + GLfloat y, GLfloat z); GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w); GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, + GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, + GLsizei height); #endif /* GL_ES_VERSION_2_0 */ #ifndef GL_ES_VERSION_3_0 @@ -827,109 +910,195 @@ typedef unsigned short GLhalf; #define GL_NUM_SAMPLE_COUNTS 0x9380 #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); -GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const void *indices); +GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, const void *pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const void *data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const void *data); GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, + GLuint *params); GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); +GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, + void **params); GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, + GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, + GLintptr offset, GLsizeiptr length); GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, + const GLuint *arrays); GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, + GLint *data); GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); -GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, + GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, + GLuint buffer); +GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, + GLsizei count, const GLchar *const *varyings, GLenum bufferMode); +GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, + GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name); +GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, + GLenum type, GLsizei stride, const void *pointer); +GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, + GLint *params); +GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, + GLuint *params); +GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, + GLint z, GLint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, + GLuint y, GLuint z, GLuint w); GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, + GLuint *params); +GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, + const GLchar *name); GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, + GLuint v2); +GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, + GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, + const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, + const GLint *value); +GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, + const GLuint *value); +GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, + const GLfloat *value); +GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil); GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); -GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, + GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, + GLsizei uniformCount, const GLchar *const *uniformNames, + GLuint *uniformIndices); +GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, + GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, + GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, + const GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, + GLuint uniformBlockIndex, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, + GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName); +GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, + GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, + GLsizei count, GLsizei instancecount); +GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, + GLenum type, const void *indices, GLsizei instancecount); GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, + GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, + GLuint64 timeout); GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, + GLsizei bufSize, GLsizei *length, GLint *values); +GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, + GLint64 *data); +GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, + GLenum pname, GLint64 *params); GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); +GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, + const GLuint *samplers); GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, + GLint param); +GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, + const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, + GLfloat param); +GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, + const GLfloat *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, + GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, + GLuint divisor); GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, + const GLuint *ids); GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); -GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, + GLsizei *length, GLenum *binaryFormat, void *binary); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, + GLenum binaryFormat, const void *binary, GLsizei length); +GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, + GLint value); +GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, + GLsizei numAttachments, const GLenum *attachments); +GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, + GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, + GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); #endif /* GL_ES_VERSION_3_0 */ #ifndef GL_ES_VERSION_3_1 @@ -1107,74 +1276,138 @@ GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum interna #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA #define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, + GLuint num_groups_y, GLuint num_groups_z); GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); -GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); -GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); -GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); +GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, + const void *indirect); +GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, + const void *indirect); +GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, + GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, + GLenum programInterface, GLenum pname, GLint *params); +GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, + GLenum programInterface, const GLchar *name); +GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, + GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, + GLchar *name); +GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, + GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, + GLsizei bufSize, GLsizei *length, GLint *params); +GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, + GLenum programInterface, const GLchar *name); +GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, + GLbitfield stages, GLuint program); +GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, + GLuint program); +GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, + GLsizei count, const GLchar *const *strings); GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, + const GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, + GLuint *pipelines); GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, + GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, + GLint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, + GLint v0, GLint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, + GLint v0, GLint v1, GLint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, + GLint v0, GLint v1, GLint v2, GLint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, + GLuint v0); +GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, + GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, + GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, + GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, + GLfloat v0); +GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, + GLfloat v0, GLfloat v1); +GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, + GLfloat v0, GLfloat v1, GLfloat v2); +GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, + GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, + GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, + GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, + GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, + GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, + GLint location, GLsizei count, const GLuint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, + GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, + GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, + GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, + GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, + GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, + GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, + GLboolean *data); GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); -GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations); +GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, + GLfloat *val); GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); -GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); -GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); +GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, + GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, + GLint level, GLenum pname, GLfloat *params); +GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, + GLuint buffer, GLintptr offset, GLsizei stride); +GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, + GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, + GLint size, GLenum type, GLuint relativeoffset); +GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, + GLuint bindingindex); +GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, + GLuint divisor); #endif /* GL_ES_VERSION_3_1 */ #ifdef __cplusplus diff --git a/include_KHR/KHR/khrplatform.h b/include_KHR/KHR/khrplatform.h index c9e6f17..0870b0b 100644 --- a/include_KHR/KHR/khrplatform.h +++ b/include_KHR/KHR/khrplatform.h @@ -112,7 +112,7 @@ * name in the function prototype. */ #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ +/* Win32 but not WinCE */ # define KHRONOS_APIENTRY __stdcall #else # define KHRONOS_APIENTRY @@ -223,7 +223,7 @@ typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; /* - * Types that differ between LLP64 and LP64 architectures - in LLP64, + * Types that differ between LLP64 and LP64 architectures - in LLP64, * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears * to be the only LLP64 architecture in current use. */ @@ -274,9 +274,9 @@ typedef khronos_int64_t khronos_stime_nanoseconds_t; * comparisons should not be made against KHRONOS_TRUE. */ typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM } khronos_boolean_enum_t; #endif /* __khrplatform_h_ */ diff --git a/src/coregl.c b/src/coregl.c index 891f264..bb515e5 100644 --- a/src/coregl.c +++ b/src/coregl.c @@ -11,8 +11,8 @@ void *egl_lib_handle; void *gl_lib_handle; -int driver_gl_version=COREGL_GLAPI_2; -static int api_gl_version=COREGL_GLAPI_2; +int driver_gl_version = COREGL_GLAPI_2; +static int api_gl_version = COREGL_GLAPI_2; #ifndef _COREGL_VENDOR_EGL_LIB_PATH #define _COREGL_VENDOR_EGL_LIB_PATH "/usr/lib/driver/libEGL.so" /* DEFAULT EGL PATH */ @@ -44,8 +44,7 @@ cleanup_current_thread_state() tstate = get_current_thread_state(); - if (tstate != NULL) - { + if (tstate != NULL) { COREGL_LOG("[COREGL] de-init thread state \n"); deinit_modules_tstate(tstate); remove_from_general_trace_list(&thread_trace_list, tstate); @@ -150,49 +149,44 @@ _gl_lib_init(void) //------------------------------------------------// // Open EGL Library as EGL is separate egl_lib_handle = dlopen(_COREGL_VENDOR_EGL_LIB_PATH, RTLD_LAZY | RTLD_LOCAL); - if (!egl_lib_handle) - { + if (!egl_lib_handle) { COREGL_ERR("\E[40;31;1m%s\E[0m\n\n", dlerror()); - COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", _COREGL_VENDOR_EGL_LIB_PATH); + COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", + _COREGL_VENDOR_EGL_LIB_PATH); return 0; } // test for invalid linking egl - if (dlsym(egl_lib_handle, "coregl_symbol_exported")) - { - COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", _COREGL_VENDOR_EGL_LIB_PATH); + if (dlsym(egl_lib_handle, "coregl_symbol_exported")) { + COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", + _COREGL_VENDOR_EGL_LIB_PATH); return 0; } // use gl_lib handle for GL symbols gl_lib_handle = dlopen(_COREGL_VENDOR_GL_LIB_PATH, RTLD_LAZY | RTLD_LOCAL); - if (!gl_lib_handle) - { + if (!gl_lib_handle) { COREGL_ERR("\E[40;31;1m%s\E[0m\n\n", dlerror()); - COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", _COREGL_VENDOR_GL_LIB_PATH); + COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", + _COREGL_VENDOR_GL_LIB_PATH); return 0; } // test for invalid linking gl - if (dlsym(gl_lib_handle, "coregl_symbol_exported")) - { - COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", _COREGL_VENDOR_GL_LIB_PATH); + if (dlsym(gl_lib_handle, "coregl_symbol_exported")) { + COREGL_ERR("\E[40;31;1mInvalid library link! (Check linkage of libCOREGL -> %s)\E[0m\n", + _COREGL_VENDOR_GL_LIB_PATH); return 0; } // test for a GLES 3.0 symbol - if (dlsym(gl_lib_handle, "glBindProgramPipeline")) - { + if (dlsym(gl_lib_handle, "glBindProgramPipeline")) { COREGL_LOG("[CoreGL] Driver GL version 3.1 \n"); driver_gl_version = COREGL_GLAPI_31; - } - else if (dlsym(gl_lib_handle, "glReadBuffer")) - { + } else if (dlsym(gl_lib_handle, "glReadBuffer")) { COREGL_LOG("[CoreGL] Driver GL version 3.0 \n"); driver_gl_version = COREGL_GLAPI_3; - } - else - { + } else { COREGL_LOG("[CoreGL] Driver GL version 2.0 \n"); } @@ -216,7 +210,8 @@ _gl_lib_deinit(void) int coregl_initialize() { - COREGL_LOG("[CoreGL] <%d> (%s) Library initializing...", getpid(), _COREGL_COMPILE_DATE); + COREGL_LOG("[CoreGL] <%d> (%s) Library initializing...", getpid(), + _COREGL_COMPILE_DATE); if (!_gl_lib_init()) return 0; @@ -233,8 +228,7 @@ __attribute__((destructor)) void coregl_terminate() { - if (export_initialized != 0) - { + if (export_initialized != 0) { deinit_modules(); _gl_lib_deinit(); diff --git a/src/coregl_export_egl.c b/src/coregl_export_egl.c index b8ae001..02fe9b2 100644 --- a/src/coregl_export_egl.c +++ b/src/coregl_export_egl.c @@ -37,7 +37,7 @@ coregl_api_eglGetDisplay(EGLNativeDisplayType display_id) } EGLBoolean -coregl_api_eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) +coregl_api_eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { INIT_EXPORT(); if (!export_initialized) @@ -57,7 +57,8 @@ coregl_api_eglTerminate(EGLDisplay dpy) } EGLBoolean -coregl_api_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) +coregl_api_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, + EGLint *num_config) { INIT_EXPORT(); if (!export_initialized) @@ -67,7 +68,8 @@ coregl_api_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, } EGLBoolean -coregl_api_eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) +coregl_api_eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, + EGLConfig *configs, EGLint config_size, EGLint *num_config) { INIT_EXPORT(); if (!export_initialized) @@ -77,7 +79,8 @@ coregl_api_eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* } EGLBoolean -coregl_api_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) +coregl_api_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, + EGLint attribute, EGLint *value) { INIT_EXPORT(); if (!export_initialized) @@ -88,7 +91,8 @@ coregl_api_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute EGLSurface -coregl_api_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) +coregl_api_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, const EGLint *attrib_list) { INIT_EXPORT(); if (!export_initialized) @@ -98,7 +102,8 @@ coregl_api_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWin } EGLSurface -coregl_api_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) +coregl_api_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list) { INIT_EXPORT(); if (!export_initialized) @@ -108,7 +113,8 @@ coregl_api_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLin } EGLSurface -coregl_api_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) +coregl_api_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, const EGLint *attrib_list) { INIT_EXPORT(); if (!export_initialized) @@ -128,7 +134,8 @@ coregl_api_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) } EGLBoolean -coregl_api_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) +coregl_api_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, + EGLint *value) { INIT_EXPORT(); if (!export_initialized) @@ -178,17 +185,20 @@ coregl_api_eglReleaseThread(void) } EGLSurface -coregl_api_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) +coregl_api_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, + EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) { INIT_EXPORT(); if (!export_initialized) return EGL_NO_SURFACE; else - return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); + return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, + attrib_list); } EGLBoolean -coregl_api_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) +coregl_api_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint value) { INIT_EXPORT(); if (!export_initialized) @@ -228,7 +238,8 @@ coregl_api_eglSwapInterval(EGLDisplay dpy, EGLint interval) } EGLContext -coregl_api_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) +coregl_api_eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, const EGLint *attrib_list) { INIT_EXPORT(); if (!export_initialized) @@ -248,7 +259,8 @@ coregl_api_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) } EGLBoolean -coregl_api_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) +coregl_api_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, + EGLContext ctx) { INIT_EXPORT(); if (!export_initialized) @@ -288,7 +300,8 @@ coregl_api_eglGetCurrentDisplay(void) } EGLBoolean -coregl_api_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) +coregl_api_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, + EGLint *value) { INIT_EXPORT(); if (!export_initialized) @@ -327,7 +340,8 @@ coregl_api_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) } EGLBoolean -coregl_api_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) +coregl_api_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target) { INIT_EXPORT(); if (!export_initialized) @@ -337,7 +351,7 @@ coregl_api_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapTyp } _eng_fn -coregl_api_eglGetProcAddress(const char* procname) +coregl_api_eglGetProcAddress(const char *procname) { INIT_EXPORT(); if (!export_initialized) diff --git a/src/coregl_export_gl.c b/src/coregl_export_gl.c index c4c8dd7..90f219e 100644 --- a/src/coregl_export_gl.c +++ b/src/coregl_export_gl.c @@ -13,7 +13,7 @@ coregl_api_glAttachShader(GLuint program, GLuint shader) } void -coregl_api_glBindAttribLocation(GLuint program, GLuint index, const char* name) +coregl_api_glBindAttribLocation(GLuint program, GLuint index, const char *name) { ovr_glBindAttribLocation(program, index, name); } @@ -43,7 +43,8 @@ coregl_api_glBindTexture(GLenum target, GLuint texture) } void -coregl_api_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +coregl_api_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha) { ovr_glBlendColor(red, green, blue, alpha); } @@ -67,19 +68,22 @@ coregl_api_glBlendFunc(GLenum sfactor, GLenum dfactor) } void -coregl_api_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +coregl_api_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha) { ovr_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); } void -coregl_api_glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) +coregl_api_glBufferData(GLenum target, GLsizeiptr size, const void *data, + GLenum usage) { ovr_glBufferData(target, size, data, usage); } void -coregl_api_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) +coregl_api_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, + const void *data) { ovr_glBufferSubData(target, offset, size, data); } @@ -97,7 +101,8 @@ coregl_api_glClear(GLbitfield mask) } void -coregl_api_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +coregl_api_glClearColor(GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha) { ovr_glClearColor(red, green, blue, alpha); } @@ -115,7 +120,8 @@ coregl_api_glClearStencil(GLint s) } void -coregl_api_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +coregl_api_glColorMask(GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha) { ovr_glColorMask(red, green, blue, alpha); } @@ -127,25 +133,34 @@ coregl_api_glCompileShader(GLuint shader) } void -coregl_api_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) +coregl_api_glCompressedTexImage2D(GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data) { - ovr_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); + ovr_glCompressedTexImage2D(target, level, internalformat, width, height, border, + imageSize, data); } void -coregl_api_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) +coregl_api_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, + const void *data) { - ovr_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); + ovr_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, + format, imageSize, data); } void -coregl_api_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +coregl_api_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - ovr_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + ovr_glCopyTexImage2D(target, level, internalformat, x, y, width, height, + border); } void -coregl_api_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +coregl_api_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { ovr_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } @@ -169,13 +184,13 @@ coregl_api_glCullFace(GLenum mode) } void -coregl_api_glDeleteBuffers(GLsizei n, const GLuint* buffers) +coregl_api_glDeleteBuffers(GLsizei n, const GLuint *buffers) { ovr_glDeleteBuffers(n, buffers); } void -coregl_api_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) +coregl_api_glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) { ovr_glDeleteFramebuffers(n, framebuffers); } @@ -187,7 +202,7 @@ coregl_api_glDeleteProgram(GLuint program) } void -coregl_api_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) +coregl_api_glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) { ovr_glDeleteRenderbuffers(n, renderbuffers); } @@ -199,7 +214,7 @@ coregl_api_glDeleteShader(GLuint shader) } void -coregl_api_glDeleteTextures(GLsizei n, const GLuint* textures) +coregl_api_glDeleteTextures(GLsizei n, const GLuint *textures) { ovr_glDeleteTextures(n, textures); } @@ -247,7 +262,8 @@ coregl_api_glDrawArrays(GLenum mode, GLint first, GLsizei count) } void -coregl_api_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) +coregl_api_glDrawElements(GLenum mode, GLsizei count, GLenum type, + const void *indices) { ovr_glDrawElements(mode, count, type, indices); } @@ -277,13 +293,16 @@ coregl_api_glFlush(void) } void -coregl_api_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +coregl_api_glFramebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { - ovr_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + ovr_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, + renderbuffer); } void -coregl_api_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +coregl_api_glFramebufferTexture2D(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level) { ovr_glFramebufferTexture2D(target, attachment, textarget, texture, level); } @@ -295,19 +314,19 @@ coregl_api_glFrontFace(GLenum mode) } void -coregl_api_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) +coregl_api_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) { ovr_glGetVertexAttribfv(index, pname, params); } void -coregl_api_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) +coregl_api_glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) { ovr_glGetVertexAttribiv(index, pname, params); } void -coregl_api_glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) +coregl_api_glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) { ovr_glGetVertexAttribPointerv(index, pname, pointer); } @@ -319,7 +338,7 @@ coregl_api_glHint(GLenum target, GLenum mode) } void -coregl_api_glGenBuffers(GLsizei n, GLuint* buffers) +coregl_api_glGenBuffers(GLsizei n, GLuint *buffers) { ovr_glGenBuffers(n, buffers); } @@ -331,55 +350,58 @@ coregl_api_glGenerateMipmap(GLenum target) } void -coregl_api_glGenFramebuffers(GLsizei n, GLuint* framebuffers) +coregl_api_glGenFramebuffers(GLsizei n, GLuint *framebuffers) { ovr_glGenFramebuffers(n, framebuffers); } void -coregl_api_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) +coregl_api_glGenRenderbuffers(GLsizei n, GLuint *renderbuffers) { ovr_glGenRenderbuffers(n, renderbuffers); } void -coregl_api_glGenTextures(GLsizei n, GLuint* textures) +coregl_api_glGenTextures(GLsizei n, GLuint *textures) { ovr_glGenTextures(n, textures); } void -coregl_api_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +coregl_api_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { ovr_glGetActiveAttrib(program, index, bufsize, length, size, type, name); } void -coregl_api_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +coregl_api_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { ovr_glGetActiveUniform(program, index, bufsize, length, size, type, name); } void -coregl_api_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +coregl_api_glGetAttachedShaders(GLuint program, GLsizei maxcount, + GLsizei *count, GLuint *shaders) { ovr_glGetAttachedShaders(program, maxcount, count, shaders); } int -coregl_api_glGetAttribLocation(GLuint program, const char* name) +coregl_api_glGetAttribLocation(GLuint program, const char *name) { return ovr_glGetAttribLocation(program, name); } void -coregl_api_glGetBooleanv(GLenum pname, GLboolean* params) +coregl_api_glGetBooleanv(GLenum pname, GLboolean *params) { ovr_glGetBooleanv(pname, params); } void -coregl_api_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) +coregl_api_glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) { ovr_glGetBufferParameteriv(target, pname, params); } @@ -391,61 +413,67 @@ coregl_api_glGetError(void) } void -coregl_api_glGetFloatv(GLenum pname, GLfloat* params) +coregl_api_glGetFloatv(GLenum pname, GLfloat *params) { ovr_glGetFloatv(pname, params); } void -coregl_api_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) +coregl_api_glGetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, GLenum pname, GLint *params) { ovr_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); } void -coregl_api_glGetIntegerv(GLenum pname, GLint* params) +coregl_api_glGetIntegerv(GLenum pname, GLint *params) { ovr_glGetIntegerv(pname, params); } void -coregl_api_glGetProgramiv(GLuint program, GLenum pname, GLint* params) +coregl_api_glGetProgramiv(GLuint program, GLenum pname, GLint *params) { ovr_glGetProgramiv(program, pname, params); } void -coregl_api_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) +coregl_api_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, + char *infolog) { ovr_glGetProgramInfoLog(program, bufsize, length, infolog); } void -coregl_api_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) +coregl_api_glGetRenderbufferParameteriv(GLenum target, GLenum pname, + GLint *params) { ovr_glGetRenderbufferParameteriv(target, pname, params); } void -coregl_api_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) +coregl_api_glGetShaderiv(GLuint shader, GLenum pname, GLint *params) { ovr_glGetShaderiv(shader, pname, params); } void -coregl_api_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) +coregl_api_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, + char *infolog) { ovr_glGetShaderInfoLog(shader, bufsize, length, infolog); } void -coregl_api_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +coregl_api_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, + GLint *range, GLint *precision) { ovr_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); } void -coregl_api_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) +coregl_api_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, + char *source) { ovr_glGetShaderSource(shader, bufsize, length, source); } @@ -457,31 +485,31 @@ coregl_api_glGetString(GLenum name) } void -coregl_api_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) +coregl_api_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) { ovr_glGetTexParameterfv(target, pname, params); } void -coregl_api_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) +coregl_api_glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) { ovr_glGetTexParameteriv(target, pname, params); } void -coregl_api_glGetUniformfv(GLuint program, GLint location, GLfloat* params) +coregl_api_glGetUniformfv(GLuint program, GLint location, GLfloat *params) { ovr_glGetUniformfv(program, location, params); } void -coregl_api_glGetUniformiv(GLuint program, GLint location, GLint* params) +coregl_api_glGetUniformiv(GLuint program, GLint location, GLint *params) { ovr_glGetUniformiv(program, location, params); } int -coregl_api_glGetUniformLocation(GLuint program, const char* name) +coregl_api_glGetUniformLocation(GLuint program, const char *name) { return ovr_glGetUniformLocation(program, name); } @@ -553,7 +581,8 @@ coregl_api_glPolygonOffset(GLfloat factor, GLfloat units) } void -coregl_api_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) +coregl_api_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, void *pixels) { ovr_glReadPixels(x, y, width, height, format, type, pixels); } @@ -565,7 +594,8 @@ coregl_api_glReleaseShaderCompiler(void) } void -coregl_api_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +coregl_api_glRenderbufferStorage(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height) { ovr_glRenderbufferStorage(target, internalformat, width, height); } @@ -583,13 +613,15 @@ coregl_api_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) } void -coregl_api_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +coregl_api_glShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, + const void *binary, GLsizei length) { ovr_glShaderBinary(n, shaders, binaryformat, binary, length); } void -coregl_api_glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) +coregl_api_glShaderSource(GLuint shader, GLsizei count, const char **string, + const GLint *length) { ovr_glShaderSource(shader, count, string, length); } @@ -601,7 +633,8 @@ coregl_api_glStencilFunc(GLenum func, GLint ref, GLuint mask) } void -coregl_api_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) +coregl_api_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, + GLuint mask) { ovr_glStencilFuncSeparate(face, func, ref, mask); } @@ -625,15 +658,19 @@ coregl_api_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) } void -coregl_api_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +coregl_api_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, + GLenum zpass) { ovr_glStencilOpSeparate(face, fail, zfail, zpass); } void -coregl_api_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) +coregl_api_glTexImage2D(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, + const void *pixels) { - ovr_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); + ovr_glTexImage2D(target, level, internalformat, width, height, border, format, + type, pixels); } void @@ -643,7 +680,7 @@ coregl_api_glTexParameterf(GLenum target, GLenum pname, GLfloat param) } void -coregl_api_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) +coregl_api_glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) { ovr_glTexParameterfv(target, pname, params); } @@ -655,15 +692,18 @@ coregl_api_glTexParameteri(GLenum target, GLenum pname, GLint param) } void -coregl_api_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) +coregl_api_glTexParameteriv(GLenum target, GLenum pname, const GLint *params) { ovr_glTexParameteriv(target, pname, params); } void -coregl_api_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) +coregl_api_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, + const void *pixels) { - ovr_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + ovr_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, + type, pixels); } void @@ -673,7 +713,7 @@ coregl_api_glUniform1f(GLint location, GLfloat x) } void -coregl_api_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) +coregl_api_glUniform1fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform1fv(location, count, v); } @@ -685,7 +725,7 @@ coregl_api_glUniform1i(GLint location, GLint x) } void -coregl_api_glUniform1iv(GLint location, GLsizei count, const GLint* v) +coregl_api_glUniform1iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform1iv(location, count, v); } @@ -697,7 +737,7 @@ coregl_api_glUniform2f(GLint location, GLfloat x, GLfloat y) } void -coregl_api_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) +coregl_api_glUniform2fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform2fv(location, count, v); } @@ -709,7 +749,7 @@ coregl_api_glUniform2i(GLint location, GLint x, GLint y) } void -coregl_api_glUniform2iv(GLint location, GLsizei count, const GLint* v) +coregl_api_glUniform2iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform2iv(location, count, v); } @@ -721,7 +761,7 @@ coregl_api_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) } void -coregl_api_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) +coregl_api_glUniform3fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform3fv(location, count, v); } @@ -733,19 +773,20 @@ coregl_api_glUniform3i(GLint location, GLint x, GLint y, GLint z) } void -coregl_api_glUniform3iv(GLint location, GLsizei count, const GLint* v) +coregl_api_glUniform3iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform3iv(location, count, v); } void -coregl_api_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +coregl_api_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, + GLfloat w) { ovr_glUniform4f(location, x, y, z, w); } void -coregl_api_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) +coregl_api_glUniform4fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform4fv(location, count, v); } @@ -757,25 +798,28 @@ coregl_api_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) } void -coregl_api_glUniform4iv(GLint location, GLsizei count, const GLint* v) +coregl_api_glUniform4iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform4iv(location, count, v); } void -coregl_api_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix2fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix2fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix3fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix3fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix4fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix4fv(location, count, transpose, value); } @@ -799,7 +843,7 @@ coregl_api_glVertexAttrib1f(GLuint index, GLfloat x) } void -coregl_api_glVertexAttrib1fv(GLuint index, const GLfloat* values) +coregl_api_glVertexAttrib1fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib1fv(index, values); } @@ -811,7 +855,7 @@ coregl_api_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) } void -coregl_api_glVertexAttrib2fv(GLuint index, const GLfloat* values) +coregl_api_glVertexAttrib2fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib2fv(index, values); } @@ -823,25 +867,27 @@ coregl_api_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) } void -coregl_api_glVertexAttrib3fv(GLuint index, const GLfloat* values) +coregl_api_glVertexAttrib3fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib3fv(index, values); } void -coregl_api_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +coregl_api_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w) { ovr_glVertexAttrib4f(index, x, y, z, w); } void -coregl_api_glVertexAttrib4fv(GLuint index, const GLfloat* values) +coregl_api_glVertexAttrib4fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib4fv(index, values); } void -coregl_api_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) +coregl_api_glVertexAttribPointer(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, const void *pointer) { ovr_glVertexAttribPointer(index, size, type, normalized, stride, pointer); } @@ -860,49 +906,64 @@ coregl_api_glReadBuffer(GLenum mode) } void -coregl_api_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) +coregl_api_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, const GLvoid *indices) { ovr_glDrawRangeElements(mode, start, end, count, type, indices); } void -coregl_api_glTexImage3D(GLenum target, GLint level, GLint GLinternalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) +coregl_api_glTexImage3D(GLenum target, GLint level, GLint GLinternalFormat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, + GLenum type, const GLvoid *pixels) { - ovr_glTexImage3D(target, level, GLinternalFormat, width, height, depth, border, format, type, pixels); + ovr_glTexImage3D(target, level, GLinternalFormat, width, height, depth, border, + format, type, pixels); } void -coregl_api_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) +coregl_api_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const GLvoid *pixels) { - ovr_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + ovr_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, pixels); } void -coregl_api_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +coregl_api_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - ovr_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + ovr_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, + height); } void -coregl_api_glCompressedTexImage3D(GLenum target, GLint level, GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) +coregl_api_glCompressedTexImage3D(GLenum target, GLint level, + GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const GLvoid *data) { - ovr_glCompressedTexImage3D(target, level, GLinternalformat, width, height, depth, border, imageSize, data); + ovr_glCompressedTexImage3D(target, level, GLinternalformat, width, height, + depth, border, imageSize, data); } void -coregl_api_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) +coregl_api_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, const GLvoid *data) { - ovr_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + ovr_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data); } void -coregl_api_glGenQueries(GLsizei n, GLuint* ids) +coregl_api_glGenQueries(GLsizei n, GLuint *ids) { ovr_glGenQueries(n, ids); } void -coregl_api_glDeleteQueries(GLsizei n, const GLuint* ids) +coregl_api_glDeleteQueries(GLsizei n, const GLuint *ids) { ovr_glDeleteQueries(n, ids); } @@ -926,13 +987,13 @@ coregl_api_glEndQuery(GLenum target) } void -coregl_api_glGetQueryiv(GLenum target, GLenum pname, GLint* params) +coregl_api_glGetQueryiv(GLenum target, GLenum pname, GLint *params) { ovr_glGetQueryiv(target, pname, params); } void -coregl_api_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) +coregl_api_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) { ovr_glGetQueryObjectuiv(id, pname, params); } @@ -944,79 +1005,93 @@ coregl_api_glUnmapBuffer(GLenum target) } void -coregl_api_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) +coregl_api_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params) { ovr_glGetBufferPointerv(target, pname, params); } void -coregl_api_glDrawBuffers(GLsizei n, const GLenum* bufs) +coregl_api_glDrawBuffers(GLsizei n, const GLenum *bufs) { ovr_glDrawBuffers(n, bufs); } void -coregl_api_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix2x3fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix2x3fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix3x2fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix3x2fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix2x4fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix2x4fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix4x2fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix4x2fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix3x4fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix3x4fv(location, count, transpose, value); } void -coregl_api_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +coregl_api_glUniformMatrix4x3fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glUniformMatrix4x3fv(location, count, transpose, value); } void -coregl_api_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) +coregl_api_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter) { - ovr_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + ovr_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + mask, filter); } void -coregl_api_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) +coregl_api_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height) { - ovr_glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + ovr_glRenderbufferStorageMultisample(target, samples, internalformat, width, + height); } void -coregl_api_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) +coregl_api_glFramebufferTextureLayer(GLenum target, GLenum attachment, + GLuint texture, GLint level, GLint layer) { ovr_glFramebufferTextureLayer(target, attachment, texture, level, layer); } -GLvoid* -coregl_api_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) +GLvoid * +coregl_api_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access) { return ovr_glMapBufferRange(target, offset, length, access); } void -coregl_api_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) +coregl_api_glFlushMappedBufferRange(GLenum target, GLintptr offset, + GLsizeiptr length) { ovr_glFlushMappedBufferRange(target, offset, length); } @@ -1028,13 +1103,13 @@ coregl_api_glBindVertexArray(GLuint array) } void -coregl_api_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) +coregl_api_glDeleteVertexArrays(GLsizei n, const GLuint *arrays) { ovr_glDeleteVertexArrays(n, arrays); } void -coregl_api_glGenVertexArrays(GLsizei n, GLuint* arrays) +coregl_api_glGenVertexArrays(GLsizei n, GLuint *arrays) { ovr_glGenVertexArrays(n, arrays); } @@ -1046,7 +1121,7 @@ coregl_api_glIsVertexArray(GLuint array) } void -coregl_api_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) +coregl_api_glGetIntegeri_v(GLenum target, GLuint index, GLint *data) { ovr_glGetIntegeri_v(target, index, data); } @@ -1064,7 +1139,8 @@ coregl_api_glEndTransformFeedback() } void -coregl_api_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) +coregl_api_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size) { ovr_glBindBufferRange(target, index, buffer, offset, size); } @@ -1076,31 +1152,35 @@ coregl_api_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) } void -coregl_api_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) +coregl_api_glTransformFeedbackVaryings(GLuint program, GLsizei count, + const GLchar *const *varyings, GLenum bufferMode) { ovr_glTransformFeedbackVaryings(program, count, varyings, bufferMode); } void -coregl_api_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) +coregl_api_glGetTransformFeedbackVarying(GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) { - ovr_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); + ovr_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, + name); } void -coregl_api_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) +coregl_api_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer) { ovr_glVertexAttribIPointer(index, size, type, stride, pointer); } void -coregl_api_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) +coregl_api_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) { ovr_glGetVertexAttribIiv(index, pname, params); } void -coregl_api_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) +coregl_api_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) { ovr_glGetVertexAttribIuiv(index, pname, params); } @@ -1112,25 +1192,26 @@ coregl_api_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) } void -coregl_api_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) +coregl_api_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w) { ovr_glVertexAttribI4ui(index, x, y, z, w); } void -coregl_api_glVertexAttribI4iv(GLuint index, const GLint* v) +coregl_api_glVertexAttribI4iv(GLuint index, const GLint *v) { ovr_glVertexAttribI4iv(index, v); } void -coregl_api_glVertexAttribI4uiv(GLuint index, const GLuint* v) +coregl_api_glVertexAttribI4uiv(GLuint index, const GLuint *v) { ovr_glVertexAttribI4uiv(index, v); } void -coregl_api_glGetUniformuiv(GLuint program, GLint location, GLuint* params) +coregl_api_glGetUniformuiv(GLuint program, GLint location, GLuint *params) { ovr_glGetUniformuiv(program, location, params); } @@ -1160,115 +1241,129 @@ coregl_api_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) } void -coregl_api_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +coregl_api_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3) { ovr_glUniform4ui(location, v0, v1, v2, v3); } void -coregl_api_glUniform1uiv(GLint location, GLsizei count, const GLuint* value) +coregl_api_glUniform1uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform1uiv(location, count, value); } void -coregl_api_glUniform2uiv(GLint location, GLsizei count, const GLuint* value) +coregl_api_glUniform2uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform2uiv(location, count, value); } void -coregl_api_glUniform3uiv(GLint location, GLsizei count, const GLuint* value) +coregl_api_glUniform3uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform3uiv(location, count, value); } void -coregl_api_glUniform4uiv(GLint location, GLsizei count, const GLuint* value) +coregl_api_glUniform4uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform4uiv(location, count, value); } void -coregl_api_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) +coregl_api_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) { ovr_glClearBufferiv(buffer, drawbuffer, value); } void -coregl_api_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) +coregl_api_glClearBufferuiv(GLenum buffer, GLint drawbuffer, + const GLuint *value) { ovr_glClearBufferuiv(buffer, drawbuffer, value); } void -coregl_api_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) +coregl_api_glClearBufferfv(GLenum buffer, GLint drawbuffer, + const GLfloat *value) { ovr_glClearBufferfv(buffer, drawbuffer, value); } void -coregl_api_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +coregl_api_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, + GLint stencil) { ovr_glClearBufferfi(buffer, drawbuffer, depth, stencil); } -const GLubyte* +const GLubyte * coregl_api_glGetStringi(GLenum name, GLuint index) { return ovr_glGetStringi(name, index); } void -coregl_api_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) +coregl_api_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, + GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { ovr_glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); } void -coregl_api_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) +coregl_api_glGetUniformIndices(GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices) { ovr_glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); } void -coregl_api_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) +coregl_api_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, GLint *params) { ovr_glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); } GLuint -coregl_api_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) +coregl_api_glGetUniformBlockIndex(GLuint program, + const GLchar *uniformBlockName) { return ovr_glGetUniformBlockIndex(program, uniformBlockName); } void -coregl_api_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) +coregl_api_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, + GLenum pname, GLint *params) { ovr_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); } void -coregl_api_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) +coregl_api_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) { - ovr_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); + ovr_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, + uniformBlockName); } void -coregl_api_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) +coregl_api_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding) { ovr_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); } void -coregl_api_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) +coregl_api_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, + GLsizei instanceCount) { ovr_glDrawArraysInstanced(mode, first, count, instanceCount); } void -coregl_api_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) +coregl_api_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei instanceCount) { ovr_glDrawElementsInstanced(mode, count, type, indices, instanceCount); } @@ -1304,37 +1399,39 @@ coregl_api_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) } void -coregl_api_glGetInteger64v(GLenum pname, GLint64* params) +coregl_api_glGetInteger64v(GLenum pname, GLint64 *params) { ovr_glGetInteger64v(pname, params); } void -coregl_api_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) +coregl_api_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, + GLsizei *length, GLint *values) { ovr_glGetSynciv(sync, pname, bufSize, length, values); } void -coregl_api_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) +coregl_api_glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data) { ovr_glGetInteger64i_v(target, index, data); } void -coregl_api_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) +coregl_api_glGetBufferParameteri64v(GLenum target, GLenum pname, + GLint64 *params) { ovr_glGetBufferParameteri64v(target, pname, params); } void -coregl_api_glGenSamplers(GLsizei n, GLuint* samplers) +coregl_api_glGenSamplers(GLsizei n, GLuint *samplers) { ovr_glGenSamplers(n, samplers); } void -coregl_api_glDeleteSamplers(GLsizei n, const GLuint* samplers) +coregl_api_glDeleteSamplers(GLsizei n, const GLuint *samplers) { ovr_glDeleteSamplers(n, samplers); } @@ -1358,7 +1455,8 @@ coregl_api_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) } void -coregl_api_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) +coregl_api_glSamplerParameteriv(GLuint sampler, GLenum pname, + const GLint *param) { ovr_glSamplerParameteriv(sampler, pname, param); } @@ -1370,19 +1468,21 @@ coregl_api_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) } void -coregl_api_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) +coregl_api_glSamplerParameterfv(GLuint sampler, GLenum pname, + const GLfloat *param) { ovr_glSamplerParameterfv(sampler, pname, param); } void -coregl_api_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) +coregl_api_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) { ovr_glGetSamplerParameteriv(sampler, pname, params); } void -coregl_api_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) +coregl_api_glGetSamplerParameterfv(GLuint sampler, GLenum pname, + GLfloat *params) { ovr_glGetSamplerParameterfv(sampler, pname, params); } @@ -1400,13 +1500,13 @@ coregl_api_glBindTransformFeedback(GLenum target, GLuint id) } void -coregl_api_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) +coregl_api_glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids) { ovr_glDeleteTransformFeedbacks(n, ids); } void -coregl_api_glGenTransformFeedbacks(GLsizei n, GLuint* ids) +coregl_api_glGenTransformFeedbacks(GLsizei n, GLuint *ids) { ovr_glGenTransformFeedbacks(n, ids); } @@ -1430,13 +1530,15 @@ coregl_api_glResumeTransformFeedback() } void -coregl_api_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) +coregl_api_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, GLvoid *binary) { ovr_glGetProgramBinary(program, bufSize, length, binaryFormat, binary); } void -coregl_api_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) +coregl_api_glProgramBinary(GLuint program, GLenum binaryFormat, + const GLvoid *binary, GLsizei length) { ovr_glProgramBinary(program, binaryFormat, binary, length); } @@ -1448,38 +1550,45 @@ coregl_api_glProgramParameteri(GLuint program, GLenum pname, GLint value) } void -coregl_api_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) +coregl_api_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, + const GLenum *attachments) { ovr_glInvalidateFramebuffer(target, numAttachments, attachments); } void -coregl_api_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) +coregl_api_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) { - ovr_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); + ovr_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, + height); } void -coregl_api_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +coregl_api_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height) { ovr_glTexStorage2D(target, levels, internalformat, width, height); } void -coregl_api_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) +coregl_api_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth) { ovr_glTexStorage3D(target, levels, internalformat, width, height, depth); } void -coregl_api_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) +coregl_api_glGetInternalformativ(GLenum target, GLenum internalformat, + GLenum pname, GLsizei bufSize, GLint *params) { ovr_glGetInternalformativ(target, internalformat, pname, bufSize, params); } /* GLES3.1 API */ GLuint -coregl_api_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +coregl_api_glCreateShaderProgramv(GLenum type, GLsizei count, + const GLchar *const *strings) { return ovr_glCreateShaderProgramv(type, count, strings); } @@ -1521,13 +1630,15 @@ coregl_api_glValidateProgramPipeline(GLuint pipeline) } void -coregl_api_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +coregl_api_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) { ovr_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); } void -coregl_api_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +coregl_api_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z) { ovr_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); } @@ -1545,7 +1656,8 @@ coregl_api_glDrawArraysIndirect(GLenum mode, GLvoid const *indirect) } void -coregl_api_glDrawElementsIndirect(GLenum mode, GLenum type, GLvoid const *indirect) +coregl_api_glDrawElementsIndirect(GLenum mode, GLenum type, + GLvoid const *indirect) { ovr_glDrawElementsIndirect(mode, type, indirect); } @@ -1557,43 +1669,53 @@ coregl_api_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) } void -coregl_api_glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint * params) +coregl_api_glGetFramebufferParameteriv( GLenum target, GLenum pname, + GLint *params) { ovr_glGetFramebufferParameteriv(target, pname, params); } void -coregl_api_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +coregl_api_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, + GLenum pname, GLint *params) { ovr_glGetProgramInterfaceiv(program, programInterface, pname, params); } GLuint -coregl_api_glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +coregl_api_glGetProgramResourceIndex( GLuint program, GLenum programInterface, + const char *name) { return ovr_glGetProgramResourceIndex(program, programInterface, name); } void -coregl_api_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +coregl_api_glGetProgramResourceName(GLuint program, GLenum programInterface, + GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) { - ovr_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); + ovr_glGetProgramResourceName(program, programInterface, index, bufSize, length, + name); } void -coregl_api_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +coregl_api_glGetProgramResourceiv( GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params) { - ovr_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); + ovr_glGetProgramResourceiv(program, programInterface, index, propCount, + props, bufSize, length, params); } GLint -coregl_api_glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +coregl_api_glGetProgramResourceLocation(GLuint program, GLenum programInterface, + GLchar const *name) { return ovr_glGetProgramResourceLocation(program, programInterface, name); } void -coregl_api_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) +coregl_api_glUseProgramStages(GLuint pipeline, GLbitfield stages, + GLuint program) { ovr_glUseProgramStages(pipeline, stages, program); } @@ -1605,75 +1727,86 @@ coregl_api_glActiveShaderProgram(GLuint pipeline, GLuint program) } void -coregl_api_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +coregl_api_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform1iv(program, location, count, value); } void -coregl_api_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +coregl_api_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform2iv(program, location, count, value); } void -coregl_api_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +coregl_api_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform3iv(program, location, count, value); } void -coregl_api_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +coregl_api_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform4iv(program, location, count, value); } void -coregl_api_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +coregl_api_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform1fv(program, location, count, value); } void -coregl_api_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +coregl_api_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform2fv(program, location, count, value); } void -coregl_api_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +coregl_api_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform3fv(program, location, count, value); } void -coregl_api_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +coregl_api_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform4fv(program, location, count, value); } void -coregl_api_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4fv(program, location, count, transpose, value); } @@ -1693,14 +1826,16 @@ coregl_api_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) void -coregl_api_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +coregl_api_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, + GLint z) { ovr_glProgramUniform3i(program, location, x, y, z); } void -coregl_api_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +coregl_api_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, + GLint z, GLint w) { ovr_glProgramUniform4i(program, location, x, y, z, w); } @@ -1714,21 +1849,24 @@ coregl_api_glProgramUniform1f(GLuint program, GLint location, GLfloat x) void -coregl_api_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +coregl_api_glProgramUniform2f(GLuint program, GLint location, GLfloat x, + GLfloat y) { ovr_glProgramUniform2f(program, location, x, y); } void -coregl_api_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +coregl_api_glProgramUniform3f(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z) { ovr_glProgramUniform3f(program, location, x, y, z); } void -coregl_api_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +coregl_api_glProgramUniform4f(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z, GLfloat w) { ovr_glProgramUniform4f(program, location, x, y, z, w); } @@ -1740,88 +1878,102 @@ coregl_api_glProgramUniform1ui(GLuint program, GLint location, GLuint x) } void -coregl_api_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) +coregl_api_glProgramUniform2ui(GLuint program, GLint location, GLuint x, + GLuint y) { ovr_glProgramUniform2ui(program, location, x, y); } void -coregl_api_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +coregl_api_glProgramUniform3ui(GLuint program, GLint location, GLuint x, + GLuint y, GLuint z) { ovr_glProgramUniform3ui(program, location, x, y, z); } void -coregl_api_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +coregl_api_glProgramUniform4ui(GLuint program, GLint location, GLuint x, + GLuint y, GLuint z, GLuint w) { ovr_glProgramUniform4ui(program, location, x, y, z, w); } void -coregl_api_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +coregl_api_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform1uiv(program, location, count, value); } void -coregl_api_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +coregl_api_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform2uiv(program, location, count, value); } void -coregl_api_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +coregl_api_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform3uiv(program, location, count, value); } void -coregl_api_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +coregl_api_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform4uiv(program, location, count, value); } void -coregl_api_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix2x3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix3x2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix2x4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix4x2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix3x4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); } void -coregl_api_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +coregl_api_glProgramUniformMatrix4x3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); } void -coregl_api_glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +coregl_api_glBindImageTexture (GLuint unit, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, GLenum format) { ovr_glBindImageTexture (unit, texture, level, layered, layer, access, format); } @@ -1845,9 +1997,12 @@ coregl_api_glMemoryBarrierByRegion (GLbitfield barriers) } void -coregl_api_glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +coregl_api_glTexStorage2DMultisample (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations) { - ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); + ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, + fixedsamplelocations); } void @@ -1863,31 +2018,36 @@ coregl_api_glSampleMaski (GLuint maskNumber, GLbitfield mask) } void -coregl_api_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +coregl_api_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, + GLint *params) { ovr_glGetTexLevelParameteriv (target, level, pname, params); } void -coregl_api_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +coregl_api_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, + GLfloat *params) { ovr_glGetTexLevelParameterfv (target, level, pname, params); } void -coregl_api_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +coregl_api_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride) { ovr_glBindVertexBuffer (bindingindex, buffer, offset, stride); } void -coregl_api_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +coregl_api_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset) { ovr_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); } void -coregl_api_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +coregl_api_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset) { ovr_glVertexAttribIFormat (attribindex, size, type, relativeoffset); } diff --git a/src/coregl_internal.h b/src/coregl_internal.h index 8158e5a..ffb366d 100644 --- a/src/coregl_internal.h +++ b/src/coregl_internal.h @@ -53,8 +53,14 @@ fflush(trace_fp) #define _COREGL_TRACE_OUTPUT_INTERVAL_SEC 5 -static inline GLint GET_INT_FROM_FLOAT(GLfloat value) { return (GLint)value; } -static inline GLuint GET_UINT_FROM_FLOAT(GLfloat value) { return (GLuint)value; } +static inline GLint GET_INT_FROM_FLOAT(GLfloat value) +{ + return (GLint)value; +} +static inline GLuint GET_UINT_FROM_FLOAT(GLfloat value) +{ + return (GLuint)value; +} #ifdef COREGL_DEBUG @@ -65,7 +71,7 @@ static inline GLuint GET_UINT_FROM_FLOAT(GLfloat value) { return (GLuint)value; if (expr) #endif -typedef GLvoid * GLvoidptr; +typedef GLvoid *GLvoidptr; typedef GLuint GLuintmask; #define COREGL_GLAPI_31 4 @@ -83,8 +89,7 @@ typedef EGLContext GLContext; #define COREGL_GL_NO_CONTEXT EGL_NO_CONTEXT -typedef struct _GLThreadState -{ +typedef struct _GLThreadState { int thread_id; void *module_data[COREGL_MAX_MODULES]; } GLThreadState; @@ -94,8 +99,7 @@ extern void *egl_lib_handle; #include "coregl_thread_pthread.h" -typedef struct _General_Trace_List -{ +typedef struct _General_Trace_List { void *value; struct _General_Trace_List *next; } General_Trace_List; @@ -153,8 +157,10 @@ extern void deinit_modules_tstate(GLThreadState *tstate); // Debug & Trace functions -extern int add_to_general_trace_list(General_Trace_List **gtl, void *value); -extern int remove_from_general_trace_list(General_Trace_List **gtl, void *value); +extern int add_to_general_trace_list(General_Trace_List **gtl, + void *value); +extern int remove_from_general_trace_list( + General_Trace_List **gtl, void *value); #endif // COREGL_INTERNAL_H diff --git a/src/coregl_thread_pthread.c b/src/coregl_thread_pthread.c index 70ff145..0f92a33 100644 --- a/src/coregl_thread_pthread.c +++ b/src/coregl_thread_pthread.c @@ -7,7 +7,7 @@ int mutex_lock(Mutex *mt); int mutex_unlock(Mutex *mt); int get_current_thread(); int set_current_thread_state(GLThreadState *tstate); -GLThreadState * get_current_thread_state(); +GLThreadState *get_current_thread_state(); ////////////////////////////////////////////////////////////////////////// static Mutex thread_key_mutex = MUTEX_INITIALIZER; @@ -66,10 +66,8 @@ set_current_thread_state(GLThreadState *tstate) AST(mutex_lock(&thread_key_mutex) == 1); - if (thread_key_inited == 0) - { - if (pthread_key_create(&thread_key, NULL) != 0) - { + if (thread_key_inited == 0) { + if (pthread_key_create(&thread_key, NULL) != 0) { COREGL_ERR("Failed to create thread key.\n"); ret = 0; goto finish; @@ -77,8 +75,7 @@ set_current_thread_state(GLThreadState *tstate) thread_key_inited = 1; } - if (pthread_setspecific(thread_key, (void *)tstate) != 0) - { + if (pthread_setspecific(thread_key, (void *)tstate) != 0) { COREGL_ERR("Failed to set thread data.\n"); ret = 0; goto finish; @@ -98,8 +95,7 @@ get_current_thread_state() { GLThreadState *ret = NULL; - if (thread_key_inited) - { + if (thread_key_inited) { ret = (GLThreadState *)pthread_getspecific(thread_key); } goto finish; diff --git a/src/coregl_thread_pthread_and_gcc_tlv.c b/src/coregl_thread_pthread_and_gcc_tlv.c index d759263..af16f21 100644 --- a/src/coregl_thread_pthread_and_gcc_tlv.c +++ b/src/coregl_thread_pthread_and_gcc_tlv.c @@ -7,7 +7,7 @@ int mutex_lock(Mutex *mt); int mutex_unlock(Mutex *mt); int get_current_thread(); int set_current_thread_state(GLThreadState *tstate); -GLThreadState * get_current_thread_state(); +GLThreadState *get_current_thread_state(); ////////////////////////////////////////////////////////////////////////// static __thread GLThreadState *per_thread_state = NULL; diff --git a/src/coregl_trace.c b/src/coregl_trace.c index dac7dcd..4f681d5 100644 --- a/src/coregl_trace.c +++ b/src/coregl_trace.c @@ -58,10 +58,8 @@ remove_from_general_trace_list(General_Trace_List **gtl, void *value) current = *gtl; - while (current != NULL) - { - if (current->value == value) - { + while (current != NULL) { + if (current->value == value) { if (priv == NULL) *gtl = current->next; else diff --git a/src/headers/gl.h b/src/headers/gl.h index ef2defa..3e0fb9b 100644 --- a/src/headers/gl.h +++ b/src/headers/gl.h @@ -27,7 +27,9 @@ typedef khronos_intptr_t GLintptr; typedef khronos_ssize_t GLsizeiptr; typedef khronos_int32_t GLclampx; -typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source, GLenum type, + GLuint id, GLenum severity, GLsizei length, const GLchar *message, + const void *userParam); /* OpenGL ES 3.0 */ typedef unsigned short GLhalf; @@ -780,7 +782,7 @@ typedef struct __GLsync *GLsync; // GLES extension defines /* GL_OES_EGL_image */ #ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; +typedef void *GLeglImageOES; #endif #ifndef EGL_SEC_image_map diff --git a/src/headers/sym.h b/src/headers/sym.h index 886087b..57dd22a 100644 --- a/src/headers/sym.h +++ b/src/headers/sym.h @@ -1,6 +1,6 @@ -// Include all symbols - -#include "sym_gl.h" - -#include "sym_egl.h" - +// Include all symbols + +#include "sym_gl.h" + +#include "sym_egl.h" + diff --git a/src/headers/sym_egl.h b/src/headers/sym_egl.h index 8a812ac..b0cbb63 100644 --- a/src/headers/sym_egl.h +++ b/src/headers/sym_egl.h @@ -24,66 +24,98 @@ _COREGL_SYMBOL(EGLint, eglGetError, (void)) _COREGL_SYMBOL(EGLDisplay, eglGetDisplay, (EGLNativeDisplayType display_id)) -_COREGL_SYMBOL(EGLBoolean, eglInitialize, (EGLDisplay dpy, EGLint* major, EGLint *minor)) +_COREGL_SYMBOL(EGLBoolean, eglInitialize, (EGLDisplay dpy, EGLint *major, + EGLint *minor)) _COREGL_SYMBOL(EGLBoolean, eglTerminate, (EGLDisplay dpy)) -_COREGL_SYMBOL(const char*, eglQueryString, (EGLDisplay dpy, EGLint name)) - -_COREGL_SYMBOL(EGLBoolean, eglGetConfigs, (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)) -_COREGL_SYMBOL(EGLBoolean, eglChooseConfig, (EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config)) -_COREGL_SYMBOL(EGLBoolean, eglGetConfigAttrib, (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)) - -_COREGL_SYMBOL(EGLSurface, eglCreateWindowSurface, (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list)) -_COREGL_SYMBOL(EGLSurface, eglCreatePbufferSurface, (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)) -_COREGL_SYMBOL(EGLSurface, eglCreatePixmapSurface, (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list)) -_COREGL_SYMBOL(EGLBoolean, eglDestroySurface, (EGLDisplay dpy, EGLSurface surface)) -_COREGL_SYMBOL(EGLBoolean, eglQuerySurface, (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)) +_COREGL_SYMBOL(const char *, eglQueryString, (EGLDisplay dpy, EGLint name)) + +_COREGL_SYMBOL(EGLBoolean, eglGetConfigs, (EGLDisplay dpy, EGLConfig *configs, + EGLint config_size, EGLint *num_config)) +_COREGL_SYMBOL(EGLBoolean, eglChooseConfig, (EGLDisplay dpy, + const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, + EGLint *num_config)) +_COREGL_SYMBOL(EGLBoolean, eglGetConfigAttrib, (EGLDisplay dpy, + EGLConfig config, EGLint attribute, EGLint *value)) + +_COREGL_SYMBOL(EGLSurface, eglCreateWindowSurface, (EGLDisplay dpy, + EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)) +_COREGL_SYMBOL(EGLSurface, eglCreatePbufferSurface, (EGLDisplay dpy, + EGLConfig config, const EGLint *attrib_list)) +_COREGL_SYMBOL(EGLSurface, eglCreatePixmapSurface, (EGLDisplay dpy, + EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list)) +_COREGL_SYMBOL(EGLBoolean, eglDestroySurface, (EGLDisplay dpy, + EGLSurface surface)) +_COREGL_SYMBOL(EGLBoolean, eglQuerySurface, (EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint *value)) _COREGL_SYMBOL(EGLBoolean, eglBindAPI, (EGLenum api)) _COREGL_SYMBOL(EGLenum, eglQueryAPI, (void)) _COREGL_SYMBOL(EGLBoolean, eglWaitClient, (void)) _COREGL_SYMBOL(EGLBoolean, eglReleaseThread, (void)) -_COREGL_SYMBOL(EGLSurface, eglCreatePbufferFromClientBuffer, (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)) - -_COREGL_SYMBOL(EGLBoolean, eglSurfaceAttrib, (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)) -_COREGL_SYMBOL(EGLBoolean, eglBindTexImage, (EGLDisplay dpy, EGLSurface surface, EGLint buffer)) -_COREGL_SYMBOL(EGLBoolean, eglReleaseTexImage, (EGLDisplay dpy, EGLSurface surface, EGLint buffer)) +_COREGL_SYMBOL(EGLSurface, eglCreatePbufferFromClientBuffer, (EGLDisplay dpy, + EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, + const EGLint *attrib_list)) + +_COREGL_SYMBOL(EGLBoolean, eglSurfaceAttrib, (EGLDisplay dpy, + EGLSurface surface, EGLint attribute, EGLint value)) +_COREGL_SYMBOL(EGLBoolean, eglBindTexImage, (EGLDisplay dpy, EGLSurface surface, + EGLint buffer)) +_COREGL_SYMBOL(EGLBoolean, eglReleaseTexImage, (EGLDisplay dpy, + EGLSurface surface, EGLint buffer)) _COREGL_SYMBOL(EGLBoolean, eglSwapInterval, (EGLDisplay dpy, EGLint interval)) -_COREGL_SYMBOL(EGLContext, eglCreateContext, (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list)) +_COREGL_SYMBOL(EGLContext, eglCreateContext, (EGLDisplay dpy, EGLConfig config, + EGLContext share_context, const EGLint *attrib_list)) _COREGL_SYMBOL(EGLBoolean, eglDestroyContext, (EGLDisplay dpy, EGLContext ctx)) -_COREGL_SYMBOL(EGLBoolean, eglMakeCurrent, (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)) +_COREGL_SYMBOL(EGLBoolean, eglMakeCurrent, (EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx)) _COREGL_SYMBOL(EGLContext, eglGetCurrentContext, (void)) _COREGL_SYMBOL(EGLSurface, eglGetCurrentSurface, (EGLint readdraw)) _COREGL_SYMBOL(EGLDisplay, eglGetCurrentDisplay, (void)) -_COREGL_SYMBOL(EGLBoolean, eglQueryContext, (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)) +_COREGL_SYMBOL(EGLBoolean, eglQueryContext, (EGLDisplay dpy, EGLContext ctx, + EGLint attribute, EGLint *value)) _COREGL_SYMBOL(EGLBoolean, eglWaitGL, (void)) _COREGL_SYMBOL(EGLBoolean, eglWaitNative, (EGLint engine)) _COREGL_SYMBOL(EGLBoolean, eglSwapBuffers, (EGLDisplay dpy, EGLSurface surface)) -_COREGL_SYMBOL(EGLBoolean, eglCopyBuffers, (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)) +_COREGL_SYMBOL(EGLBoolean, eglCopyBuffers, (EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target)) -_COREGL_SYMBOL(_eng_fn, eglGetProcAddress, (const char* procname)) +_COREGL_SYMBOL(_eng_fn, eglGetProcAddress, (const char *procname)) // Extensions -_COREGL_EXT_SYMBOL(EGLImageKHR, eglCreateImageKHR, (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)) -_COREGL_EXT_SYMBOL(EGLBoolean, eglDestroyImageKHR, (EGLDisplay dpy, EGLImageKHR image)) - -_COREGL_EXT_SYMBOL(void*, eglMapImageSEC, (EGLDisplay dpy, EGLImageKHR image, EGLint device_type, EGLint access_option)) -_COREGL_EXT_SYMBOL(EGLBoolean, eglUnmapImageSEC, (EGLDisplay dpy, EGLImageKHR image, EGLint device_type)) -_COREGL_EXT_SYMBOL(EGLBoolean, eglGetImageAttribSEC, (EGLDisplay dpy, EGLImageKHR image, EGLint attribute, EGLint *value)) - -_COREGL_EXT_SYMBOL(EGLBoolean, eglLockSurfaceKHR, (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list)) -_COREGL_EXT_SYMBOL(EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display, EGLSurface surface)) - -_COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersWithDamageEXT, (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)) - -_COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersRegionEXT, (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects)) - -_COREGL_EXT_SYMBOL(EGLBoolean, eglBindWaylandDisplayWL, (EGLDisplay dpy, void* display)) - -_COREGL_EXT_SYMBOL(EGLBoolean, eglUnbindWaylandDisplayWL, (EGLDisplay dpy, void* display)) - -_COREGL_EXT_SYMBOL(EGLBoolean, eglQueryWaylandBufferWL, (EGLDisplay dpy, void* buffer, EGLint attribute, EGLint *value)) +_COREGL_EXT_SYMBOL(EGLImageKHR, eglCreateImageKHR, (EGLDisplay dpy, + EGLContext ctx, EGLenum target, EGLClientBuffer buffer, + const EGLint *attrib_list)) +_COREGL_EXT_SYMBOL(EGLBoolean, eglDestroyImageKHR, (EGLDisplay dpy, + EGLImageKHR image)) + +_COREGL_EXT_SYMBOL(void *, eglMapImageSEC, (EGLDisplay dpy, EGLImageKHR image, + EGLint device_type, EGLint access_option)) +_COREGL_EXT_SYMBOL(EGLBoolean, eglUnmapImageSEC, (EGLDisplay dpy, + EGLImageKHR image, EGLint device_type)) +_COREGL_EXT_SYMBOL(EGLBoolean, eglGetImageAttribSEC, (EGLDisplay dpy, + EGLImageKHR image, EGLint attribute, EGLint *value)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglLockSurfaceKHR, (EGLDisplay display, + EGLSurface surface, const EGLint *attrib_list)) +_COREGL_EXT_SYMBOL(EGLBoolean, eglUnlockSurfaceKHR, (EGLDisplay display, + EGLSurface surface)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersWithDamageEXT, (EGLDisplay dpy, + EGLSurface surface, EGLint *rects, EGLint n_rects)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglSwapBuffersRegionEXT, (EGLDisplay dpy, + EGLSurface surface, EGLint numRects, const EGLint *rects)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglBindWaylandDisplayWL, (EGLDisplay dpy, + void *display)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglUnbindWaylandDisplayWL, (EGLDisplay dpy, + void *display)) + +_COREGL_EXT_SYMBOL(EGLBoolean, eglQueryWaylandBufferWL, (EGLDisplay dpy, + void *buffer, EGLint attribute, EGLint *value)) /* Fastpath Verified extensions */ //_COREGL_EXT_SYMBOL_FASTPATH_PASS(eglSwapBuffersRegionSEC) diff --git a/src/headers/sym_gl.h b/src/headers/sym_gl.h index 2df8795..2b3de9b 100644 --- a/src/headers/sym_gl.h +++ b/src/headers/sym_gl.h @@ -39,38 +39,55 @@ /* OpenGL ES 2.0 */ _COREGL_SYMBOL(void, glActiveTexture, (GLenum texture)) _COREGL_SYMBOL(void, glAttachShader, (GLuint program, GLuint shader)) -_COREGL_SYMBOL(void, glBindAttribLocation, (GLuint program, GLuint index, const char* name)) +_COREGL_SYMBOL(void, glBindAttribLocation, (GLuint program, GLuint index, + const char *name)) _COREGL_SYMBOL(void, glBindBuffer, (GLenum target, GLuint buffer)) _COREGL_SYMBOL(void, glBindFramebuffer, (GLenum target, GLuint framebuffer)) _COREGL_SYMBOL(void, glBindRenderbuffer, (GLenum target, GLuint renderbuffer)) _COREGL_SYMBOL(void, glBindTexture, (GLenum target, GLuint texture)) -_COREGL_SYMBOL(void, glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) +_COREGL_SYMBOL(void, glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha)) _COREGL_SYMBOL(void, glBlendEquation, ( GLenum mode )) -_COREGL_SYMBOL(void, glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha)) +_COREGL_SYMBOL(void, glBlendEquationSeparate, (GLenum modeRGB, + GLenum modeAlpha)) _COREGL_SYMBOL(void, glBlendFunc, (GLenum sfactor, GLenum dfactor)) -_COREGL_SYMBOL(void, glBlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) -_COREGL_SYMBOL(void, glBufferData, (GLenum target, GLsizeiptr size, const void* data, GLenum usage)) -_COREGL_SYMBOL(void, glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const void* data)) +_COREGL_SYMBOL(void, glBlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha)) +_COREGL_SYMBOL(void, glBufferData, (GLenum target, GLsizeiptr size, + const void *data, GLenum usage)) +_COREGL_SYMBOL(void, glBufferSubData, (GLenum target, GLintptr offset, + GLsizeiptr size, const void *data)) _COREGL_SYMBOL(GLenum, glCheckFramebufferStatus, (GLenum target)) _COREGL_SYMBOL(void, glClear, (GLbitfield mask)) -_COREGL_SYMBOL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) +_COREGL_SYMBOL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha)) _COREGL_SYMBOL(void, glClearDepthf, (GLclampf depth)) _COREGL_SYMBOL(void, glClearStencil, (GLint s)) -_COREGL_SYMBOL(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) +_COREGL_SYMBOL(void, glColorMask, (GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha)) _COREGL_SYMBOL(void, glCompileShader, (GLuint shader)) -_COREGL_SYMBOL(void, glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)) -_COREGL_SYMBOL(void, glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)) -_COREGL_SYMBOL(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) -_COREGL_SYMBOL(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) +_COREGL_SYMBOL(void, glCompressedTexImage2D, (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data)) +_COREGL_SYMBOL(void, glCompressedTexSubImage2D, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLsizei imageSize, const void *data)) +_COREGL_SYMBOL(void, glCopyTexImage2D, (GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, + GLint border)) +_COREGL_SYMBOL(void, glCopyTexSubImage2D, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _COREGL_SYMBOL(GLuint, glCreateProgram, (void)) _COREGL_SYMBOL(GLuint, glCreateShader, (GLenum type)) _COREGL_SYMBOL(void, glCullFace, (GLenum mode)) -_COREGL_SYMBOL(void, glDeleteBuffers, (GLsizei n, const GLuint* buffers)) -_COREGL_SYMBOL(void, glDeleteFramebuffers, (GLsizei n, const GLuint* framebuffers)) +_COREGL_SYMBOL(void, glDeleteBuffers, (GLsizei n, const GLuint *buffers)) +_COREGL_SYMBOL(void, glDeleteFramebuffers, (GLsizei n, + const GLuint *framebuffers)) _COREGL_SYMBOL(void, glDeleteProgram, (GLuint program)) -_COREGL_SYMBOL(void, glDeleteRenderbuffers, (GLsizei n, const GLuint* renderbuffers)) +_COREGL_SYMBOL(void, glDeleteRenderbuffers, (GLsizei n, + const GLuint *renderbuffers)) _COREGL_SYMBOL(void, glDeleteShader, (GLuint shader)) -_COREGL_SYMBOL(void, glDeleteTextures, (GLsizei n, const GLuint* textures)) +_COREGL_SYMBOL(void, glDeleteTextures, (GLsizei n, const GLuint *textures)) _COREGL_SYMBOL(void, glDepthFunc, (GLenum func)) _COREGL_SYMBOL(void, glDepthMask, (GLboolean flag)) _COREGL_SYMBOL(void, glDepthRangef, (GLclampf zNear, GLclampf zFar)) @@ -78,45 +95,67 @@ _COREGL_SYMBOL(void, glDetachShader, (GLuint program, GLuint shader)) _COREGL_SYMBOL(void, glDisable, (GLenum cap)) _COREGL_SYMBOL(void, glDisableVertexAttribArray, (GLuint index)) _COREGL_SYMBOL(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)) -_COREGL_SYMBOL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const void* indices)) +_COREGL_SYMBOL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, + const void *indices)) _COREGL_SYMBOL(void, glEnable, (GLenum cap)) _COREGL_SYMBOL(void, glEnableVertexAttribArray, (GLuint index)) _COREGL_SYMBOL(void, glFinish, (void)) _COREGL_SYMBOL(void, glFlush, (void)) -_COREGL_SYMBOL(void, glFramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) -_COREGL_SYMBOL(void, glFramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) +_COREGL_SYMBOL(void, glFramebufferRenderbuffer, (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) +_COREGL_SYMBOL(void, glFramebufferTexture2D, (GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level)) _COREGL_SYMBOL(void, glFrontFace, (GLenum mode)) -_COREGL_SYMBOL(void, glGenBuffers, (GLsizei n, GLuint* buffers)) +_COREGL_SYMBOL(void, glGenBuffers, (GLsizei n, GLuint *buffers)) _COREGL_SYMBOL(void, glGenerateMipmap, (GLenum target)) -_COREGL_SYMBOL(void, glGenFramebuffers, (GLsizei n, GLuint* framebuffers)) -_COREGL_SYMBOL(void, glGenRenderbuffers, (GLsizei n, GLuint* renderbuffers)) -_COREGL_SYMBOL(void, glGenTextures, (GLsizei n, GLuint* textures)) -_COREGL_SYMBOL(void, glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)) -_COREGL_SYMBOL(void, glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)) -_COREGL_SYMBOL(void, glGetAttachedShaders, (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)) -_COREGL_SYMBOL(int, glGetAttribLocation, (GLuint program, const char* name)) -_COREGL_SYMBOL(void, glGetBooleanv, (GLenum pname, GLboolean* params)) -_COREGL_SYMBOL(void, glGetBufferParameteriv, (GLenum target, GLenum pname, GLint* params)) +_COREGL_SYMBOL(void, glGenFramebuffers, (GLsizei n, GLuint *framebuffers)) +_COREGL_SYMBOL(void, glGenRenderbuffers, (GLsizei n, GLuint *renderbuffers)) +_COREGL_SYMBOL(void, glGenTextures, (GLsizei n, GLuint *textures)) +_COREGL_SYMBOL(void, glGetActiveAttrib, (GLuint program, GLuint index, + GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)) +_COREGL_SYMBOL(void, glGetActiveUniform, (GLuint program, GLuint index, + GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)) +_COREGL_SYMBOL(void, glGetAttachedShaders, (GLuint program, GLsizei maxcount, + GLsizei *count, GLuint *shaders)) +_COREGL_SYMBOL(int, glGetAttribLocation, (GLuint program, const char *name)) +_COREGL_SYMBOL(void, glGetBooleanv, (GLenum pname, GLboolean *params)) +_COREGL_SYMBOL(void, glGetBufferParameteriv, (GLenum target, GLenum pname, + GLint *params)) _COREGL_SYMBOL(GLenum, glGetError, (void)) -_COREGL_SYMBOL(void, glGetFloatv, (GLenum pname, GLfloat* params)) -_COREGL_SYMBOL(void, glGetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetIntegerv, (GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetProgramiv, (GLuint program, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetProgramInfoLog, (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)) -_COREGL_SYMBOL(void, glGetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetShaderiv, (GLuint shader, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetShaderInfoLog, (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)) -_COREGL_SYMBOL(void, glGetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)) -_COREGL_SYMBOL(void, glGetShaderSource, (GLuint shader, GLsizei bufsize, GLsizei* length, char* source)) +_COREGL_SYMBOL(void, glGetFloatv, (GLenum pname, GLfloat *params)) +_COREGL_SYMBOL(void, glGetFramebufferAttachmentParameteriv, (GLenum target, + GLenum attachment, GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetIntegerv, (GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetProgramiv, (GLuint program, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetProgramInfoLog, (GLuint program, GLsizei bufsize, + GLsizei *length, char *infolog)) +_COREGL_SYMBOL(void, glGetRenderbufferParameteriv, (GLenum target, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetShaderiv, (GLuint shader, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetShaderInfoLog, (GLuint shader, GLsizei bufsize, + GLsizei *length, char *infolog)) +_COREGL_SYMBOL(void, glGetShaderPrecisionFormat, (GLenum shadertype, + GLenum precisiontype, GLint *range, GLint *precision)) +_COREGL_SYMBOL(void, glGetShaderSource, (GLuint shader, GLsizei bufsize, + GLsizei *length, char *source)) _COREGL_SYMBOL(const GLubyte *, glGetString, (GLenum name)) -_COREGL_SYMBOL(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat* params)) -_COREGL_SYMBOL(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetUniformfv, (GLuint program, GLint location, GLfloat* params)) -_COREGL_SYMBOL(void, glGetUniformiv, (GLuint program, GLint location, GLint* params)) -_COREGL_SYMBOL(int, glGetUniformLocation, (GLuint program, const char* name)) -_COREGL_SYMBOL(void, glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat* params)) -_COREGL_SYMBOL(void, glGetVertexAttribiv, (GLuint index, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetVertexAttribPointerv, (GLuint index, GLenum pname, void** pointer)) +_COREGL_SYMBOL(void, glGetTexParameterfv, (GLenum target, GLenum pname, + GLfloat *params)) +_COREGL_SYMBOL(void, glGetTexParameteriv, (GLenum target, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetUniformfv, (GLuint program, GLint location, + GLfloat *params)) +_COREGL_SYMBOL(void, glGetUniformiv, (GLuint program, GLint location, + GLint *params)) +_COREGL_SYMBOL(int, glGetUniformLocation, (GLuint program, const char *name)) +_COREGL_SYMBOL(void, glGetVertexAttribfv, (GLuint index, GLenum pname, + GLfloat *params)) +_COREGL_SYMBOL(void, glGetVertexAttribiv, (GLuint index, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetVertexAttribPointerv, (GLuint index, GLenum pname, + void **pointer)) _COREGL_SYMBOL(void, glHint, (GLenum target, GLenum mode)) _COREGL_SYMBOL(GLboolean, glIsBuffer, (GLuint buffer)) _COREGL_SYMBOL(GLboolean, glIsEnabled, (GLenum cap)) @@ -129,341 +168,584 @@ _COREGL_SYMBOL(void, glLineWidth, (GLfloat width)) _COREGL_SYMBOL(void, glLinkProgram, (GLuint program)) _COREGL_SYMBOL(void, glPixelStorei, (GLenum pname, GLint param)) _COREGL_SYMBOL(void, glPolygonOffset, (GLfloat factor, GLfloat units)) -_COREGL_SYMBOL(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels)) +_COREGL_SYMBOL(void, glReadPixels, (GLint x, GLint y, GLsizei width, + GLsizei height, GLenum format, GLenum type, void *pixels)) _COREGL_SYMBOL(void, glReleaseShaderCompiler, (void)) -_COREGL_SYMBOL(void, glRenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_SYMBOL(void, glRenderbufferStorage, (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height)) _COREGL_SYMBOL(void, glSampleCoverage, (GLclampf value, GLboolean invert)) -_COREGL_SYMBOL(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height)) -_COREGL_SYMBOL(void, glShaderBinary, (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)) -_COREGL_SYMBOL(void, glShaderSource, (GLuint shader, GLsizei count, const char** string, const GLint* length)) +_COREGL_SYMBOL(void, glScissor, (GLint x, GLint y, GLsizei width, + GLsizei height)) +_COREGL_SYMBOL(void, glShaderBinary, (GLsizei n, const GLuint *shaders, + GLenum binaryformat, const void *binary, GLsizei length)) +_COREGL_SYMBOL(void, glShaderSource, (GLuint shader, GLsizei count, + const char **string, const GLint *length)) _COREGL_SYMBOL(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask)) -_COREGL_SYMBOL(void, glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask)) +_COREGL_SYMBOL(void, glStencilFuncSeparate, (GLenum face, GLenum func, + GLint ref, GLuint mask)) _COREGL_SYMBOL(void, glStencilMask, (GLuint mask)) _COREGL_SYMBOL(void, glStencilMaskSeparate, (GLenum face, GLuint mask)) _COREGL_SYMBOL(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) -_COREGL_SYMBOL(void, glStencilOpSeparate, (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)) -_COREGL_SYMBOL(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)) -_COREGL_SYMBOL(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param)) -_COREGL_SYMBOL(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat* params)) -_COREGL_SYMBOL(void, glTexParameteri, (GLenum target, GLenum pname, GLint param)) -_COREGL_SYMBOL(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint* params)) -_COREGL_SYMBOL(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)) +_COREGL_SYMBOL(void, glStencilOpSeparate, (GLenum face, GLenum fail, + GLenum zfail, GLenum zpass)) +_COREGL_SYMBOL(void, glTexImage2D, (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLint border, + GLenum format, GLenum type, const void *pixels)) +_COREGL_SYMBOL(void, glTexParameterf, (GLenum target, GLenum pname, + GLfloat param)) +_COREGL_SYMBOL(void, glTexParameterfv, (GLenum target, GLenum pname, + const GLfloat *params)) +_COREGL_SYMBOL(void, glTexParameteri, (GLenum target, GLenum pname, + GLint param)) +_COREGL_SYMBOL(void, glTexParameteriv, (GLenum target, GLenum pname, + const GLint *params)) +_COREGL_SYMBOL(void, glTexSubImage2D, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, + GLenum type, const void *pixels)) _COREGL_SYMBOL(void, glUniform1f, (GLint location, GLfloat x)) -_COREGL_SYMBOL(void, glUniform1fv, (GLint location, GLsizei count, const GLfloat* v)) +_COREGL_SYMBOL(void, glUniform1fv, (GLint location, GLsizei count, + const GLfloat *v)) _COREGL_SYMBOL(void, glUniform1i, (GLint location, GLint x)) -_COREGL_SYMBOL(void, glUniform1iv, (GLint location, GLsizei count, const GLint* v)) +_COREGL_SYMBOL(void, glUniform1iv, (GLint location, GLsizei count, + const GLint *v)) _COREGL_SYMBOL(void, glUniform2f, (GLint location, GLfloat x, GLfloat y)) -_COREGL_SYMBOL(void, glUniform2fv, (GLint location, GLsizei count, const GLfloat* v)) +_COREGL_SYMBOL(void, glUniform2fv, (GLint location, GLsizei count, + const GLfloat *v)) _COREGL_SYMBOL(void, glUniform2i, (GLint location, GLint x, GLint y)) -_COREGL_SYMBOL(void, glUniform2iv, (GLint location, GLsizei count, const GLint* v)) -_COREGL_SYMBOL(void, glUniform3f, (GLint location, GLfloat x, GLfloat y, GLfloat z)) -_COREGL_SYMBOL(void, glUniform3fv, (GLint location, GLsizei count, const GLfloat* v)) +_COREGL_SYMBOL(void, glUniform2iv, (GLint location, GLsizei count, + const GLint *v)) +_COREGL_SYMBOL(void, glUniform3f, (GLint location, GLfloat x, GLfloat y, + GLfloat z)) +_COREGL_SYMBOL(void, glUniform3fv, (GLint location, GLsizei count, + const GLfloat *v)) _COREGL_SYMBOL(void, glUniform3i, (GLint location, GLint x, GLint y, GLint z)) -_COREGL_SYMBOL(void, glUniform3iv, (GLint location, GLsizei count, const GLint* v)) -_COREGL_SYMBOL(void, glUniform4f, (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) -_COREGL_SYMBOL(void, glUniform4fv, (GLint location, GLsizei count, const GLfloat* v)) -_COREGL_SYMBOL(void, glUniform4i, (GLint location, GLint x, GLint y, GLint z, GLint w)) -_COREGL_SYMBOL(void, glUniform4iv, (GLint location, GLsizei count, const GLint* v)) -_COREGL_SYMBOL(void, glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) +_COREGL_SYMBOL(void, glUniform3iv, (GLint location, GLsizei count, + const GLint *v)) +_COREGL_SYMBOL(void, glUniform4f, (GLint location, GLfloat x, GLfloat y, + GLfloat z, GLfloat w)) +_COREGL_SYMBOL(void, glUniform4fv, (GLint location, GLsizei count, + const GLfloat *v)) +_COREGL_SYMBOL(void, glUniform4i, (GLint location, GLint x, GLint y, GLint z, + GLint w)) +_COREGL_SYMBOL(void, glUniform4iv, (GLint location, GLsizei count, + const GLint *v)) +_COREGL_SYMBOL(void, glUniformMatrix2fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix3fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix4fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) _COREGL_SYMBOL(void, glUseProgram, (GLuint program)) _COREGL_SYMBOL(void, glValidateProgram, (GLuint program)) _COREGL_SYMBOL(void, glVertexAttrib1f, (GLuint index, GLfloat x)) -_COREGL_SYMBOL(void, glVertexAttrib1fv, (GLuint index, const GLfloat* values)) +_COREGL_SYMBOL(void, glVertexAttrib1fv, (GLuint index, const GLfloat *values)) _COREGL_SYMBOL(void, glVertexAttrib2f, (GLuint index, GLfloat x, GLfloat y)) -_COREGL_SYMBOL(void, glVertexAttrib2fv, (GLuint index, const GLfloat* values)) -_COREGL_SYMBOL(void, glVertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z)) -_COREGL_SYMBOL(void, glVertexAttrib3fv, (GLuint index, const GLfloat* values)) -_COREGL_SYMBOL(void, glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) -_COREGL_SYMBOL(void, glVertexAttrib4fv, (GLuint index, const GLfloat* values)) -_COREGL_SYMBOL(void, glVertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer)) -_COREGL_SYMBOL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)) -_COREGL_SYMBOL(void, glGetPointerv,(GLenum pname, GLvoid **params)) - -_COREGL_EXT_SYMBOL(void, glBindFramebufferOES, (GLenum target, GLuint framebuffer)) -_COREGL_EXT_SYMBOL(void, glBindRenderbufferOES, (GLenum target, GLuint renderbuffer)) -_COREGL_EXT_SYMBOL(void, glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers)) -_COREGL_EXT_SYMBOL(void, glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers)) +_COREGL_SYMBOL(void, glVertexAttrib2fv, (GLuint index, const GLfloat *values)) +_COREGL_SYMBOL(void, glVertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, + GLfloat z)) +_COREGL_SYMBOL(void, glVertexAttrib3fv, (GLuint index, const GLfloat *values)) +_COREGL_SYMBOL(void, glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w)) +_COREGL_SYMBOL(void, glVertexAttrib4fv, (GLuint index, const GLfloat *values)) +_COREGL_SYMBOL(void, glVertexAttribPointer, (GLuint index, GLint size, + GLenum type, GLboolean normalized, GLsizei stride, const void *pointer)) +_COREGL_SYMBOL(void, glViewport, (GLint x, GLint y, GLsizei width, + GLsizei height)) +_COREGL_SYMBOL(void, glGetPointerv, (GLenum pname, GLvoid **params)) + +_COREGL_EXT_SYMBOL(void, glBindFramebufferOES, (GLenum target, + GLuint framebuffer)) +_COREGL_EXT_SYMBOL(void, glBindRenderbufferOES, (GLenum target, + GLuint renderbuffer)) +_COREGL_EXT_SYMBOL(void, glDeleteFramebuffersOES, (GLsizei n, + const GLuint *framebuffers)) +_COREGL_EXT_SYMBOL(void, glDeleteRenderbuffersOES, (GLsizei n, + const GLuint *renderbuffers)) _COREGL_EXT_SYMBOL(void, glDepthRangefOES, (GLclampf zNear, GLclampf zFar)) _COREGL_EXT_SYMBOL(void, glDepthRangexOES, (GLclampx zNear, GLclampx zFar)) -_COREGL_EXT_SYMBOL(void, glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) -_COREGL_EXT_SYMBOL(void, glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) -_COREGL_EXT_SYMBOL(void, glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers)) -_COREGL_EXT_SYMBOL(void, glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers)) -_COREGL_EXT_SYMBOL(void, glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params)) -_COREGL_EXT_SYMBOL(void, glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) +_COREGL_EXT_SYMBOL(void, glFramebufferRenderbufferOES, (GLenum target, + GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) +_COREGL_EXT_SYMBOL(void, glFramebufferTexture2DOES, (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level)) +_COREGL_EXT_SYMBOL(void, glGenFramebuffersOES, (GLsizei n, + GLuint *framebuffers)) +_COREGL_EXT_SYMBOL(void, glGenRenderbuffersOES, (GLsizei n, + GLuint *renderbuffers)) +_COREGL_EXT_SYMBOL(void, glGetFramebufferAttachmentParameterivOES, + (GLenum target, GLenum attachment, GLenum pname, GLint *params)) +_COREGL_EXT_SYMBOL(void, glFramebufferTexture3DOES, (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLint zoffset)) _COREGL_EXT_SYMBOL(GLboolean, glIsFramebufferOES, (GLuint framebuffer)) _COREGL_EXT_SYMBOL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer)) -_COREGL_EXT_SYMBOL(void, glAlphaFuncxOES,(GLenum func, GLclampx ref)) +_COREGL_EXT_SYMBOL(void, glAlphaFuncxOES, (GLenum func, GLclampx ref)) _COREGL_EXT_SYMBOL(void, glBlendBarrierKHR, (void)) _COREGL_EXT_SYMBOL(void, glBlendEquationOES, (GLenum mode)) -_COREGL_EXT_SYMBOL(void, glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha)) -_COREGL_EXT_SYMBOL(void, glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) +_COREGL_EXT_SYMBOL(void, glBlendEquationSeparateOES, (GLenum modeRGB, + GLenum modeAlpha)) +_COREGL_EXT_SYMBOL(void, glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha)) _COREGL_EXT_SYMBOL(GLenum, glCheckFramebufferStatusOES, (GLenum target)) -_COREGL_EXT_SYMBOL(void, glClearColorxOES,(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)) -_COREGL_EXT_SYMBOL(void, glClearDepthfOES,(GLclampf depth)) -_COREGL_EXT_SYMBOL(void, glClearDepthxOES,(GLclampx depth)) -_COREGL_EXT_SYMBOL(void, glClipPlanefOES,(GLenum plane, GLfloat const *equation)) -_COREGL_EXT_SYMBOL(void, glClipPlanexOES,(GLenum plane, GLfixed const *equation)) -_COREGL_EXT_SYMBOL(void, glColor4xOES,(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)) -_COREGL_EXT_SYMBOL(void, glFogxOES,(GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glFogxvOES,(GLenum pname, GLfixed const *params)) -_COREGL_EXT_SYMBOL(void, glFrustumxOES,(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) -_COREGL_EXT_SYMBOL(void, glFrustumfOES,(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) -_COREGL_EXT_SYMBOL(void, glGenerateMipmapOES,(GLenum target)) -_COREGL_EXT_SYMBOL(void,glGetClipPlanefOES,(GLenum pname, GLfloat eqn[4])) -_COREGL_EXT_SYMBOL(void,glGetClipPlanexOES,(GLenum pname, GLfixed eqn[4])) -_COREGL_EXT_SYMBOL(GLuint,glGetDebugMessageLog,(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)) -_COREGL_EXT_SYMBOL(void,glGetObjectLabel,(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)) -_COREGL_EXT_SYMBOL(void,glGetObjectPtrLabel,(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)) -_COREGL_EXT_SYMBOL(void,glGetPointervKHR,(GLenum pname, GLvoid **params)) -_COREGL_EXT_SYMBOL(void, glDebugMessageCallback,(GLDEBUGPROCKHR callback, void const *userParam)) -_COREGL_EXT_SYMBOL(void, glDebugMessageControl,(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled)) -_COREGL_EXT_SYMBOL(void, glDebugMessageInsert,(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf)) -_COREGL_EXT_SYMBOL(void, glDebugMessageCallbackKHR,(GLDEBUGPROCKHR callback, void const *userParam)) -_COREGL_EXT_SYMBOL(void, glDebugMessageControlKHR,(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled)) -_COREGL_EXT_SYMBOL(void, glDebugMessageInsertKHR,(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf)) -_COREGL_EXT_SYMBOL(GLuint,glGetDebugMessageLogKHR,(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)) -_COREGL_EXT_SYMBOL(void,glGetObjectLabelKHR,(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)) -_COREGL_EXT_SYMBOL(void,glGetObjectPtrLabelKHR,(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)) -_COREGL_EXT_SYMBOL(void, glObjectLabelKHR, (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) -_COREGL_EXT_SYMBOL(void, glObjectPtrLabelKHR, (const void *ptr, GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glClearColorxOES, (GLclampx red, GLclampx green, + GLclampx blue, GLclampx alpha)) +_COREGL_EXT_SYMBOL(void, glClearDepthfOES, (GLclampf depth)) +_COREGL_EXT_SYMBOL(void, glClearDepthxOES, (GLclampx depth)) +_COREGL_EXT_SYMBOL(void, glClipPlanefOES, (GLenum plane, + GLfloat const *equation)) +_COREGL_EXT_SYMBOL(void, glClipPlanexOES, (GLenum plane, + GLfixed const *equation)) +_COREGL_EXT_SYMBOL(void, glColor4xOES, (GLfixed red, GLfixed green, + GLfixed blue, GLfixed alpha)) +_COREGL_EXT_SYMBOL(void, glFogxOES, (GLenum pname, GLfixed param)) +_COREGL_EXT_SYMBOL(void, glFogxvOES, (GLenum pname, GLfixed const *params)) +_COREGL_EXT_SYMBOL(void, glFrustumxOES, (GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) +_COREGL_EXT_SYMBOL(void, glFrustumfOES, (GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) +_COREGL_EXT_SYMBOL(void, glGenerateMipmapOES, (GLenum target)) +_COREGL_EXT_SYMBOL(void, glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4])) +_COREGL_EXT_SYMBOL(void, glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4])) +_COREGL_EXT_SYMBOL(GLuint, glGetDebugMessageLog, (GLuint count, GLsizei bufsize, + GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog)) +_COREGL_EXT_SYMBOL(void, glGetObjectLabel, (GLenum identifier, GLuint name, + GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void, glGetObjectPtrLabel, (void const *ptr, GLsizei bufSize, + GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void, glGetPointervKHR, (GLenum pname, GLvoid **params)) +_COREGL_EXT_SYMBOL(void, glDebugMessageCallback, (GLDEBUGPROCKHR callback, + void const *userParam)) +_COREGL_EXT_SYMBOL(void, glDebugMessageControl, (GLenum source, GLenum type, + GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled)) +_COREGL_EXT_SYMBOL(void, glDebugMessageInsert, (GLenum source, GLenum type, + GLuint id, GLenum severity, GLsizei length, GLchar const *buf)) +_COREGL_EXT_SYMBOL(void, glDebugMessageCallbackKHR, (GLDEBUGPROCKHR callback, + void const *userParam)) +_COREGL_EXT_SYMBOL(void, glDebugMessageControlKHR, (GLenum source, GLenum type, + GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled)) +_COREGL_EXT_SYMBOL(void, glDebugMessageInsertKHR, (GLenum source, GLenum type, + GLuint id, GLenum severity, GLsizei length, GLchar const *buf)) +_COREGL_EXT_SYMBOL(GLuint, glGetDebugMessageLogKHR, (GLuint count, + GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, + GLenum *severities, GLsizei *lengths, GLchar *messageLog)) +_COREGL_EXT_SYMBOL(void, glGetObjectLabelKHR, (GLenum identifier, GLuint name, + GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void, glGetObjectPtrLabelKHR, (void const *ptr, + GLsizei bufSize, GLsizei *length, GLchar *label)) +_COREGL_EXT_SYMBOL(void, glObjectLabelKHR, (GLenum identifier, GLuint name, + GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glObjectPtrLabelKHR, (const void *ptr, GLsizei length, + const GLchar *label)) _COREGL_EXT_SYMBOL(void, glPopDebugGroupKHR, (void)) -_COREGL_EXT_SYMBOL(void, glPushDebugGroupKHR, (GLenum source, GLuint id, GLsizei length, const GLchar *message)) -_COREGL_EXT_SYMBOL(void,glGetFixedvOES,(GLenum pname, GLfixed *params)) -_COREGL_EXT_SYMBOL(void,glGetLightxvOES,(GLenum light, GLenum pname, GLfixed *params)) -_COREGL_EXT_SYMBOL(void,glGetMaterialxvOES,(GLenum face, GLenum pname, GLfixed *params)) -_COREGL_EXT_SYMBOL(void,glGetRenderbufferParameterivOES,(GLenum target, GLenum pname, GLint *params)) -_COREGL_EXT_SYMBOL(void,glGetTexEnvxvOES,(GLenum env, GLenum pname, GLfixed *params)) -_COREGL_EXT_SYMBOL(void,glGetTexParameterxvOES,(GLenum target, GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glPushDebugGroupKHR, (GLenum source, GLuint id, + GLsizei length, const GLchar *message)) +_COREGL_EXT_SYMBOL(void, glGetFixedvOES, (GLenum pname, GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glGetLightxvOES, (GLenum light, GLenum pname, + GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glGetMaterialxvOES, (GLenum face, GLenum pname, + GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glGetRenderbufferParameterivOES, (GLenum target, + GLenum pname, GLint *params)) +_COREGL_EXT_SYMBOL(void, glGetTexEnvxvOES, (GLenum env, GLenum pname, + GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glGetTexParameterxvOES, (GLenum target, GLenum pname, + GLfixed *params)) _COREGL_EXT_SYMBOL(void, glLightModelxOES, (GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glLightModelxvOES, (GLenum pname, const GLfixed *params)) -_COREGL_EXT_SYMBOL(void, glLightxOES, (GLenum light, GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glLightModelxvOES, (GLenum pname, + const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glLightxOES, (GLenum light, GLenum pname, + GLfixed param)) +_COREGL_EXT_SYMBOL(void, glLightxvOES, (GLenum light, GLenum pname, + const GLfixed *params)) _COREGL_EXT_SYMBOL(void, glLineWidthxOES, (GLfixed width)) _COREGL_EXT_SYMBOL(void, glLoadMatrixxOES, (const GLfixed *m)) -_COREGL_EXT_SYMBOL(void, glMaterialxOES, (GLenum face, GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glMaterialxOES, (GLenum face, GLenum pname, + GLfixed param)) +_COREGL_EXT_SYMBOL(void, glMaterialxvOES, (GLenum face, GLenum pname, + const GLfixed *params)) _COREGL_EXT_SYMBOL(void, glMultMatrixxOES, (const GLfixed *m)) -_COREGL_EXT_SYMBOL(void, glMultiTexCoord4bOES, (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q)) -_COREGL_EXT_SYMBOL(void, glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)) +_COREGL_EXT_SYMBOL(void, glMultiTexCoord4bOES, (GLenum target, GLbyte s, + GLbyte t, GLbyte r, GLbyte q)) +_COREGL_EXT_SYMBOL(void, glMultiTexCoord4xOES, (GLenum target, GLfixed s, + GLfixed t, GLfixed r, GLfixed q)) _COREGL_EXT_SYMBOL(void, glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz)) -_COREGL_EXT_SYMBOL(void, glObjectLabel, (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) -_COREGL_EXT_SYMBOL(void, glObjectPtrLabel, (const void *ptr, GLsizei length, const GLchar *label)) -_COREGL_EXT_SYMBOL(void, glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) -_COREGL_EXT_SYMBOL(void, glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) +_COREGL_EXT_SYMBOL(void, glObjectLabel, (GLenum identifier, GLuint name, + GLsizei length, const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glObjectPtrLabel, (const void *ptr, GLsizei length, + const GLchar *label)) +_COREGL_EXT_SYMBOL(void, glOrthofOES, (GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) +_COREGL_EXT_SYMBOL(void, glOrthoxOES, (GLfixed left, GLfixed right, + GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _COREGL_EXT_SYMBOL(void, glPointParameterxOES, (GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glPointParameterxvOES, (GLenum pname, const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glPointParameterxvOES, (GLenum pname, + const GLfixed *params)) _COREGL_EXT_SYMBOL(void, glPointSizexOES, (GLfixed size)) _COREGL_EXT_SYMBOL(void, glPolygonOffsetxOES, (GLfixed factor, GLfixed units)) _COREGL_EXT_SYMBOL(void, glPopDebugGroup, (void)) -_COREGL_EXT_SYMBOL(void, glPushDebugGroup, (GLenum source, GLuint id, GLsizei length, const GLchar *message)) +_COREGL_EXT_SYMBOL(void, glPushDebugGroup, (GLenum source, GLuint id, + GLsizei length, const GLchar *message)) _COREGL_EXT_SYMBOL(void, glQueryCounterEXT, (GLuint id, GLenum target)) -_COREGL_EXT_SYMBOL(void, glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) -_COREGL_EXT_SYMBOL(void, glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z)) -_COREGL_EXT_SYMBOL(void, glSampleCoveragexOES, (GLclampx value, GLboolean invert)) +_COREGL_EXT_SYMBOL(void, glRenderbufferStorageOES, (GLenum target, + GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_EXT_SYMBOL(void, glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, + GLfixed z)) +_COREGL_EXT_SYMBOL(void, glSampleCoveragexOES, (GLclampx value, + GLboolean invert)) _COREGL_EXT_SYMBOL(void, glScalexOES, (GLfixed x, GLfixed y, GLfixed z)) -_COREGL_EXT_SYMBOL(void, glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params)) -_COREGL_EXT_SYMBOL(void, glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param)) -_COREGL_EXT_SYMBOL(void, glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params)) -_COREGL_EXT_SYMBOL(void, glTexStorage2DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) -_COREGL_EXT_SYMBOL(void, glTexStorage3DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) -_COREGL_EXT_SYMBOL(void, glTexStorage3DMultisampleOES, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) +_COREGL_EXT_SYMBOL(void, glTexEnvxOES, (GLenum target, GLenum pname, + GLfixed param)) +_COREGL_EXT_SYMBOL(void, glTexEnvxvOES, (GLenum target, GLenum pname, + const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glTexParameterxOES, (GLenum target, GLenum pname, + GLfixed param)) +_COREGL_EXT_SYMBOL(void, glTexParameterxvOES, (GLenum target, GLenum pname, + const GLfixed *params)) +_COREGL_EXT_SYMBOL(void, glTexStorage2DEXT, (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_EXT_SYMBOL(void, glTexStorage3DEXT, (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) +_COREGL_EXT_SYMBOL(void, glTexStorage3DMultisampleOES, (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLboolean fixedsamplelocations)) _COREGL_EXT_SYMBOL(void, glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z)) /* OpenGL ES 3.0 */ _COREGL_START_API(COREGL_GLAPI_3) _COREGL_SYMBOL(void, glReadBuffer, (GLenum mode)) -_COREGL_SYMBOL(void, glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)) -_COREGL_SYMBOL(void, glTexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)) -_COREGL_SYMBOL(void, glTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)) -_COREGL_SYMBOL(void, glCopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) -_COREGL_SYMBOL(void, glCompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)) -_COREGL_SYMBOL(void, glCompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)) -_COREGL_SYMBOL(void, glGenQueries, (GLsizei n, GLuint* ids)) -_COREGL_SYMBOL(void, glDeleteQueries, (GLsizei n, const GLuint* ids)) +_COREGL_SYMBOL(void, glDrawRangeElements, (GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) +_COREGL_SYMBOL(void, glTexImage3D, (GLenum target, GLint level, + GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +_COREGL_SYMBOL(void, glTexSubImage3D, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) +_COREGL_SYMBOL(void, glCopyTexSubImage3D, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height)) +_COREGL_SYMBOL(void, glCompressedTexImage3D, (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const GLvoid *data)) +_COREGL_SYMBOL(void, glCompressedTexSubImage3D, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) +_COREGL_SYMBOL(void, glGenQueries, (GLsizei n, GLuint *ids)) +_COREGL_SYMBOL(void, glDeleteQueries, (GLsizei n, const GLuint *ids)) _COREGL_SYMBOL(GLboolean, glIsQuery, (GLuint id)) _COREGL_SYMBOL(void, glBeginQuery, (GLenum target, GLuint id)) _COREGL_SYMBOL(void, glEndQuery, (GLenum target)) -_COREGL_SYMBOL(void, glGetQueryiv, (GLenum target, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetQueryObjectuiv, (GLuint id, GLenum pname, GLuint* params)) +_COREGL_SYMBOL(void, glGetQueryiv, (GLenum target, GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetQueryObjectuiv, (GLuint id, GLenum pname, + GLuint *params)) _COREGL_SYMBOL(GLboolean, glUnmapBuffer, (GLenum target)) -_COREGL_SYMBOL(void, glGetBufferPointerv, (GLenum target, GLenum pname, GLvoid** params)) -_COREGL_SYMBOL(void, glDrawBuffers, (GLsizei n, const GLenum* bufs)) -_COREGL_SYMBOL(void, glUniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glUniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) -_COREGL_SYMBOL(void, glBlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) -_COREGL_SYMBOL(void, glRenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) -_COREGL_SYMBOL(void, glFramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) -_COREGL_SYMBOL(GLvoid*, glMapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) -_COREGL_SYMBOL(void, glFlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length)) +_COREGL_SYMBOL(void, glGetBufferPointerv, (GLenum target, GLenum pname, + GLvoid **params)) +_COREGL_SYMBOL(void, glDrawBuffers, (GLsizei n, const GLenum *bufs)) +_COREGL_SYMBOL(void, glUniformMatrix2x3fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix3x2fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix2x4fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix4x2fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix3x4fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glUniformMatrix4x3fv, (GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glBlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter)) +_COREGL_SYMBOL(void, glRenderbufferStorageMultisample, (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_SYMBOL(void, glFramebufferTextureLayer, (GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer)) +_COREGL_SYMBOL(GLvoid *, glMapBufferRange, (GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access)) +_COREGL_SYMBOL(void, glFlushMappedBufferRange, (GLenum target, GLintptr offset, + GLsizeiptr length)) _COREGL_SYMBOL(void, glBindVertexArray, (GLuint array)) -_COREGL_SYMBOL(void, glDeleteVertexArrays, (GLsizei n, const GLuint* arrays)) -_COREGL_SYMBOL(void, glGenVertexArrays, (GLsizei n, GLuint* arrays)) +_COREGL_SYMBOL(void, glDeleteVertexArrays, (GLsizei n, const GLuint *arrays)) +_COREGL_SYMBOL(void, glGenVertexArrays, (GLsizei n, GLuint *arrays)) _COREGL_SYMBOL(GLboolean, glIsVertexArray, (GLuint array)) -_COREGL_SYMBOL(void, glGetIntegeri_v, (GLenum target, GLuint index, GLint* data)) +_COREGL_SYMBOL(void, glGetIntegeri_v, (GLenum target, GLuint index, + GLint *data)) _COREGL_SYMBOL(void, glBeginTransformFeedback, (GLenum primitiveMode)) _COREGL_SYMBOL(void, glEndTransformFeedback, (void)) -_COREGL_SYMBOL(void, glBindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) -_COREGL_SYMBOL(void, glBindBufferBase, (GLenum target, GLuint index, GLuint buffer)) -_COREGL_SYMBOL(void, glTransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)) -_COREGL_SYMBOL(void, glGetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)) -_COREGL_SYMBOL(void, glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)) -_COREGL_SYMBOL(void, glGetVertexAttribIiv, (GLuint index, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint* params)) -_COREGL_SYMBOL(void, glVertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) -_COREGL_SYMBOL(void, glVertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) -_COREGL_SYMBOL(void, glVertexAttribI4iv, (GLuint index, const GLint* v)) -_COREGL_SYMBOL(void, glVertexAttribI4uiv, (GLuint index, const GLuint* v)) -_COREGL_SYMBOL(void, glGetUniformuiv, (GLuint program, GLint location, GLuint* params)) -_COREGL_SYMBOL(GLint, glGetFragDataLocation, (GLuint program, const GLchar *name)) +_COREGL_SYMBOL(void, glBindBufferRange, (GLenum target, GLuint index, + GLuint buffer, GLintptr offset, GLsizeiptr size)) +_COREGL_SYMBOL(void, glBindBufferBase, (GLenum target, GLuint index, + GLuint buffer)) +_COREGL_SYMBOL(void, glTransformFeedbackVaryings, (GLuint program, + GLsizei count, const GLchar *const *varyings, GLenum bufferMode)) +_COREGL_SYMBOL(void, glGetTransformFeedbackVarying, (GLuint program, + GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, + GLchar *name)) +_COREGL_SYMBOL(void, glVertexAttribIPointer, (GLuint index, GLint size, + GLenum type, GLsizei stride, const GLvoid *pointer)) +_COREGL_SYMBOL(void, glGetVertexAttribIiv, (GLuint index, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetVertexAttribIuiv, (GLuint index, GLenum pname, + GLuint *params)) +_COREGL_SYMBOL(void, glVertexAttribI4i, (GLuint index, GLint x, GLint y, + GLint z, GLint w)) +_COREGL_SYMBOL(void, glVertexAttribI4ui, (GLuint index, GLuint x, GLuint y, + GLuint z, GLuint w)) +_COREGL_SYMBOL(void, glVertexAttribI4iv, (GLuint index, const GLint *v)) +_COREGL_SYMBOL(void, glVertexAttribI4uiv, (GLuint index, const GLuint *v)) +_COREGL_SYMBOL(void, glGetUniformuiv, (GLuint program, GLint location, + GLuint *params)) +_COREGL_SYMBOL(GLint, glGetFragDataLocation, (GLuint program, + const GLchar *name)) _COREGL_SYMBOL(void, glUniform1ui, (GLint location, GLuint v0)) _COREGL_SYMBOL(void, glUniform2ui, (GLint location, GLuint v0, GLuint v1)) -_COREGL_SYMBOL(void, glUniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2)) -_COREGL_SYMBOL(void, glUniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) -_COREGL_SYMBOL(void, glUniform1uiv, (GLint location, GLsizei count, const GLuint* value)) -_COREGL_SYMBOL(void, glUniform2uiv, (GLint location, GLsizei count, const GLuint* value)) -_COREGL_SYMBOL(void, glUniform3uiv, (GLint location, GLsizei count, const GLuint* value)) -_COREGL_SYMBOL(void, glUniform4uiv, (GLint location, GLsizei count, const GLuint* value)) -_COREGL_SYMBOL(void, glClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint* value)) -_COREGL_SYMBOL(void, glClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint* value)) -_COREGL_SYMBOL(void, glClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat* value)) -_COREGL_SYMBOL(void, glClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) -_COREGL_SYMBOL(const GLubyte*, glGetStringi, (GLenum name, GLuint index)) -_COREGL_SYMBOL(void, glCopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) -_COREGL_SYMBOL(void, glGetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)) -_COREGL_SYMBOL(void, glGetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)) -_COREGL_SYMBOL(GLuint, glGetUniformBlockIndex, (GLuint program, const GLchar* uniformBlockName)) -_COREGL_SYMBOL(void, glGetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)) -_COREGL_SYMBOL(void, glUniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)) -_COREGL_SYMBOL(void, glDrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)) -_COREGL_SYMBOL(void, glDrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)) +_COREGL_SYMBOL(void, glUniform3ui, (GLint location, GLuint v0, GLuint v1, + GLuint v2)) +_COREGL_SYMBOL(void, glUniform4ui, (GLint location, GLuint v0, GLuint v1, + GLuint v2, GLuint v3)) +_COREGL_SYMBOL(void, glUniform1uiv, (GLint location, GLsizei count, + const GLuint *value)) +_COREGL_SYMBOL(void, glUniform2uiv, (GLint location, GLsizei count, + const GLuint *value)) +_COREGL_SYMBOL(void, glUniform3uiv, (GLint location, GLsizei count, + const GLuint *value)) +_COREGL_SYMBOL(void, glUniform4uiv, (GLint location, GLsizei count, + const GLuint *value)) +_COREGL_SYMBOL(void, glClearBufferiv, (GLenum buffer, GLint drawbuffer, + const GLint *value)) +_COREGL_SYMBOL(void, glClearBufferuiv, (GLenum buffer, GLint drawbuffer, + const GLuint *value)) +_COREGL_SYMBOL(void, glClearBufferfv, (GLenum buffer, GLint drawbuffer, + const GLfloat *value)) +_COREGL_SYMBOL(void, glClearBufferfi, (GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil)) +_COREGL_SYMBOL(const GLubyte *, glGetStringi, (GLenum name, GLuint index)) +_COREGL_SYMBOL(void, glCopyBufferSubData, (GLenum readTarget, + GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) +_COREGL_SYMBOL(void, glGetUniformIndices, (GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices)) +_COREGL_SYMBOL(void, glGetActiveUniformsiv, (GLuint program, + GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(GLuint, glGetUniformBlockIndex, (GLuint program, + const GLchar *uniformBlockName)) +_COREGL_SYMBOL(void, glGetActiveUniformBlockiv, (GLuint program, + GLuint uniformBlockIndex, GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetActiveUniformBlockName, (GLuint program, + GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, + GLchar *uniformBlockName)) +_COREGL_SYMBOL(void, glUniformBlockBinding, (GLuint program, + GLuint uniformBlockIndex, GLuint uniformBlockBinding)) +_COREGL_SYMBOL(void, glDrawArraysInstanced, (GLenum mode, GLint first, + GLsizei count, GLsizei instanceCount)) +_COREGL_SYMBOL(void, glDrawElementsInstanced, (GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, GLsizei instanceCount)) _COREGL_SYMBOL(GLsync, glFenceSync, (GLenum condition, GLbitfield flags)) _COREGL_SYMBOL(GLboolean, glIsSync, (GLsync sync)) _COREGL_SYMBOL(void, glDeleteSync, (GLsync sync)) -_COREGL_SYMBOL(GLenum, glClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) -_COREGL_SYMBOL(void, glWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) -_COREGL_SYMBOL(void, glGetInteger64v, (GLenum pname, GLint64* params)) -_COREGL_SYMBOL(void, glGetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)) -_COREGL_SYMBOL(void, glGetInteger64i_v, (GLenum target, GLuint index, GLint64* data)) -_COREGL_SYMBOL(void, glGetBufferParameteri64v, (GLenum target, GLenum pname, GLint64* params)) -_COREGL_SYMBOL(void, glGenSamplers, (GLsizei n, GLuint* samplers)) -_COREGL_SYMBOL(void, glDeleteSamplers, (GLsizei n, const GLuint* samplers)) +_COREGL_SYMBOL(GLenum, glClientWaitSync, (GLsync sync, GLbitfield flags, + GLuint64 timeout)) +_COREGL_SYMBOL(void, glWaitSync, (GLsync sync, GLbitfield flags, + GLuint64 timeout)) +_COREGL_SYMBOL(void, glGetInteger64v, (GLenum pname, GLint64 *params)) +_COREGL_SYMBOL(void, glGetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, + GLsizei *length, GLint *values)) +_COREGL_SYMBOL(void, glGetInteger64i_v, (GLenum target, GLuint index, + GLint64 *data)) +_COREGL_SYMBOL(void, glGetBufferParameteri64v, (GLenum target, GLenum pname, + GLint64 *params)) +_COREGL_SYMBOL(void, glGenSamplers, (GLsizei n, GLuint *samplers)) +_COREGL_SYMBOL(void, glDeleteSamplers, (GLsizei n, const GLuint *samplers)) _COREGL_SYMBOL(GLboolean, glIsSampler, (GLuint sampler)) _COREGL_SYMBOL(void, glBindSampler, (GLuint unit, GLuint sampler)) -_COREGL_SYMBOL(void, glSamplerParameteri, (GLuint sampler, GLenum pname, GLint param)) -_COREGL_SYMBOL(void, glSamplerParameteriv, (GLuint sampler, GLenum pname, const GLint* param)) -_COREGL_SYMBOL(void, glSamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param)) -_COREGL_SYMBOL(void, glSamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat* param)) -_COREGL_SYMBOL(void, glGetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint* params)) -_COREGL_SYMBOL(void, glGetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat* params)) +_COREGL_SYMBOL(void, glSamplerParameteri, (GLuint sampler, GLenum pname, + GLint param)) +_COREGL_SYMBOL(void, glSamplerParameteriv, (GLuint sampler, GLenum pname, + const GLint *param)) +_COREGL_SYMBOL(void, glSamplerParameterf, (GLuint sampler, GLenum pname, + GLfloat param)) +_COREGL_SYMBOL(void, glSamplerParameterfv, (GLuint sampler, GLenum pname, + const GLfloat *param)) +_COREGL_SYMBOL(void, glGetSamplerParameteriv, (GLuint sampler, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glGetSamplerParameterfv, (GLuint sampler, GLenum pname, + GLfloat *params)) _COREGL_SYMBOL(void, glVertexAttribDivisor, (GLuint index, GLuint divisor)) _COREGL_SYMBOL(void, glBindTransformFeedback, (GLenum target, GLuint id)) -_COREGL_SYMBOL(void, glDeleteTransformFeedbacks, (GLsizei n, const GLuint* ids)) -_COREGL_SYMBOL(void, glGenTransformFeedbacks, (GLsizei n, GLuint* ids)) +_COREGL_SYMBOL(void, glDeleteTransformFeedbacks, (GLsizei n, const GLuint *ids)) +_COREGL_SYMBOL(void, glGenTransformFeedbacks, (GLsizei n, GLuint *ids)) _COREGL_SYMBOL(GLboolean, glIsTransformFeedback, (GLuint id)) _COREGL_SYMBOL(void, glPauseTransformFeedback, (void)) _COREGL_SYMBOL(void, glResumeTransformFeedback, (void)) -_COREGL_SYMBOL(void, glGetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)) -_COREGL_SYMBOL(void, glProgramBinary, (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)) -_COREGL_SYMBOL(void, glProgramParameteri, (GLuint program, GLenum pname, GLint value)) -_COREGL_SYMBOL(void, glInvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum* attachments)) -_COREGL_SYMBOL(void, glInvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)) -_COREGL_SYMBOL(void, glTexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) -_COREGL_SYMBOL(void, glTexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) -_COREGL_SYMBOL(void, glGetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)) +_COREGL_SYMBOL(void, glGetProgramBinary, (GLuint program, GLsizei bufSize, + GLsizei *length, GLenum *binaryFormat, GLvoid *binary)) +_COREGL_SYMBOL(void, glProgramBinary, (GLuint program, GLenum binaryFormat, + const GLvoid *binary, GLsizei length)) +_COREGL_SYMBOL(void, glProgramParameteri, (GLuint program, GLenum pname, + GLint value)) +_COREGL_SYMBOL(void, glInvalidateFramebuffer, (GLenum target, + GLsizei numAttachments, const GLenum *attachments)) +_COREGL_SYMBOL(void, glInvalidateSubFramebuffer, (GLenum target, + GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, + GLsizei width, GLsizei height)) +_COREGL_SYMBOL(void, glTexStorage2D, (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_SYMBOL(void, glTexStorage3D, (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) +_COREGL_SYMBOL(void, glGetInternalformativ, (GLenum target, + GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)) _COREGL_END_API(COREGL_GLAPI_3) /* OpenGL ES 3.1 */ _COREGL_START_API(COREGL_GLAPI_31) -_COREGL_SYMBOL(GLuint, glCreateShaderProgramv, (GLenum type, GLsizei count, const GLchar *const*strings)) +_COREGL_SYMBOL(GLuint, glCreateShaderProgramv, (GLenum type, GLsizei count, + const GLchar *const *strings)) _COREGL_SYMBOL(void, glGenProgramPipelines, (GLsizei n, GLuint *pipelines)) _COREGL_SYMBOL(void, glBindProgramPipeline, (GLuint pipeline)) -_COREGL_SYMBOL(void, glGetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint *params)) -_COREGL_SYMBOL(void, glDeleteProgramPipelines, (GLsizei n, GLuint const *pipelines)) +_COREGL_SYMBOL(void, glGetProgramPipelineiv, (GLuint pipeline, GLenum pname, + GLint *params)) +_COREGL_SYMBOL(void, glDeleteProgramPipelines, (GLsizei n, + GLuint const *pipelines)) _COREGL_SYMBOL(GLboolean, glIsProgramPipeline, (GLuint pipeline)) _COREGL_SYMBOL(void, glValidateProgramPipeline, (GLuint pipeline)) -_COREGL_SYMBOL(void, glGetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) -_COREGL_SYMBOL(void, glDispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)) +_COREGL_SYMBOL(void, glGetProgramPipelineInfoLog, (GLuint pipeline, + GLsizei bufSize, GLsizei *length, GLchar *infoLog)) +_COREGL_SYMBOL(void, glDispatchCompute, (GLuint num_groups_x, + GLuint num_groups_y, GLuint num_groups_z)) _COREGL_SYMBOL(void, glDispatchComputeIndirect, (GLintptr indirect)) -_COREGL_SYMBOL(void, glDrawArraysIndirect, (GLenum mode, GLvoid const *indirect)) -_COREGL_SYMBOL(void, glDrawElementsIndirect, (GLenum mode, GLenum type, GLvoid const *indirect)) -_COREGL_SYMBOL(void, glFramebufferParameteri, (GLenum target, GLenum pname, GLint param)) -_COREGL_SYMBOL(void, glGetFramebufferParameteriv, ( GLenum target, GLenum pname, GLint * params)) -_COREGL_SYMBOL(void, glGetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint * params)) -_COREGL_SYMBOL(GLuint, glGetProgramResourceIndex, (GLuint program, GLenum programInterface, const char * name)) -_COREGL_SYMBOL(void, glGetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)) -_COREGL_SYMBOL(void, glGetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params)) -_COREGL_SYMBOL(GLint, glGetProgramResourceLocation, (GLuint program, GLenum programInterface, GLchar const *name)) -_COREGL_SYMBOL(void, glUseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program)) +_COREGL_SYMBOL(void, glDrawArraysIndirect, (GLenum mode, + GLvoid const *indirect)) +_COREGL_SYMBOL(void, glDrawElementsIndirect, (GLenum mode, GLenum type, + GLvoid const *indirect)) +_COREGL_SYMBOL(void, glFramebufferParameteri, (GLenum target, GLenum pname, + GLint param)) +_COREGL_SYMBOL(void, glGetFramebufferParameteriv, ( GLenum target, + GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetProgramInterfaceiv, (GLuint program, + GLenum programInterface, GLenum pname, GLint *params)) +_COREGL_SYMBOL(GLuint, glGetProgramResourceIndex, (GLuint program, + GLenum programInterface, const char *name)) +_COREGL_SYMBOL(void, glGetProgramResourceName, (GLuint program, + GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, + GLchar *name)) +_COREGL_SYMBOL(void, glGetProgramResourceiv, (GLuint program, + GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, + GLsizei bufSize, GLsizei *length, GLint *params)) +_COREGL_SYMBOL(GLint, glGetProgramResourceLocation, (GLuint program, + GLenum programInterface, GLchar const *name)) +_COREGL_SYMBOL(void, glUseProgramStages, (GLuint pipeline, GLbitfield stages, + GLuint program)) _COREGL_SYMBOL(void, glActiveShaderProgram, (GLuint pipeline, GLuint program)) -_COREGL_SYMBOL(void, glProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_SYMBOL(void, glProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_SYMBOL(void, glProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_SYMBOL(void, glProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_SYMBOL(void, glProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniform1i, (GLuint program, GLint location, GLint x)) -_COREGL_SYMBOL(void, glProgramUniform2i, (GLuint program, GLint location, GLint x, GLint y)) -_COREGL_SYMBOL(void, glProgramUniform3i, (GLuint program, GLint location, GLint x, GLint y, GLint z)) -_COREGL_SYMBOL(void, glProgramUniform4i, (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)) -_COREGL_SYMBOL(void, glProgramUniform1f, (GLuint program, GLint location, GLfloat x)) -_COREGL_SYMBOL(void, glProgramUniform2f, (GLuint program, GLint location, GLfloat x, GLfloat y)) -_COREGL_SYMBOL(void, glProgramUniform3f, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)) -_COREGL_SYMBOL(void, glProgramUniform4f, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) -_COREGL_SYMBOL(void, glProgramUniform1ui, (GLuint program, GLint location, GLuint x)) -_COREGL_SYMBOL(void, glProgramUniform2ui, (GLuint program, GLint location, GLuint x, GLuint y)) -_COREGL_SYMBOL(void, glProgramUniform3ui, (GLuint program, GLint location, GLuint x, GLuint y, GLuint z)) -_COREGL_SYMBOL(void, glProgramUniform4ui, (GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) -_COREGL_SYMBOL(void, glProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) -_COREGL_SYMBOL(void, glProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) -_COREGL_SYMBOL(void, glProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) -_COREGL_SYMBOL(void, glProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_SYMBOL(void, glBindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) -_COREGL_SYMBOL(void, glGetBooleani_v, (GLenum target, GLuint index, GLboolean *data)) +_COREGL_SYMBOL(void, glProgramUniform1iv, (GLuint program, GLint location, + GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform2iv, (GLuint program, GLint location, + GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform3iv, (GLuint program, GLint location, + GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform4iv, (GLuint program, GLint location, + GLsizei count, const GLint *value)) +_COREGL_SYMBOL(void, glProgramUniform1fv, (GLuint program, GLint location, + GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform2fv, (GLuint program, GLint location, + GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform3fv, (GLuint program, GLint location, + GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform4fv, (GLuint program, GLint location, + GLsizei count, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix2fv, (GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix3fv, (GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix4fv, (GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniform1i, (GLuint program, GLint location, + GLint x)) +_COREGL_SYMBOL(void, glProgramUniform2i, (GLuint program, GLint location, + GLint x, GLint y)) +_COREGL_SYMBOL(void, glProgramUniform3i, (GLuint program, GLint location, + GLint x, GLint y, GLint z)) +_COREGL_SYMBOL(void, glProgramUniform4i, (GLuint program, GLint location, + GLint x, GLint y, GLint z, GLint w)) +_COREGL_SYMBOL(void, glProgramUniform1f, (GLuint program, GLint location, + GLfloat x)) +_COREGL_SYMBOL(void, glProgramUniform2f, (GLuint program, GLint location, + GLfloat x, GLfloat y)) +_COREGL_SYMBOL(void, glProgramUniform3f, (GLuint program, GLint location, + GLfloat x, GLfloat y, GLfloat z)) +_COREGL_SYMBOL(void, glProgramUniform4f, (GLuint program, GLint location, + GLfloat x, GLfloat y, GLfloat z, GLfloat w)) +_COREGL_SYMBOL(void, glProgramUniform1ui, (GLuint program, GLint location, + GLuint x)) +_COREGL_SYMBOL(void, glProgramUniform2ui, (GLuint program, GLint location, + GLuint x, GLuint y)) +_COREGL_SYMBOL(void, glProgramUniform3ui, (GLuint program, GLint location, + GLuint x, GLuint y, GLuint z)) +_COREGL_SYMBOL(void, glProgramUniform4ui, (GLuint program, GLint location, + GLuint x, GLuint y, GLuint z, GLuint w)) +_COREGL_SYMBOL(void, glProgramUniform1uiv, (GLuint program, GLint location, + GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniform2uiv, (GLuint program, GLint location, + GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniform3uiv, (GLuint program, GLint location, + GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniform4uiv, (GLuint program, GLint location, + GLsizei count, const GLuint *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix2x3fv, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix3x2fv, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix4x2fv, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix2x4fv, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix3x4fv, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glProgramUniformMatrix4x3fv, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_SYMBOL(void, glBindImageTexture, (GLuint unit, GLuint texture, + GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) +_COREGL_SYMBOL(void, glGetBooleani_v, (GLenum target, GLuint index, + GLboolean *data)) _COREGL_SYMBOL(void, glMemoryBarrier, (GLbitfield barriers)) _COREGL_SYMBOL(void, glMemoryBarrierByRegion, (GLbitfield barriers)) -_COREGL_SYMBOL(void, glTexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) -_COREGL_SYMBOL(void, glGetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) +_COREGL_SYMBOL(void, glTexStorage2DMultisample, (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations)) +_COREGL_SYMBOL(void, glGetMultisamplefv, (GLenum pname, GLuint index, + GLfloat *val)) _COREGL_SYMBOL(void, glSampleMaski, (GLuint maskNumber, GLbitfield mask)) -_COREGL_SYMBOL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) -_COREGL_SYMBOL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) -_COREGL_SYMBOL(void, glBindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) -_COREGL_SYMBOL(void, glVertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) -_COREGL_SYMBOL(void, glVertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) -_COREGL_SYMBOL(void, glVertexAttribBinding, (GLuint attribindex, GLuint bindingindex)) -_COREGL_SYMBOL(void, glVertexBindingDivisor, (GLuint bindingindex, GLuint divisor)) +_COREGL_SYMBOL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, + GLenum pname, GLint *params)) +_COREGL_SYMBOL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, + GLenum pname, GLfloat *params)) +_COREGL_SYMBOL(void, glBindVertexBuffer, (GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride)) +_COREGL_SYMBOL(void, glVertexAttribFormat, (GLuint attribindex, GLint size, + GLenum type, GLboolean normalized, GLuint relativeoffset)) +_COREGL_SYMBOL(void, glVertexAttribIFormat, (GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset)) +_COREGL_SYMBOL(void, glVertexAttribBinding, (GLuint attribindex, + GLuint bindingindex)) +_COREGL_SYMBOL(void, glVertexBindingDivisor, (GLuint bindingindex, + GLuint divisor)) _COREGL_END_API(COREGL_GLAPI_31) /* Extensions */ _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_EGL_image", 1.1, -1) -_COREGL_EXT_SYMBOL(void, glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image)) -_COREGL_EXT_SYMBOL(void, glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image)) +_COREGL_EXT_SYMBOL(void, glEGLImageTargetTexture2DOES, (GLenum target, + GLeglImageOES image)) +_COREGL_EXT_SYMBOL(void, glEGLImageTargetRenderbufferStorageOES, (GLenum target, + GLeglImageOES image)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_EGL_image_external", 1.1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_surfaceless_context", 1.1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_fixed_point", 1.1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_get_program_binary", 2.0, -1) -_COREGL_EXT_SYMBOL(void, glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)) -_COREGL_EXT_SYMBOL(void, glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)) +_COREGL_EXT_SYMBOL(void, glGetProgramBinaryOES, (GLuint program, + GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)) +_COREGL_EXT_SYMBOL(void, glProgramBinaryOES, (GLuint program, + GLenum binaryFormat, const GLvoid *binary, GLsizei length)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_AMD_program_binary_Z400", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_IMG_program_binary ", 2.0, -1) @@ -471,69 +753,119 @@ _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ARM_mali_program_binary", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_program_binary", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_separate_shader_objects", 2.0, -1) -_COREGL_EXT_SYMBOL(void, glUseProgramStagesEXT, (GLuint pipeline, GLbitfield stages, GLuint program)) -_COREGL_EXT_SYMBOL(void, glActiveShaderProgramEXT, (GLuint pipeline, GLuint program)) -_COREGL_EXT_SYMBOL(GLuint, glCreateShaderProgramvEXT, (GLenum type, GLsizei count, const char **strings)) +_COREGL_EXT_SYMBOL(void, glUseProgramStagesEXT, (GLuint pipeline, + GLbitfield stages, GLuint program)) +_COREGL_EXT_SYMBOL(void, glActiveShaderProgramEXT, (GLuint pipeline, + GLuint program)) +_COREGL_EXT_SYMBOL(GLuint, glCreateShaderProgramvEXT, (GLenum type, + GLsizei count, const char **strings)) _COREGL_EXT_SYMBOL(void, glBindProgramPipelineEXT, (GLuint pipeline)) -_COREGL_EXT_SYMBOL(void, glDeleteProgramPipelinesEXT, (GLsizei n, const GLuint *pipelines)) -_COREGL_EXT_SYMBOL(void, glGenProgramPipelinesEXT, (GLsizei n, GLuint *pipelines)) +_COREGL_EXT_SYMBOL(void, glDeleteProgramPipelinesEXT, (GLsizei n, + const GLuint *pipelines)) +_COREGL_EXT_SYMBOL(void, glGenProgramPipelinesEXT, (GLsizei n, + GLuint *pipelines)) _COREGL_EXT_SYMBOL(GLboolean, glIsProgramPipelineEXT, (GLuint pipeline)) -_COREGL_EXT_SYMBOL(void, glProgramParameteriEXT, (GLuint program, GLenum pname, GLint value)) -_COREGL_EXT_SYMBOL(void, glGetProgramPipelineivEXT, (GLuint pipeline, GLenum pname, GLint *params)) -_COREGL_EXT_SYMBOL(void, glProgramUniform1iEXT, (GLuint program, GLint location, GLint x)) -_COREGL_EXT_SYMBOL(void, glProgramUniform2iEXT, (GLuint program, GLint location, GLint x, GLint y)) -_COREGL_EXT_SYMBOL(void, glProgramUniform3iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z)) -_COREGL_EXT_SYMBOL(void, glProgramUniform4iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)) -_COREGL_EXT_SYMBOL(void, glProgramUniform1fEXT, (GLuint program, GLint location, GLfloat x)) -_COREGL_EXT_SYMBOL(void, glProgramUniform2fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y)) -_COREGL_EXT_SYMBOL(void, glProgramUniform3fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)) -_COREGL_EXT_SYMBOL(void, glProgramUniform4fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) -_COREGL_EXT_SYMBOL(void, glProgramUniform1ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform2ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform3ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform4ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform1fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform2fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform3fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniform4fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniformMatrix2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniformMatrix3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) -_COREGL_EXT_SYMBOL(void, glProgramUniformMatrix4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramParameteriEXT, (GLuint program, GLenum pname, + GLint value)) +_COREGL_EXT_SYMBOL(void, glGetProgramPipelineivEXT, (GLuint pipeline, + GLenum pname, GLint *params)) +_COREGL_EXT_SYMBOL(void, glProgramUniform1iEXT, (GLuint program, GLint location, + GLint x)) +_COREGL_EXT_SYMBOL(void, glProgramUniform2iEXT, (GLuint program, GLint location, + GLint x, GLint y)) +_COREGL_EXT_SYMBOL(void, glProgramUniform3iEXT, (GLuint program, GLint location, + GLint x, GLint y, GLint z)) +_COREGL_EXT_SYMBOL(void, glProgramUniform4iEXT, (GLuint program, GLint location, + GLint x, GLint y, GLint z, GLint w)) +_COREGL_EXT_SYMBOL(void, glProgramUniform1fEXT, (GLuint program, GLint location, + GLfloat x)) +_COREGL_EXT_SYMBOL(void, glProgramUniform2fEXT, (GLuint program, GLint location, + GLfloat x, GLfloat y)) +_COREGL_EXT_SYMBOL(void, glProgramUniform3fEXT, (GLuint program, GLint location, + GLfloat x, GLfloat y, GLfloat z)) +_COREGL_EXT_SYMBOL(void, glProgramUniform4fEXT, (GLuint program, GLint location, + GLfloat x, GLfloat y, GLfloat z, GLfloat w)) +_COREGL_EXT_SYMBOL(void, glProgramUniform1ivEXT, (GLuint program, + GLint location, GLsizei count, const GLint *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform2ivEXT, (GLuint program, + GLint location, GLsizei count, const GLint *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform3ivEXT, (GLuint program, + GLint location, GLsizei count, const GLint *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform4ivEXT, (GLuint program, + GLint location, GLsizei count, const GLint *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform1fvEXT, (GLuint program, + GLint location, GLsizei count, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform2fvEXT, (GLuint program, + GLint location, GLsizei count, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform3fvEXT, (GLuint program, + GLint location, GLsizei count, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniform4fvEXT, (GLuint program, + GLint location, GLsizei count, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniformMatrix2fvEXT, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniformMatrix3fvEXT, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +_COREGL_EXT_SYMBOL(void, glProgramUniformMatrix4fvEXT, (GLuint program, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _COREGL_EXT_SYMBOL(void, glValidateProgramPipelineEXT, (GLuint pipeline)) -_COREGL_EXT_SYMBOL(void, glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei *length, char *infoLog)) +_COREGL_EXT_SYMBOL(void, glGetProgramPipelineInfoLogEXT, (GLuint pipeline, + GLsizei bufSize, GLsizei *length, char *infoLog)) -_COREGL_EXT_SYMBOL(void, glGetQueryObjecti64vEXT,(GLuint id, GLenum pname, GLint64 *params)) -_COREGL_EXT_SYMBOL(void, glGetQueryObjectivEXT,(GLuint id, GLenum pname, GLint *params)) -_COREGL_EXT_SYMBOL(void, glGetQueryObjectui64vEXT,(GLuint id, GLenum pname, GLuint64 *params)) -_COREGL_EXT_SYMBOL(void, glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint* params)) -_COREGL_EXT_SYMBOL(void, glGetQueryivEXT, (GLenum target, GLenum pname, GLint* params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjecti64vEXT, (GLuint id, GLenum pname, + GLint64 *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjectivEXT, (GLuint id, GLenum pname, + GLint *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjectui64vEXT, (GLuint id, GLenum pname, + GLuint64 *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryObjectuivEXT, (GLuint id, GLenum pname, + GLuint *params)) +_COREGL_EXT_SYMBOL(void, glGetQueryivEXT, (GLenum target, GLenum pname, + GLint *params)) _COREGL_EXT_SYMBOL(void, glBeginQueryEXT, (GLenum target, GLuint id)) -_COREGL_EXT_SYMBOL(void, glDeleteQueriesEXT, (GLsizei n, const GLuint* ids)) -_COREGL_EXT_SYMBOL(void, glGenQueriesEXT, (GLsizei n, GLuint* ids)) +_COREGL_EXT_SYMBOL(void, glDeleteQueriesEXT, (GLsizei n, const GLuint *ids)) +_COREGL_EXT_SYMBOL(void, glGenQueriesEXT, (GLsizei n, GLuint *ids)) _COREGL_EXT_SYMBOL(GLboolean, glIsQueryEXT, (GLuint id)) _COREGL_EXT_SYMBOL(void, glEndQueryEXT, (GLenum target)) -_COREGL_EXT_SYMBOL(void, glBindVertexArrayOES,(GLuint array)) -_COREGL_EXT_SYMBOL(void, glDeleteVertexArraysOES,(GLsizei n, GLuint const *arrays)) -_COREGL_EXT_SYMBOL(GLboolean, glIsVertexArrayOES,(GLuint array)) -_COREGL_EXT_SYMBOL(void, glGenVertexArraysOES,(GLsizei n, GLuint *arrays)) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_multisampled_render_to_texture", 2.0, -1) -_COREGL_EXT_SYMBOL(void, glRenderbufferStorageMultisampleEXT, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) -_COREGL_EXT_SYMBOL(void, glFramebufferTexture2DMultisampleEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)) +_COREGL_EXT_SYMBOL(void, glBindVertexArrayOES, (GLuint array)) +_COREGL_EXT_SYMBOL(void, glDeleteVertexArraysOES, (GLsizei n, + GLuint const *arrays)) +_COREGL_EXT_SYMBOL(GLboolean, glIsVertexArrayOES, (GLuint array)) +_COREGL_EXT_SYMBOL(void, glGenVertexArraysOES, (GLsizei n, GLuint *arrays)) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_multisampled_render_to_texture", + 2.0, -1) +_COREGL_EXT_SYMBOL(void, glRenderbufferStorageMultisampleEXT, (GLenum target, + GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) +_COREGL_EXT_SYMBOL(void, glFramebufferTexture2DMultisampleEXT, (GLenum target, + GLenum attachment, GLenum textarget, GLuint texture, GLint level, + GLsizei samples)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_discard_framebuffer", 1.0, -1) -_COREGL_EXT_SYMBOL(void, glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum* attachments)) +_COREGL_EXT_SYMBOL(void, glDiscardFramebufferEXT, (GLenum target, + GLsizei numAttachments, const GLenum *attachments)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_3D", 2.0, -1) -_COREGL_EXT_SYMBOL(void, glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels)) -_COREGL_EXT_SYMBOL(void, glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)) -_COREGL_EXT_SYMBOL(void, glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) -_COREGL_EXT_SYMBOL(void, glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)) -_COREGL_EXT_SYMBOL(void, glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)) +_COREGL_EXT_SYMBOL(void, glTexImage3DOES, (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLenum format, GLenum type, const void *pixels)) +_COREGL_EXT_SYMBOL(void, glTexSubImage3DOES, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) +_COREGL_EXT_SYMBOL(void, glCopyTexSubImage3DOES, (GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, + GLsizei height)) +_COREGL_EXT_SYMBOL(void, glCompressedTexImage3DOES, (GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const GLvoid *data)) +_COREGL_EXT_SYMBOL(void, glCompressedTexSubImage3DOES, (GLenum target, + GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, + const GLvoid *data)) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_mapbuffer", 1.1, -1) -_COREGL_EXT_SYMBOL(void, glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid** params)) -_COREGL_EXT_SYMBOL(void*, glMapBufferOES, (GLenum target, GLenum access)) +_COREGL_EXT_SYMBOL(void, glGetBufferPointervOES, (GLenum target, GLenum pname, + GLvoid **params)) +_COREGL_EXT_SYMBOL(void *, glMapBufferOES, (GLenum target, GLenum access)) _COREGL_EXT_SYMBOL(GLboolean, glUnmapBufferOES, (GLenum target)) /* @@ -553,36 +885,48 @@ _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_DMP_shader_binary", -1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_FJ_shader_binary_GCCSO", -1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ARM_mali_shader_binary", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_compressed_ETC1_RGB8_texture", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_compressed_paletted_texture", -1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_compressed_ETC1_RGB8_texture", -1, + -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_compressed_paletted_texture", -1, + -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_AMD_compressed_3DC_texture", -1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_AMD_compressed_ATC_texture", -1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_compression_dxt1", -1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_IMG_texture_compression_pvrtc", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_NV_texture_compression_s3tc_update", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_texture_compression_dxt3", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_texture_compression_dxt5", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_KHR_texture_compression_astc_ldr", -1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_NV_texture_compression_s3tc_update", + -1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_texture_compression_dxt3", -1, + -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_texture_compression_dxt5", -1, + -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_KHR_texture_compression_astc_ldr", -1, + -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_NV_texture_compression_s3tc", -1, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_NV_texture_compression_latc", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_IMG_texture_compression_pvrtc2", -1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_IMG_texture_compression_pvrtc2", -1, + -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_type_2_10_10_10_REV", -1, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_type_2_10_10_10_REV", -1, + -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_format_BGRA8888", -1, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_APPLE_texture_format_BGRA8888", 1.0, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_half_float_linear", 2.0, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_APPLE_texture_format_BGRA8888", 1.0, + -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_half_float_linear", 2.0, + -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_float_linear", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_half_float", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_float", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_texture_npot", 1.0, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_IMG_texture_env_enhanced_fixed_function", 1.0, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_IMG_texture_env_enhanced_fixed_function", + 1.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_APPLE_texture_max_level", 1.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_NV_texture_npot_2D_mipmap", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_ANGLE_texture_usage", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_rg", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_sRGB", 1.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_sRGB_decode", 2.0, -1) -_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_filter_anisotropic", 1.2, -1) +_COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_EXT_texture_filter_anisotropic", 1.2, + -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_standard_derivatives", 2.0, -1) _COREGL_FASTPATH_SUPPORTED_EXTENSION("GL_OES_depth24", 1.0, -1) diff --git a/src/headers/sym_glx.h b/src/headers/sym_glx.h index a12015d..ccde73e 100644 --- a/src/headers/sym_glx.h +++ b/src/headers/sym_glx.h @@ -8,37 +8,52 @@ #define _COREGL_EXT_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) #endif -_COREGL_SYMBOL(_eng_fn, glXGetProcAddress, (const char* procName)) +_COREGL_SYMBOL(_eng_fn, glXGetProcAddress, (const char *procName)) // Standard GL(glX) functions -_COREGL_SYMBOL(XVisualInfo*, glXChooseVisual, (Display* dpy, int screen, int* attribList)) -_COREGL_SYMBOL(GLXContext, glXCreateContext, (Display* dpy, XVisualInfo* vis, GLXContext shareList, Bool direct)) -_COREGL_SYMBOL(void, glXDestroyContext, (Display* dpy, GLXContext ctx)) +_COREGL_SYMBOL(XVisualInfo *, glXChooseVisual, (Display *dpy, int screen, + int *attribList)) +_COREGL_SYMBOL(GLXContext, glXCreateContext, (Display *dpy, XVisualInfo *vis, + GLXContext shareList, Bool direct)) +_COREGL_SYMBOL(void, glXDestroyContext, (Display *dpy, GLXContext ctx)) _COREGL_SYMBOL(GLXContext, glXGetCurrentContext, (void)) _COREGL_SYMBOL(GLXDrawable, glXGetCurrentDrawable, (void)) -_COREGL_SYMBOL(Bool, glXMakeCurrent, (Display* dpy, GLXDrawable draw, GLXContext ctx)) -_COREGL_SYMBOL(void, glXSwapBuffers, (Display* dpy, GLXDrawable draw)) +_COREGL_SYMBOL(Bool, glXMakeCurrent, (Display *dpy, GLXDrawable draw, + GLXContext ctx)) +_COREGL_SYMBOL(void, glXSwapBuffers, (Display *dpy, GLXDrawable draw)) _COREGL_SYMBOL(void, glXWaitX, (void)) _COREGL_SYMBOL(void, glXWaitGL, (void)) -_COREGL_SYMBOL(Bool, glXQueryExtension, (Display* dpy, int* errorb, int* event)) -_COREGL_SYMBOL(const char*, glXQueryExtensionsString, (Display *dpy, int screen)) +_COREGL_SYMBOL(Bool, glXQueryExtension, (Display *dpy, int *errorb, int *event)) +_COREGL_SYMBOL(const char *, glXQueryExtensionsString, (Display *dpy, + int screen)) -_COREGL_SYMBOL(GLXFBConfig*, glXChooseFBConfig, (Display* dpy, int screen, const int* attribList, int* nitems)) -_COREGL_SYMBOL(GLXFBConfig*, glXGetFBConfigs, (Display* dpy, int screen, int* nelements)) -_COREGL_SYMBOL(int, glXGetFBConfigAttrib, (Display* dpy, GLXFBConfig config, int attribute, int* value)) -_COREGL_SYMBOL(XVisualInfo*, glXGetVisualFromFBConfig, (Display* dpy, GLXFBConfig config)) -_COREGL_SYMBOL(void, glXDestroyWindow, (Display* dpy, GLXWindow window)) -_COREGL_SYMBOL(Bool, glXMakeContextCurrent, (Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)) +_COREGL_SYMBOL(GLXFBConfig *, glXChooseFBConfig, (Display *dpy, int screen, + const int *attribList, int *nitems)) +_COREGL_SYMBOL(GLXFBConfig *, glXGetFBConfigs, (Display *dpy, int screen, + int *nelements)) +_COREGL_SYMBOL(int, glXGetFBConfigAttrib, (Display *dpy, GLXFBConfig config, + int attribute, int *value)) +_COREGL_SYMBOL(XVisualInfo *, glXGetVisualFromFBConfig, (Display *dpy, + GLXFBConfig config)) +_COREGL_SYMBOL(void, glXDestroyWindow, (Display *dpy, GLXWindow window)) +_COREGL_SYMBOL(Bool, glXMakeContextCurrent, (Display *dpy, GLXDrawable draw, + GLXDrawable read, GLXContext ctx)) -_COREGL_SYMBOL(void, glXBindTexImage, (Display* dpy, GLXDrawable draw, int buffer, int* attribList)) -_COREGL_SYMBOL(void, glXReleaseTexImage, (Display* dpy, GLXDrawable draw, int buffer)) -_COREGL_SYMBOL(int, glXGetVideoSync, (unsigned int* count)) -_COREGL_SYMBOL(int, glXWaitVideoSync, (int divisor, int remainder, unsigned int* count)) -_COREGL_SYMBOL(XID, glXCreatePixmap, (Display* dpy, void* config, Pixmap pixmap, const int* attribList)) -_COREGL_SYMBOL(void, glXDestroyPixmap, (Display* dpy, XID pixmap)) -_COREGL_SYMBOL(void, glXQueryDrawable, (Display* dpy, XID draw, int attribute, unsigned int* value)) +_COREGL_SYMBOL(void, glXBindTexImage, (Display *dpy, GLXDrawable draw, + int buffer, int *attribList)) +_COREGL_SYMBOL(void, glXReleaseTexImage, (Display *dpy, GLXDrawable draw, + int buffer)) +_COREGL_SYMBOL(int, glXGetVideoSync, (unsigned int *count)) +_COREGL_SYMBOL(int, glXWaitVideoSync, (int divisor, int remainder, + unsigned int *count)) +_COREGL_SYMBOL(XID, glXCreatePixmap, (Display *dpy, void *config, Pixmap pixmap, + const int *attribList)) +_COREGL_SYMBOL(void, glXDestroyPixmap, (Display *dpy, XID pixmap)) +_COREGL_SYMBOL(void, glXQueryDrawable, (Display *dpy, XID draw, int attribute, + unsigned int *value)) _COREGL_SYMBOL(int, glXSwapIntervalSGI, (int interval)) -_COREGL_SYMBOL(void, glXSwapIntervalEXT, (Display* dpy, GLXDrawable draw, int interval)) +_COREGL_SYMBOL(void, glXSwapIntervalEXT, (Display *dpy, GLXDrawable draw, + int interval)) #ifdef _COREGL_EXT_SYMBOL_NOT_DEFINED #undef _COREGL_EXT_SYMBOL_NOT_DEFINED diff --git a/src/modules/appopt/coregl_appopt.c b/src/modules/appopt/coregl_appopt.c index ae582f3..2da19f4 100644 --- a/src/modules/appopt/coregl_appopt.c +++ b/src/modules/appopt/coregl_appopt.c @@ -37,8 +37,7 @@ init_modules_tstate_appopt(GLThreadState *tstate) void deinit_modules_tstate_appopt(GLThreadState *tstate) { - if (tstate->module_data[MY_MODULE_ID] != NULL) - { + if (tstate->module_data[MY_MODULE_ID] != NULL) { free(tstate->module_data[MY_MODULE_ID]); tstate->module_data[MY_MODULE_ID] = NULL; } diff --git a/src/modules/appopt/coregl_appopt.h b/src/modules/appopt/coregl_appopt.h index b9f3368..69dd68d 100644 --- a/src/modules/appopt/coregl_appopt.h +++ b/src/modules/appopt/coregl_appopt.h @@ -22,8 +22,7 @@ # include "../../headers/sym.h" #undef _COREGL_SYMBOL -typedef struct _Appopt_ThreadState -{ +typedef struct _Appopt_ThreadState { void *_notusedyet; } Appopt_ThreadState; diff --git a/src/modules/coregl_module.h b/src/modules/coregl_module.h index b72749f..b04ab53 100644 --- a/src/modules/coregl_module.h +++ b/src/modules/coregl_module.h @@ -6,8 +6,7 @@ #define COREGL_USE_MODULE_APPOPT -typedef enum -{ +typedef enum { COREGL_MODULE_TRACEPATH = 0, COREGL_MODULE_FASTPATH = 1, COREGL_MODULE_APPOPT = 2 diff --git a/src/modules/fastpath/coregl_fastpath.c b/src/modules/fastpath/coregl_fastpath.c index 85cc12a..5da81fe 100644 --- a/src/modules/fastpath/coregl_fastpath.c +++ b/src/modules/fastpath/coregl_fastpath.c @@ -26,7 +26,7 @@ GLGlueContext *initial_ctx = NULL; Mutex ctx_list_access_mutex = MUTEX_INITIALIZER; GLContext_List *glctx_list = NULL; -static int api_gl_version=COREGL_GLAPI_2; +static int api_gl_version = COREGL_GLAPI_2; static void _state_get_texture_states(GLenum pname, GLint *params) @@ -37,8 +37,7 @@ _state_get_texture_states(GLenum pname, GLint *params) _orig_fastpath_glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint *)&cur_active_tex); int i; - for (i = 0; i < initial_ctx->gl_num_tex_units[0]; i++) - { + for (i = 0; i < initial_ctx->gl_num_tex_units[0]; i++) { _orig_fastpath_glActiveTexture(GL_TEXTURE0 + i); _orig_fastpath_glGetIntegerv(pname, (GLint *)¶ms[i]); } @@ -51,8 +50,7 @@ _state_get_draw_buffers(GLenum *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_draw_buffers[0]; i++) - { + for (i = 0; i < initial_ctx->gl_num_draw_buffers[0]; i++) { _orig_fastpath_glGetIntegerv(GL_DRAW_BUFFER0 + i, (GLint *)¶ms[i]); } } @@ -63,9 +61,10 @@ _state_get_transform_feedback_buffer_bindings(GLuint *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_transform_feedback_separate_attribs[0]; i++) - { - _orig_fastpath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_ctx->gl_num_transform_feedback_separate_attribs[0]; + i++) { + _orig_fastpath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, i, + (GLint *)¶ms[i]); } } @@ -75,9 +74,10 @@ _state_get_transform_feedback_buffer_bindings_offset(GLintptr *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_transform_feedback_separate_attribs[0]; i++) - { - _orig_fastpath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_START, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_ctx->gl_num_transform_feedback_separate_attribs[0]; + i++) { + _orig_fastpath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_START, i, + (GLint *)¶ms[i]); } } @@ -87,9 +87,10 @@ _state_get_transform_feedback_buffer_bindings_size(GLsizeiptr *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_transform_feedback_separate_attribs[0]; i++) - { - _orig_fastpath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_SIZE, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_ctx->gl_num_transform_feedback_separate_attribs[0]; + i++) { + _orig_fastpath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_SIZE, i, + (GLint *)¶ms[i]); } } @@ -99,8 +100,7 @@ _state_get_uniform_buffer_bindings(GLuint *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_uniform_buffer_bindings[0]; i++) - { + for (i = 0; i < initial_ctx->gl_num_uniform_buffer_bindings[0]; i++) { ///////////////////////////////////////////////////////////////////////////////// // XXXX : AVOID SEGFAULT in ADRENO ((GLint *)params)[i] = 0; @@ -115,8 +115,7 @@ _state_get_uniform_buffer_bindings_offset(GLintptr *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_uniform_buffer_bindings[0]; i++) - { + for (i = 0; i < initial_ctx->gl_num_uniform_buffer_bindings[0]; i++) { _orig_fastpath_glGetIntegeri_v(GL_UNIFORM_BUFFER_START, i, (GLint *)¶ms[i]); } } @@ -127,8 +126,7 @@ _state_get_uniform_buffer_bindings_size(GLsizeiptr *params) AST(initial_ctx != NULL); int i; - for (i = 0; i < initial_ctx->gl_num_uniform_buffer_bindings[0]; i++) - { + for (i = 0; i < initial_ctx->gl_num_uniform_buffer_bindings[0]; i++) { _orig_fastpath_glGetIntegeri_v(GL_UNIFORM_BUFFER_SIZE, i, (GLint *)¶ms[i]); } } @@ -150,22 +148,20 @@ init_modules_fastpath() fastpath_opt = atoi(get_env_setting("COREGL_FASTPATH")); fastpath_force_off_opt = atoi(get_env_setting("COREGL_FASTPATH_FORCE_OFF")); - if (fastpath_force_off_opt == 1) - { + if (fastpath_force_off_opt == 1) { COREGL_LOG("\E[40;31;1m(DISABLED by force option)\E[0m "); fastpath_opt = 0; } - switch (fastpath_opt) - { - case 1: - COREGL_LOG("(%d) Fastpath enabled...\n", fastpath_opt); - fp_opt = FP_FAST_PATH; - break; - default: - COREGL_LOG("(%d) Default API path enabled...\n", fastpath_opt); - fp_opt = FP_NORMAL_PATH; - break; + switch (fastpath_opt) { + case 1: + COREGL_LOG("(%d) Fastpath enabled...\n", fastpath_opt); + fp_opt = FP_FAST_PATH; + break; + default: + COREGL_LOG("(%d) Default API path enabled...\n", fastpath_opt); + fp_opt = FP_NORMAL_PATH; + break; } debug_nofp = atoi(get_env_setting("COREGL_DEBUG_NOFP")); @@ -182,17 +178,16 @@ deinit_modules_fastpath() // Destroy remained context & Detect leaks int retry_destroy = 0; - while (1) - { + while (1) { retry_destroy = 0; current = glctx_list; - while (current) - { - if (current->cstate != NULL) - { - COREGL_WRN("\E[40;31;1mContext attached to [dpy=%p|rctx=%p] has not been completely destroyed.(leak)\E[0m\n", current->cstate->rdpy, current->cstate->rctx); + while (current) { + if (current->cstate != NULL) { + COREGL_WRN("\E[40;31;1mContext attached to [dpy=%p|rctx=%p] has not been completely destroyed.(leak)\E[0m\n", + current->cstate->rdpy, current->cstate->rctx); - _orig_fastpath_eglMakeCurrent(current->cstate->rdpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + _orig_fastpath_eglMakeCurrent(current->cstate->rdpy, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); _orig_fastpath_eglDestroyContext(current->cstate->rdpy, current->cstate->rctx); fastpath_remove_context_states_from_list(current->cstate, NULL); @@ -227,8 +222,7 @@ init_modules_tstate_fastpath(GLThreadState *tstate) void deinit_modules_tstate_fastpath(GLThreadState *tstate) { - if (tstate->module_data[MY_MODULE_ID] != NULL) - { + if (tstate->module_data[MY_MODULE_ID] != NULL) { free(tstate->module_data[MY_MODULE_ID]); tstate->module_data[MY_MODULE_ID] = NULL; } @@ -237,17 +231,16 @@ deinit_modules_tstate_fastpath(GLThreadState *tstate) void fastpath_apply_overrides() { - switch(fp_opt) - { - case FP_FAST_PATH: - fastpath_apply_overrides_egl(1); - fastpath_apply_overrides_gl(1); - break; - case FP_NORMAL_PATH: - break; - default: - COREGL_ERR("Invalide GL Override Option!!!\n"); - break; + switch (fp_opt) { + case FP_FAST_PATH: + fastpath_apply_overrides_egl(1); + fastpath_apply_overrides_gl(1); + break; + case FP_NORMAL_PATH: + break; + default: + COREGL_ERR("Invalide GL Override Option!!!\n"); + break; } } @@ -290,8 +283,7 @@ fastpath_apply_overrides_gl(int enable) #undef _COREGL_START_API #undef _COREGL_END_API - if (debug_nofp != 1) - { + if (debug_nofp != 1) { COREGL_OVERRIDE(fastpath_, glGetError); COREGL_OVERRIDE(fastpath_, glGetString); @@ -463,7 +455,7 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glClearDepthfOES ); COREGL_OVERRIDE(fastpath_, glClearDepthxOES ); /* Start overriding GLES 3.0 */ - if(driver_gl_version >= COREGL_GLAPI_3) { + if (driver_gl_version >= COREGL_GLAPI_3) { COREGL_OVERRIDE(fastpath_, glReadBuffer); COREGL_OVERRIDE(fastpath_, glGenQueries); @@ -523,8 +515,7 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glProgramParameteri); } // End of GLES 3.0 - if(driver_gl_version >= COREGL_GLAPI_31) - { + if (driver_gl_version >= COREGL_GLAPI_31) { COREGL_OVERRIDE(fastpath_, glCreateShaderProgramv); COREGL_OVERRIDE(fastpath_, glGenProgramPipelines); COREGL_OVERRIDE(fastpath_, glGetProgramPipelineiv); @@ -590,9 +581,7 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glVertexAttribBinding); COREGL_OVERRIDE(fastpath_, glVertexBindingDivisor); } - } - else - { + } else { COREGL_LOG("\E[40;35;1m[CoreGL] SKIP GL FASTPATH...\E[0m\n"); } } @@ -602,112 +591,109 @@ fastpath_apply_overrides_gl(int enable) static inline GL_Object_Hash_Base * _lock_gl_object_hash(GL_Object_State *ostate, GL_Object_Type type) { - switch (type) - { - case GL_OBJECT_TYPE_QUERY: - return &ostate->query; - case GL_OBJECT_TYPE_TEXTURE: - AST(mutex_lock(&ostate->shared->access_mutex) == 1); - return &ostate->shared->texture; - case GL_OBJECT_TYPE_BUFFER: - AST(mutex_lock(&ostate->shared->access_mutex) == 1); - return &ostate->shared->buffer; - case GL_OBJECT_TYPE_FRAMEBUFFER: - return &ostate->framebuffer; - case GL_OBJECT_TYPE_RENDERBUFFER: - AST(mutex_lock(&ostate->shared->access_mutex) == 1); - return &ostate->shared->renderbuffer; - case GL_OBJECT_TYPE_PROGRAM: - AST(mutex_lock(&ostate->shared->access_mutex) == 1); - return &ostate->shared->program; - case GL_OBJECT_TYPE_VERTEXARRAY: - return &ostate->vertexarray; - case GL_OBJECT_TYPE_SAMPLER: - AST(mutex_lock(&ostate->shared->access_mutex) == 1); - return &ostate->shared->sampler; - case GL_OBJECT_TYPE_TRANSFORMFEEDBACK: - return &ostate->transformfeedback; - case GL_OBJECT_TYPE_PROGRAMPIPELINE: - AST(mutex_lock(&ostate->shared->access_mutex) == 1); - return &ostate->shared->programpipeline; - default: - return NULL; + switch (type) { + case GL_OBJECT_TYPE_QUERY: + return &ostate->query; + case GL_OBJECT_TYPE_TEXTURE: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->texture; + case GL_OBJECT_TYPE_BUFFER: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->buffer; + case GL_OBJECT_TYPE_FRAMEBUFFER: + return &ostate->framebuffer; + case GL_OBJECT_TYPE_RENDERBUFFER: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->renderbuffer; + case GL_OBJECT_TYPE_PROGRAM: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->program; + case GL_OBJECT_TYPE_VERTEXARRAY: + return &ostate->vertexarray; + case GL_OBJECT_TYPE_SAMPLER: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->sampler; + case GL_OBJECT_TYPE_TRANSFORMFEEDBACK: + return &ostate->transformfeedback; + case GL_OBJECT_TYPE_PROGRAMPIPELINE: + AST(mutex_lock(&ostate->shared->access_mutex) == 1); + return &ostate->shared->programpipeline; + default: + return NULL; } } static inline void _unlock_gl_object_hash(GL_Object_State *ostate, GL_Object_Type type) { - switch (type) - { - case GL_OBJECT_TYPE_TEXTURE: - case GL_OBJECT_TYPE_BUFFER: - case GL_OBJECT_TYPE_RENDERBUFFER: - case GL_OBJECT_TYPE_PROGRAM: - case GL_OBJECT_TYPE_SAMPLER: - case GL_OBJECT_TYPE_PROGRAMPIPELINE: - AST(mutex_unlock(&ostate->shared->access_mutex) == 1); - default: - break; + switch (type) { + case GL_OBJECT_TYPE_TEXTURE: + case GL_OBJECT_TYPE_BUFFER: + case GL_OBJECT_TYPE_RENDERBUFFER: + case GL_OBJECT_TYPE_PROGRAM: + case GL_OBJECT_TYPE_SAMPLER: + case GL_OBJECT_TYPE_PROGRAMPIPELINE: + AST(mutex_unlock(&ostate->shared->access_mutex) == 1); + default: + break; } } static inline GL_Object_Hash_Base * _lock_gl_object_hash_real(GL_Object_State *ostate, GL_Object_Type type) { - switch (type) - { - case GL_OBJECT_TYPE_QUERY: - return &ostate->query_real; - case GL_OBJECT_TYPE_TEXTURE: - AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); - return &ostate->shared->texture_real; - case GL_OBJECT_TYPE_BUFFER: - AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); - return &ostate->shared->buffer_real; - case GL_OBJECT_TYPE_FRAMEBUFFER: - return &ostate->framebuffer_real; - case GL_OBJECT_TYPE_RENDERBUFFER: - AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); - return &ostate->shared->renderbuffer_real; - case GL_OBJECT_TYPE_PROGRAM: - AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); - return &ostate->shared->program_real; - case GL_OBJECT_TYPE_VERTEXARRAY: - return &ostate->vertexarray_real; - case GL_OBJECT_TYPE_SAMPLER: - AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); - return &ostate->shared->sampler_real; - case GL_OBJECT_TYPE_TRANSFORMFEEDBACK: - return &ostate->transformfeedback_real; - case GL_OBJECT_TYPE_PROGRAMPIPELINE: - AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); - return &ostate->shared->programpipeline_real; - default: - return NULL; + switch (type) { + case GL_OBJECT_TYPE_QUERY: + return &ostate->query_real; + case GL_OBJECT_TYPE_TEXTURE: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->texture_real; + case GL_OBJECT_TYPE_BUFFER: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->buffer_real; + case GL_OBJECT_TYPE_FRAMEBUFFER: + return &ostate->framebuffer_real; + case GL_OBJECT_TYPE_RENDERBUFFER: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->renderbuffer_real; + case GL_OBJECT_TYPE_PROGRAM: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->program_real; + case GL_OBJECT_TYPE_VERTEXARRAY: + return &ostate->vertexarray_real; + case GL_OBJECT_TYPE_SAMPLER: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->sampler_real; + case GL_OBJECT_TYPE_TRANSFORMFEEDBACK: + return &ostate->transformfeedback_real; + case GL_OBJECT_TYPE_PROGRAMPIPELINE: + AST(mutex_lock(&ostate->shared->real_access_mutex) == 1); + return &ostate->shared->programpipeline_real; + default: + return NULL; } } static inline void _unlock_gl_object_hash_real(GL_Object_State *ostate, GL_Object_Type type) { - switch (type) - { - case GL_OBJECT_TYPE_TEXTURE: - case GL_OBJECT_TYPE_BUFFER: - case GL_OBJECT_TYPE_RENDERBUFFER: - case GL_OBJECT_TYPE_PROGRAM: - case GL_OBJECT_TYPE_SAMPLER: - case GL_OBJECT_TYPE_PROGRAMPIPELINE: - AST(mutex_unlock(&ostate->shared->real_access_mutex) == 1); - break; - default: - break; + switch (type) { + case GL_OBJECT_TYPE_TEXTURE: + case GL_OBJECT_TYPE_BUFFER: + case GL_OBJECT_TYPE_RENDERBUFFER: + case GL_OBJECT_TYPE_PROGRAM: + case GL_OBJECT_TYPE_SAMPLER: + case GL_OBJECT_TYPE_PROGRAMPIPELINE: + AST(mutex_unlock(&ostate->shared->real_access_mutex) == 1); + break; + default: + break; } } int -fastpath_add_context_state_to_list(const void *option, const int option_len, GLContextState *cstate, Mutex *mtx) +fastpath_add_context_state_to_list(const void *option, const int option_len, + GLContextState *cstate, Mutex *mtx) { int ret = 0; int tid = 0; @@ -721,12 +707,10 @@ fastpath_add_context_state_to_list(const void *option, const int option_len, GLC tid = get_current_thread(); current = glctx_list; - while (current != NULL) - { + while (current != NULL) { if (current->option_len == option_len && memcmp(current->option, option, option_len) == 0 && - current->thread_id == tid) - { + current->thread_id == tid) { AST(current->cstate == cstate); goto finish; } @@ -734,8 +718,7 @@ fastpath_add_context_state_to_list(const void *option, const int option_len, GLC } newitm = (GLContext_List *)calloc(1, sizeof(GLContext_List)); - if (newitm == NULL) - { + if (newitm == NULL) { COREGL_ERR("Failed to create context list.\n"); goto finish; } @@ -755,15 +738,12 @@ fastpath_add_context_state_to_list(const void *option, const int option_len, GLC goto finish; finish: - if (ret != 1) - { - if (newitm != NULL) - { + if (ret != 1) { + if (newitm != NULL) { free(newitm); newitm = NULL; } - if (cstate != NULL) - { + if (cstate != NULL) { free(cstate); cstate = NULL; } @@ -774,7 +754,8 @@ finish: } GLContextState * -fastpath_get_context_state_from_list(const void *option, const int option_len, Mutex *mtx) +fastpath_get_context_state_from_list(const void *option, const int option_len, + Mutex *mtx) { GLContextState *ret = NULL; GLContext_List *current = NULL; @@ -785,12 +766,10 @@ fastpath_get_context_state_from_list(const void *option, const int option_len, M tid = get_current_thread(); current = glctx_list; - while (current != NULL) - { + while (current != NULL) { if (current->option_len == option_len && memcmp(current->option, option, option_len) == 0 && - current->thread_id == tid) - { + current->thread_id == tid) { ret = current->cstate; goto finish; } @@ -816,23 +795,17 @@ fastpath_remove_context_states_from_list(GLContextState *cstate, Mutex *mtx) current = glctx_list; - while (current != NULL) - { - if (current->cstate == cstate) - { + while (current != NULL) { + if (current->cstate == cstate) { GLContext_List *nextitm = NULL; - if (olditm != NULL) - { + if (olditm != NULL) { olditm->next = current->next; nextitm = olditm->next; - } - else - { + } else { glctx_list = current->next; nextitm = glctx_list; } - if (current->option != NULL) - { + if (current->option != NULL) { AST(current->option_len > 0); free(current->option); current->option = NULL; @@ -900,15 +873,11 @@ static void _add_hash(GL_Object_Hash_Base *hash_base, GL_Object_Hash *data) { int array_idx = data->hash_key & (hash_base->hash_size - 1); - if (hash_base->hash_field[array_idx] == NULL) - { + if (hash_base->hash_field[array_idx] == NULL) { hash_base->hash_field[array_idx] = data; - } - else - { + } else { GL_Object_Hash *current = hash_base->hash_field[array_idx]; - while(current->next) - { + while (current->next) { AST(current->hash_key != data->hash_key); current = current->next; } @@ -927,10 +896,8 @@ _remove_hash(GL_Object_Hash_Base *hash_base, GLuint hash) GL_Object_Hash *current = hash_base->hash_field[array_idx]; GL_Object_Hash *prev = NULL; - while(current) - { - if (current->hash_key == hash) - { + while (current) { + if (current->hash_key == hash) { if (prev != NULL) prev->next = current->next; else @@ -951,18 +918,14 @@ _free_hash_list(GL_Object_Hash_Base *hash_base, int free_data) { if (hash_base->item_size == 0) return; - for (int i = 0; i < hash_base->hash_size; i++) - { - if (hash_base->hash_field[i] != NULL) - { + for (int i = 0; i < hash_base->hash_size; i++) { + if (hash_base->hash_field[i] != NULL) { GL_Object_Hash *current = hash_base->hash_field[i]; - while (current != NULL) - { + while (current != NULL) { GL_Object_Hash *current_next = current->next; - if (free_data == 1 && current->item != NULL) - { + if (free_data == 1 && current->item != NULL) { free(current->item); } @@ -1042,17 +1005,15 @@ _ostate_hash_check(GL_Object_Hash_Base *hash_base) GL_Object_Hash **oldfield = hash_base->hash_field; hash_base->hash_size = oldsize << 1; - hash_base->hash_field = (GL_Object_Hash **)calloc(1, sizeof(GL_Object_Hash *) * hash_base->hash_size); + hash_base->hash_field = (GL_Object_Hash **)calloc(1, + sizeof(GL_Object_Hash *) * hash_base->hash_size); AST(hash_base->hash_field != NULL); - for (int i = 0; i < oldsize; i++) - { - if (oldfield[i] != NULL) - { + for (int i = 0; i < oldsize; i++) { + if (oldfield[i] != NULL) { GL_Object_Hash *current = oldfield[i]; - while (current != NULL) - { + while (current != NULL) { GL_Object_Hash *current_next = current->next; _add_hash(hash_base, current); hash_base->item_size--; @@ -1065,7 +1026,8 @@ _ostate_hash_check(GL_Object_Hash_Base *hash_base) } GLuint -fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, GLuint real_name) +fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, + GLuint real_name) { GLuint ret = _COREGL_INT_INIT_VALUE; @@ -1077,24 +1039,20 @@ fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, GLui hash_base_real = _lock_gl_object_hash_real(ostate, type); newid = hash_base->last_id + 1; - if (newid >= hash_base->hash_size) - { + if (newid >= hash_base->hash_size) { hash_base->is_looped = 1; newid = 1; hash_base->last_id = 1; } - if (hash_base->is_looped != 0) - { + if (hash_base->is_looped != 0) { int i; int findingid = newid; newid = -1; - for (i = 0; i < hash_base->hash_size; i++) - { + for (i = 0; i < hash_base->hash_size; i++) { GL_Object_Hash *exist_hash = NULL; FIND_HASH(hash_base, findingid, exist_hash); - if (exist_hash == NULL) - { + if (exist_hash == NULL) { newid = findingid; break; } @@ -1114,9 +1072,9 @@ fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, GLui newobj->ref_count = 1; - GL_Object_Hash *newobj_hash = (GL_Object_Hash *)calloc(1, sizeof(GL_Object_Hash)); - if (newobj_hash == NULL) - { + GL_Object_Hash *newobj_hash = (GL_Object_Hash *)calloc(1, + sizeof(GL_Object_Hash)); + if (newobj_hash == NULL) { free(newobj); goto finish; } @@ -1124,9 +1082,9 @@ fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, GLui newobj_hash->hash_key = newid; _add_hash(hash_base, newobj_hash); - GL_Object_Hash *newobj_hash_real = (GL_Object_Hash *)calloc(1, sizeof(GL_Object_Hash)); - if (newobj_hash_real == NULL) - { + GL_Object_Hash *newobj_hash_real = (GL_Object_Hash *)calloc(1, + sizeof(GL_Object_Hash)); + if (newobj_hash_real == NULL) { free(newobj); free(newobj_hash); goto finish; @@ -1160,7 +1118,8 @@ finish: } GLuint -fastpath_ostate_remove_object(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name) +fastpath_ostate_remove_object(GL_Object_State *ostate, GL_Object_Type type, + GLuint glue_name) { GLuint ret = _COREGL_INT_INIT_VALUE; @@ -1175,8 +1134,7 @@ fastpath_ostate_remove_object(GL_Object_State *ostate, GL_Object_Type type, GLui object->ref_count--; - if (object->ref_count <= 0) - { + if (object->ref_count <= 0) { GL_Object_Hash *object_hash = NULL; FIND_HASH(hash_base, object->id - (int)type, object_hash); @@ -1205,7 +1163,8 @@ finish: } GLuint -fastpath_ostate_get_object(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name) +fastpath_ostate_get_object(GL_Object_State *ostate, GL_Object_Type type, + GLuint glue_name) { GLuint ret = _COREGL_INT_INIT_VALUE; @@ -1234,8 +1193,7 @@ fastpath_ostate_has_object_type(GL_Object_State *ostate, GL_Object_Type type) GL_Object *object = NULL; hash_base = _lock_gl_object_hash(ostate, type); - if(hash_base->hash_field == 0) - { + if (hash_base->hash_field == 0) { ret = 0; goto finish; } @@ -1252,7 +1210,8 @@ finish: GLint -fastpath_ostate_set_object_tag(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name, GLvoid *tag) +fastpath_ostate_set_object_tag(GL_Object_State *ostate, GL_Object_Type type, + GLuint glue_name, GLvoid *tag) { GLint ret = _COREGL_INT_INIT_VALUE; @@ -1277,7 +1236,8 @@ finish: } GLvoid * -fastpath_ostate_get_object_tag(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name) +fastpath_ostate_get_object_tag(GL_Object_State *ostate, GL_Object_Type type, + GLuint glue_name) { GLvoid *ret = NULL; @@ -1297,7 +1257,8 @@ finish: } GLuint -fastpath_ostate_find_object(GL_Object_State *ostate, GL_Object_Type type, GLuint real_name) +fastpath_ostate_find_object(GL_Object_State *ostate, GL_Object_Type type, + GLuint real_name) { GLuint ret = _COREGL_INT_INIT_VALUE; @@ -1317,7 +1278,8 @@ finish: } GLint -fastpath_ostate_use_object(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name) +fastpath_ostate_use_object(GL_Object_State *ostate, GL_Object_Type type, + GLuint glue_name) { GLint ret = _COREGL_INT_INIT_VALUE; @@ -1344,12 +1306,10 @@ fastpath_dump_context_states(GLGlueContext *ctx, int force_output) if (unlikely(trace_state_flag != 1)) return; - if (!force_output) - { + if (!force_output) { struct timeval tv_now = { 0, 0 }; AST(gettimeofday(&tv_now, NULL) == 0); - if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) - { + if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) { goto finish; } tv_last = tv_now; @@ -1357,7 +1317,8 @@ fastpath_dump_context_states(GLGlueContext *ctx, int force_output) TRACE("\n"); TRACE("\E[0;40;34m========================================================================================================================\E[0m\n"); - TRACE("\E[40;32;1m State info \E[1;37;1m: GlueCTX = %p\E[0m\n", getpid(), ctx); + TRACE("\E[40;32;1m State info \E[1;37;1m: GlueCTX = %p\E[0m\n", + getpid(), ctx); TRACE("\E[0;40;34m========================================================================================================================\E[0m\n"); #define PRINTF_CHAR_GLenum "0x%8X" @@ -1424,8 +1385,7 @@ fastpath_init_context_states(GLGlueContext *ctx) AST(mutex_lock(&init_context_mutex) == 1); - if (ctx == NULL) - { + if (ctx == NULL) { COREGL_ERR("Context NULL\n"); ret = 0; goto finish; @@ -1434,8 +1394,7 @@ fastpath_init_context_states(GLGlueContext *ctx) AST(ctx->initialized == 0); AST(ctx->ostate.shared != NULL); - if (initial_ctx == NULL) - { + if (initial_ctx == NULL) { initial_ctx = (GLGlueContext *)calloc(1, sizeof(GLGlueContext)); AST(initial_ctx != NULL); @@ -1543,21 +1502,24 @@ fastpath_init_context_states(GLGlueContext *ctx) # undef _COREGL_END_API # undef _COREGL_START_API - if (initial_ctx->gl_num_vertex_attribs[0] > MAX_VERTEX_ATTRIBS) - { - COREGL_WRN("\E[40;31;1mNumber of vertex attrib is too big! (%d-%d)\E[0m\n", MAX_VERTEX_ATTRIBS, initial_ctx->gl_num_vertex_attribs[0]); + if (initial_ctx->gl_num_vertex_attribs[0] > MAX_VERTEX_ATTRIBS) { + COREGL_WRN("\E[40;31;1mNumber of vertex attrib is too big! (%d-%d)\E[0m\n", + MAX_VERTEX_ATTRIBS, initial_ctx->gl_num_vertex_attribs[0]); } - if (initial_ctx->gl_num_tex_units[0] > MAX_TEXTURE_UNITS) - { - COREGL_WRN("\E[40;31;1mNumber of texture unit is too big! (%d-%d)\E[0m\n", MAX_TEXTURE_UNITS, initial_ctx->gl_num_tex_units[0]); + if (initial_ctx->gl_num_tex_units[0] > MAX_TEXTURE_UNITS) { + COREGL_WRN("\E[40;31;1mNumber of texture unit is too big! (%d-%d)\E[0m\n", + MAX_TEXTURE_UNITS, initial_ctx->gl_num_tex_units[0]); } - if (initial_ctx->gl_num_transform_feedback_separate_attribs[0] > MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS) - { - COREGL_WRN("\E[40;31;1mNumber of transform feedback separate attrib is too big! (%d-%d)\E[0m\n", MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, initial_ctx->gl_num_transform_feedback_separate_attribs[0]); + if (initial_ctx->gl_num_transform_feedback_separate_attribs[0] > + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS) { + COREGL_WRN("\E[40;31;1mNumber of transform feedback separate attrib is too big! (%d-%d)\E[0m\n", + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, + initial_ctx->gl_num_transform_feedback_separate_attribs[0]); } - if (initial_ctx->gl_num_uniform_buffer_bindings[0] > MAX_UNIFORM_BUFFER_BINDINGS) - { - COREGL_WRN("\E[40;31;1mNumber of uniform buffer binding is too big! (%d-%d)\E[0m\n", MAX_UNIFORM_BUFFER_BINDINGS, initial_ctx->gl_num_uniform_buffer_bindings[0]); + if (initial_ctx->gl_num_uniform_buffer_bindings[0] > + MAX_UNIFORM_BUFFER_BINDINGS) { + COREGL_WRN("\E[40;31;1mNumber of uniform buffer binding is too big! (%d-%d)\E[0m\n", + MAX_UNIFORM_BUFFER_BINDINGS, initial_ctx->gl_num_uniform_buffer_bindings[0]); } } @@ -1592,8 +1554,10 @@ finish: } #ifdef COREGL_USE_MODULE_TRACEPATH -extern void *tracepath_api_trace_begin(const char *name, void *hint, int trace_total_time); -extern void *tracepath_api_trace_end(const char *name, void *hint, int trace_total_time); +extern void *tracepath_api_trace_begin(const char *name, void *hint, + int trace_total_time); +extern void *tracepath_api_trace_end(const char *name, void *hint, + int trace_total_time); #endif #define CHECK_GL_ERROR(func) \ @@ -1614,15 +1578,13 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) unsigned char flag = 0; int i = 0; - if (debug_nofp == 1) - { + if (debug_nofp == 1) { ret = 1; goto finish; } // Return if they're the same - if (oldctx == newctx) - { + if (oldctx == newctx) { ret = 1; goto finish; } @@ -1636,7 +1598,8 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_glfinish = NULL; - trace_hint_glfinish = tracepath_api_trace_begin("eglMakeCurrent(FP glFinish)", trace_hint_glfinish, 0); + trace_hint_glfinish = tracepath_api_trace_begin("eglMakeCurrent(FP glFinish)", + trace_hint_glfinish, 0); #endif // COREGL_USE_MODULE_TRACEPATH { @@ -1654,62 +1617,51 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) // _varray_flag #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_vertex_attrib = NULL; - trace_hint_vertex_attrib = tracepath_api_trace_begin("eglMakeCurrent(FP vertex attrib)", trace_hint_vertex_attrib, 0); + trace_hint_vertex_attrib = + tracepath_api_trace_begin("eglMakeCurrent(FP vertex attrib)", + trace_hint_vertex_attrib, 0); #endif // COREGL_USE_MODULE_TRACEPATH flag = oldctx->_vattrib_flag | newctx->_vattrib_flag; - if (flag) - { - for (i = 0; i < oldctx->gl_num_vertex_attribs[0]; i++) - { - if (newctx->gl_vertex_array_buf_id[i] != oldctx->gl_vertex_array_buf_id[i]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ARRAY_BUFFER, newctx->gl_vertex_array_buf_id[i])) - } - else - { + if (flag) { + for (i = 0; i < oldctx->gl_num_vertex_attribs[0]; i++) { + if (newctx->gl_vertex_array_buf_id[i] != oldctx->gl_vertex_array_buf_id[i]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ARRAY_BUFFER, + newctx->gl_vertex_array_buf_id[i])) + } else { CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ARRAY_BUFFER, 0)) } - STATE_COMPARE(gl_vertex_array_divisor[i]) - { - CHECK_GL_ERROR(_orig_fastpath_glVertexAttribDivisor(i, newctx->gl_vertex_array_divisor[i])) + STATE_COMPARE(gl_vertex_array_divisor[i]) { + CHECK_GL_ERROR(_orig_fastpath_glVertexAttribDivisor(i, + newctx->gl_vertex_array_divisor[i])) } - if (newctx->gl_vertex_array_size[i] != 0) - { + if (newctx->gl_vertex_array_size[i] != 0) { CHECK_GL_ERROR(_orig_fastpath_glVertexAttribPointer(i, - newctx->gl_vertex_array_size[i], - newctx->gl_vertex_array_type[i], - newctx->gl_vertex_array_normalized[i], - newctx->gl_vertex_array_stride[i], - newctx->gl_vertex_array_pointer[i])) - } - else - { - if (newctx->gl_vertex_array_integer[0] == GL_TRUE) - { - if (newctx->gl_vertex_array_type[0] == GL_UNSIGNED_INT) - { - CHECK_GL_ERROR(_orig_fastpath_glVertexAttribI4uiv(i, &newctx->gl_vertex_attrib_value_unsigned_integer[4 * i])) - } - else - { - CHECK_GL_ERROR(_orig_fastpath_glVertexAttribI4iv(i, &newctx->gl_vertex_attrib_value_integer[4 * i])) + newctx->gl_vertex_array_size[i], + newctx->gl_vertex_array_type[i], + newctx->gl_vertex_array_normalized[i], + newctx->gl_vertex_array_stride[i], + newctx->gl_vertex_array_pointer[i])) + } else { + if (newctx->gl_vertex_array_integer[0] == GL_TRUE) { + if (newctx->gl_vertex_array_type[0] == GL_UNSIGNED_INT) { + CHECK_GL_ERROR(_orig_fastpath_glVertexAttribI4uiv(i, + &newctx->gl_vertex_attrib_value_unsigned_integer[4 * i])) + } else { + CHECK_GL_ERROR(_orig_fastpath_glVertexAttribI4iv(i, + &newctx->gl_vertex_attrib_value_integer[4 * i])) } - } - else - { - CHECK_GL_ERROR(_orig_fastpath_glVertexAttrib4fv(i, &newctx->gl_vertex_attrib_value[4 * i])) + } else { + CHECK_GL_ERROR(_orig_fastpath_glVertexAttrib4fv(i, + &newctx->gl_vertex_attrib_value[4 * i])) } } - if (newctx->gl_vertex_array_enabled[i] == GL_TRUE) - { + if (newctx->gl_vertex_array_enabled[i] == GL_TRUE) { CHECK_GL_ERROR(_orig_fastpath_glEnableVertexAttribArray(i)) - } - else - { + } else { CHECK_GL_ERROR(_orig_fastpath_glDisableVertexAttribArray(i)) } } @@ -1717,98 +1669,100 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) } #ifdef COREGL_USE_MODULE_TRACEPATH - tracepath_api_trace_end("eglMakeCurrent(FP vertex attrib)", trace_hint_vertex_attrib, 0); + tracepath_api_trace_end("eglMakeCurrent(FP vertex attrib)", + trace_hint_vertex_attrib, 0); #endif // COREGL_USE_MODULE_TRACEPATH #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_bindbuffers = NULL; - trace_hint_bindbuffers = tracepath_api_trace_begin("eglMakeCurrent(FP bind buffers)", trace_hint_bindbuffers, 0); + trace_hint_bindbuffers = + tracepath_api_trace_begin("eglMakeCurrent(FP bind buffers)", + trace_hint_bindbuffers, 0); #endif // COREGL_USE_MODULE_TRACEPATH //------------------// // _bind_flag1 flag = oldctx->_bind_flag1 | newctx->_bind_flag1; - if (flag) - { - STATE_COMPARE(gl_array_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ARRAY_BUFFER, newctx->gl_array_buffer_binding[0])) - } - STATE_COMPARE(gl_element_array_buffer_binding[0]) - { - STATE_COMPARE(gl_vertex_array_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindVertexArray(newctx->gl_vertex_array_binding[0])) + if (flag) { + STATE_COMPARE(gl_array_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ARRAY_BUFFER, + newctx->gl_array_buffer_binding[0])) + } + STATE_COMPARE(gl_element_array_buffer_binding[0]) { + STATE_COMPARE(gl_vertex_array_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindVertexArray( + newctx->gl_vertex_array_binding[0])) } - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, newctx->gl_element_array_buffer_binding[0])) + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, + newctx->gl_element_array_buffer_binding[0])) } - if (newctx->gl_framebuffer_binding_read_used == 1) - { - STATE_COMPARE(gl_framebuffer_binding_read[0]) - { - if(driver_gl_version >=2) - CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_READ_FRAMEBUFFER, newctx->gl_framebuffer_binding_read[0])) - else - CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_READ_FRAMEBUFFER, newctx->gl_framebuffer_binding_read[0])) - } - STATE_COMPARE(gl_framebuffer_binding_draw[0]) - { - if(driver_gl_version >=2) - CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_DRAW_FRAMEBUFFER, newctx->gl_framebuffer_binding_draw[0])) - else - CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_DRAW_FRAMEBUFFER, newctx->gl_framebuffer_binding_draw[0])) - } - } - else - { - STATE_COMPARE(gl_framebuffer_binding[0]) - { - if(driver_gl_version >=2) - CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_FRAMEBUFFER, newctx->gl_framebuffer_binding[0])) - else - CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_FRAMEBUFFER, newctx->gl_framebuffer_binding[0])) - } + if (newctx->gl_framebuffer_binding_read_used == 1) { + STATE_COMPARE(gl_framebuffer_binding_read[0]) { + if (driver_gl_version >= 2) + CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_READ_FRAMEBUFFER, + newctx->gl_framebuffer_binding_read[0])) + else + CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_READ_FRAMEBUFFER, + newctx->gl_framebuffer_binding_read[0])) + } + STATE_COMPARE(gl_framebuffer_binding_draw[0]) { + if (driver_gl_version >= 2) + CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_DRAW_FRAMEBUFFER, + newctx->gl_framebuffer_binding_draw[0])) + else + CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_DRAW_FRAMEBUFFER, + newctx->gl_framebuffer_binding_draw[0])) + } + } else { + STATE_COMPARE(gl_framebuffer_binding[0]) { + if (driver_gl_version >= 2) + CHECK_GL_ERROR(_orig_fastpath_glBindFramebuffer(GL_FRAMEBUFFER, + newctx->gl_framebuffer_binding[0])) + else + CHECK_GL_ERROR(_orig_fastpath_glBindFramebufferOES(GL_FRAMEBUFFER, + newctx->gl_framebuffer_binding[0])) + } } - STATE_COMPARE(gl_renderbuffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindRenderbuffer(GL_RENDERBUFFER, newctx->gl_renderbuffer_binding[0])) + STATE_COMPARE(gl_renderbuffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindRenderbuffer(GL_RENDERBUFFER, + newctx->gl_renderbuffer_binding[0])) } } //------------------// // _bind_flag2 flag = oldctx->_bind_flag2 | newctx->_bind_flag2; - if (flag) - { - STATE_COMPARE(gl_copy_read_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_COPY_READ_BUFFER, newctx->gl_copy_read_buffer_binding[0])) + if (flag) { + STATE_COMPARE(gl_copy_read_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_COPY_READ_BUFFER, + newctx->gl_copy_read_buffer_binding[0])) } - STATE_COMPARE(gl_copy_write_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_COPY_WRITE_BUFFER, newctx->gl_copy_write_buffer_binding[0])) + STATE_COMPARE(gl_copy_write_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_COPY_WRITE_BUFFER, + newctx->gl_copy_write_buffer_binding[0])) } - STATE_COMPARE(gl_pixel_pack_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_PIXEL_PACK_BUFFER, newctx->gl_pixel_pack_buffer_binding[0])) + STATE_COMPARE(gl_pixel_pack_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_PIXEL_PACK_BUFFER, + newctx->gl_pixel_pack_buffer_binding[0])) } - STATE_COMPARE(gl_pixel_unpack_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_PIXEL_UNPACK_BUFFER, newctx->gl_pixel_unpack_buffer_binding[0])) + STATE_COMPARE(gl_pixel_unpack_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_PIXEL_UNPACK_BUFFER, + newctx->gl_pixel_unpack_buffer_binding[0])) } - STATE_COMPARE(gl_transform_feedback_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, newctx->gl_transform_feedback_buffer_binding[0])) + STATE_COMPARE(gl_transform_feedback_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, + newctx->gl_transform_feedback_buffer_binding[0])) } - STATE_COMPARE(gl_uniform_buffer_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_UNIFORM_BUFFER, newctx->gl_uniform_buffer_binding[0])) + STATE_COMPARE(gl_uniform_buffer_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindBuffer(GL_UNIFORM_BUFFER, + newctx->gl_uniform_buffer_binding[0])) } } #ifdef COREGL_USE_MODULE_TRACEPATH - tracepath_api_trace_end("eglMakeCurrent(FP bind buffers)", trace_hint_bindbuffers, 0); + tracepath_api_trace_end("eglMakeCurrent(FP bind buffers)", + trace_hint_bindbuffers, 0); #endif // COREGL_USE_MODULE_TRACEPATH @@ -1817,283 +1771,241 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) // _enable_flag1 #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_enable_states = NULL; - trace_hint_enable_states = tracepath_api_trace_begin("eglMakeCurrent(FP enable states)", trace_hint_enable_states, 0); + trace_hint_enable_states = + tracepath_api_trace_begin("eglMakeCurrent(FP enable states)", + trace_hint_enable_states, 0); #endif // COREGL_USE_MODULE_TRACEPATH flag = oldctx->_enable_flag1 | newctx->_enable_flag1; - if (flag) - { - STATE_COMPARE(gl_blend[0]) - { - if (newctx->gl_blend[0]) - { + if (flag) { + STATE_COMPARE(gl_blend[0]) { + if (newctx->gl_blend[0]) { CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_BLEND)) - } - else + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_BLEND)) - } - STATE_COMPARE(gl_cull_face[0]) - { - if (newctx->gl_cull_face[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_CULL_FACE)) } - else + STATE_COMPARE(gl_cull_face[0]) { + if (newctx->gl_cull_face[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_CULL_FACE)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_CULL_FACE)) - } - STATE_COMPARE(gl_depth_test[0]) - { - if (newctx->gl_depth_test[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_DEPTH_TEST)) } - else + STATE_COMPARE(gl_depth_test[0]) { + if (newctx->gl_depth_test[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_DEPTH_TEST)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_DEPTH_TEST)) - } - STATE_COMPARE(gl_dither[0]) - { - if (newctx->gl_dither[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_DITHER)) } - else + STATE_COMPARE(gl_dither[0]) { + if (newctx->gl_dither[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_DITHER)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_DITHER)) - } + } } // _enable_flag2 flag = oldctx->_enable_flag2 | newctx->_enable_flag2; - if (flag) - { - STATE_COMPARE(gl_polygon_offset_fill[0]) - { - if (newctx->gl_polygon_offset_fill[0]) - { + if (flag) { + STATE_COMPARE(gl_polygon_offset_fill[0]) { + if (newctx->gl_polygon_offset_fill[0]) { CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_POLYGON_OFFSET_FILL)) - } - else + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_POLYGON_OFFSET_FILL)) - } - STATE_COMPARE(gl_sample_alpha_to_coverage[0]) - { - if (newctx->gl_sample_alpha_to_coverage[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE)) } - else + STATE_COMPARE(gl_sample_alpha_to_coverage[0]) { + if (newctx->gl_sample_alpha_to_coverage[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE)) - } - STATE_COMPARE(gl_sample_coverage[0]) - { - if (newctx->gl_sample_coverage[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_SAMPLE_COVERAGE)) } - else + STATE_COMPARE(gl_sample_coverage[0]) { + if (newctx->gl_sample_coverage[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_SAMPLE_COVERAGE)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_SAMPLE_COVERAGE)) - } - STATE_COMPARE(gl_scissor_test[0]) - { - if (newctx->gl_scissor_test[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_SCISSOR_TEST)) } - else + STATE_COMPARE(gl_scissor_test[0]) { + if (newctx->gl_scissor_test[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_SCISSOR_TEST)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_SCISSOR_TEST)) - } - STATE_COMPARE(gl_stencil_test[0]) - { - if (newctx->gl_stencil_test[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_STENCIL_TEST)) } - else + STATE_COMPARE(gl_stencil_test[0]) { + if (newctx->gl_stencil_test[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_STENCIL_TEST)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_STENCIL_TEST)) - } + } } // _enable_flag3 flag = oldctx->_enable_flag3 | newctx->_enable_flag3; - if (flag) - { - STATE_COMPARE(gl_primitive_restart_fixed_index[0]) - { - if (newctx->gl_primitive_restart_fixed_index[0]) - { + if (flag) { + STATE_COMPARE(gl_primitive_restart_fixed_index[0]) { + if (newctx->gl_primitive_restart_fixed_index[0]) { CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX)) - } - else + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_PRIMITIVE_RESTART_FIXED_INDEX)) - } - STATE_COMPARE(gl_rasterizer_discard[0]) - { - if (newctx->gl_rasterizer_discard[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_RASTERIZER_DISCARD)) } - else + STATE_COMPARE(gl_rasterizer_discard[0]) { + if (newctx->gl_rasterizer_discard[0]) { + CHECK_GL_ERROR(_orig_fastpath_glEnable(GL_RASTERIZER_DISCARD)) + } else CHECK_GL_ERROR(_orig_fastpath_glDisable(GL_RASTERIZER_DISCARD)) - } + } } #ifdef COREGL_USE_MODULE_TRACEPATH - tracepath_api_trace_end("eglMakeCurrent(FP enable states)", trace_hint_enable_states, 0); + tracepath_api_trace_end("eglMakeCurrent(FP enable states)", + trace_hint_enable_states, 0); #endif // COREGL_USE_MODULE_TRACEPATH //------------------// // _clear_flag1 #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_clear_viewport = NULL; - trace_hint_clear_viewport = tracepath_api_trace_begin("eglMakeCurrent(FP clear/viewport)", trace_hint_clear_viewport, 0); + trace_hint_clear_viewport = + tracepath_api_trace_begin("eglMakeCurrent(FP clear/viewport)", + trace_hint_clear_viewport, 0); #endif // COREGL_USE_MODULE_TRACEPATH flag = oldctx->_clear_flag1 | newctx->_clear_flag1; - if (flag) - { + if (flag) { // Viewport. - STATES_COMPARE(gl_viewport, 4 * sizeof(GLint)) - { + STATES_COMPARE(gl_viewport, 4 * sizeof(GLint)) { CHECK_GL_ERROR(_orig_fastpath_glViewport(newctx->gl_viewport[0], - newctx->gl_viewport[1], - newctx->gl_viewport[2], - newctx->gl_viewport[3])) + newctx->gl_viewport[1], + newctx->gl_viewport[2], + newctx->gl_viewport[3])) } - STATE_COMPARE(gl_current_program[0]) - { + STATE_COMPARE(gl_current_program[0]) { CHECK_GL_ERROR(_orig_fastpath_glUseProgram(newctx->gl_current_program[0])) } - STATES_COMPARE(gl_color_clear_value, 4 * sizeof(GLclampf)) - { + STATES_COMPARE(gl_color_clear_value, 4 * sizeof(GLclampf)) { CHECK_GL_ERROR(_orig_fastpath_glClearColor(newctx->gl_color_clear_value[0], - newctx->gl_color_clear_value[1], - newctx->gl_color_clear_value[2], - newctx->gl_color_clear_value[3])) + newctx->gl_color_clear_value[1], + newctx->gl_color_clear_value[2], + newctx->gl_color_clear_value[3])) } } // _clear_flag2 flag = oldctx->_clear_flag2 | newctx->_clear_flag2; - if (flag) - { - STATES_COMPARE(gl_color_writemask, 4 * sizeof(GLboolean)) - { + if (flag) { + STATES_COMPARE(gl_color_writemask, 4 * sizeof(GLboolean)) { CHECK_GL_ERROR(_orig_fastpath_glColorMask(newctx->gl_color_writemask[0], - newctx->gl_color_writemask[1], - newctx->gl_color_writemask[2], - newctx->gl_color_writemask[3])) + newctx->gl_color_writemask[1], + newctx->gl_color_writemask[2], + newctx->gl_color_writemask[3])) } - STATES_COMPARE(gl_depth_range, 2 * sizeof(GLclampf)) - { + STATES_COMPARE(gl_depth_range, 2 * sizeof(GLclampf)) { CHECK_GL_ERROR(_orig_fastpath_glDepthRangef(newctx->gl_depth_range[0], - newctx->gl_depth_range[1])) + newctx->gl_depth_range[1])) } - STATE_COMPARE(gl_depth_clear_value[0]) - { + STATE_COMPARE(gl_depth_clear_value[0]) { CHECK_GL_ERROR(_orig_fastpath_glClearDepthf(newctx->gl_depth_clear_value[0])) } - STATE_COMPARE(gl_depth_func[0]) - { + STATE_COMPARE(gl_depth_func[0]) { CHECK_GL_ERROR(_orig_fastpath_glDepthFunc(newctx->gl_depth_func[0])) } - STATE_COMPARE(gl_depth_writemask[0]) - { + STATE_COMPARE(gl_depth_writemask[0]) { CHECK_GL_ERROR(_orig_fastpath_glDepthMask(newctx->gl_depth_writemask[0])) } - STATE_COMPARE(gl_cull_face_mode[0]) - { + STATE_COMPARE(gl_cull_face_mode[0]) { CHECK_GL_ERROR(_orig_fastpath_glCullFace(newctx->gl_cull_face_mode[0])) } } #ifdef COREGL_USE_MODULE_TRACEPATH - tracepath_api_trace_end("eglMakeCurrent(FP clear/viewport)", trace_hint_clear_viewport, 0); + tracepath_api_trace_end("eglMakeCurrent(FP clear/viewport)", + trace_hint_clear_viewport, 0); #endif // COREGL_USE_MODULE_TRACEPATH //------------------// // Texture here... #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_bind_textures = NULL; - trace_hint_bind_textures = tracepath_api_trace_begin("eglMakeCurrent(FP bind textures)", trace_hint_bind_textures, 0); + trace_hint_bind_textures = + tracepath_api_trace_begin("eglMakeCurrent(FP bind textures)", + trace_hint_bind_textures, 0); #endif // COREGL_USE_MODULE_TRACEPATH flag = oldctx->_tex_flag1 | newctx->_tex_flag1; - if (flag) - { + if (flag) { - for (i = 0; i < oldctx->gl_num_tex_units[0]; i++) - { - STATE_COMPARE(gl_tex_2d_state[i]) - { + for (i = 0; i < oldctx->gl_num_tex_units[0]; i++) { + STATE_COMPARE(gl_tex_2d_state[i]) { CHECK_GL_ERROR(_orig_fastpath_glActiveTexture(GL_TEXTURE0 + i)) - CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_2D, newctx->gl_tex_2d_state[i])) + CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_2D, + newctx->gl_tex_2d_state[i])) } - STATE_COMPARE(gl_tex_3d_state[i]) - { + STATE_COMPARE(gl_tex_3d_state[i]) { CHECK_GL_ERROR(_orig_fastpath_glActiveTexture(GL_TEXTURE0 + i)) - CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_3D, newctx->gl_tex_3d_state[i])) + CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_3D, + newctx->gl_tex_3d_state[i])) } - STATE_COMPARE(gl_tex_2d_array_state[i]) - { + STATE_COMPARE(gl_tex_2d_array_state[i]) { CHECK_GL_ERROR(_orig_fastpath_glActiveTexture(GL_TEXTURE0 + i)) - CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_2D_ARRAY, newctx->gl_tex_2d_array_state[i])) + CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_2D_ARRAY, + newctx->gl_tex_2d_array_state[i])) } - STATE_COMPARE(gl_tex_cube_state[i]) - { + STATE_COMPARE(gl_tex_cube_state[i]) { CHECK_GL_ERROR(_orig_fastpath_glActiveTexture(GL_TEXTURE0 + i)) - CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_CUBE_MAP, newctx->gl_tex_cube_state[i])) + CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_CUBE_MAP, + newctx->gl_tex_cube_state[i])) } - STATE_COMPARE(gl_tex_external_oes_state[i]) - { + STATE_COMPARE(gl_tex_external_oes_state[i]) { CHECK_GL_ERROR(_orig_fastpath_glActiveTexture(GL_TEXTURE0 + i)) - CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_EXTERNAL_OES, newctx->gl_tex_external_oes_state[i])) + CHECK_GL_ERROR(_orig_fastpath_glBindTexture(GL_TEXTURE_EXTERNAL_OES, + newctx->gl_tex_external_oes_state[i])) } } // Restore active texture CHECK_GL_ERROR(_orig_fastpath_glActiveTexture(newctx->gl_active_texture[0])) - STATE_COMPARE(gl_generate_mipmap_hint[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glHint(GL_GENERATE_MIPMAP_HINT, newctx->gl_generate_mipmap_hint[0])) + STATE_COMPARE(gl_generate_mipmap_hint[0]) { + CHECK_GL_ERROR(_orig_fastpath_glHint(GL_GENERATE_MIPMAP_HINT, + newctx->gl_generate_mipmap_hint[0])) } } #ifdef COREGL_USE_MODULE_TRACEPATH - tracepath_api_trace_end("eglMakeCurrent(FP bind textures)", trace_hint_bind_textures, 0); + tracepath_api_trace_end("eglMakeCurrent(FP bind textures)", + trace_hint_bind_textures, 0); #endif // COREGL_USE_MODULE_TRACEPATH //------------------// #ifdef COREGL_USE_MODULE_TRACEPATH static void *trace_hint_etc = NULL; - trace_hint_etc = tracepath_api_trace_begin("eglMakeCurrent(FP etc.)", trace_hint_etc, 0); + trace_hint_etc = tracepath_api_trace_begin("eglMakeCurrent(FP etc.)", + trace_hint_etc, 0); #endif // COREGL_USE_MODULE_TRACEPATH flag = oldctx->_blend_flag | newctx->_blend_flag; - if (flag) - { - STATES_COMPARE(gl_blend_color, 4 * sizeof(GLclampf)) - { + if (flag) { + STATES_COMPARE(gl_blend_color, 4 * sizeof(GLclampf)) { CHECK_GL_ERROR(_orig_fastpath_glBlendColor(newctx->gl_blend_color[0], - newctx->gl_blend_color[1], - newctx->gl_blend_color[2], - newctx->gl_blend_color[3])) + newctx->gl_blend_color[1], + newctx->gl_blend_color[2], + newctx->gl_blend_color[3])) } if ((oldctx->gl_blend_src_rgb[0] != newctx->gl_blend_src_rgb[0]) || (oldctx->gl_blend_dst_rgb[0] != newctx->gl_blend_dst_rgb[0]) || (oldctx->gl_blend_src_alpha[0] != newctx->gl_blend_src_alpha[0]) || - (oldctx->gl_blend_dst_alpha[0] != newctx->gl_blend_dst_alpha[0])) - { + (oldctx->gl_blend_dst_alpha[0] != newctx->gl_blend_dst_alpha[0])) { CHECK_GL_ERROR(_orig_fastpath_glBlendFuncSeparate(newctx->gl_blend_src_rgb[0], - newctx->gl_blend_dst_rgb[0], - newctx->gl_blend_src_alpha[0], - newctx->gl_blend_dst_alpha[0])) + newctx->gl_blend_dst_rgb[0], + newctx->gl_blend_src_alpha[0], + newctx->gl_blend_dst_alpha[0])) } if ((oldctx->gl_blend_equation_rgb[0] != newctx->gl_blend_equation_rgb[0]) || - (oldctx->gl_blend_equation_alpha[0] != newctx->gl_blend_equation_alpha[0])) - { - CHECK_GL_ERROR(_orig_fastpath_glBlendEquationSeparate(newctx->gl_blend_equation_rgb[0], newctx->gl_blend_equation_alpha[0])) + (oldctx->gl_blend_equation_alpha[0] != newctx->gl_blend_equation_alpha[0])) { + CHECK_GL_ERROR(_orig_fastpath_glBlendEquationSeparate( + newctx->gl_blend_equation_rgb[0], newctx->gl_blend_equation_alpha[0])) } } @@ -2101,63 +2013,61 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) //------------------// // _stencil_flag1 flag = oldctx->_stencil_flag1 | newctx->_stencil_flag1; - if (flag) - { + if (flag) { if ((oldctx->gl_stencil_func[0] != newctx->gl_stencil_func[0]) || (oldctx->gl_stencil_ref[0] != newctx->gl_stencil_ref[0]) || - (oldctx->gl_stencil_value_mask[0] != newctx->gl_stencil_value_mask[0])) - { + (oldctx->gl_stencil_value_mask[0] != newctx->gl_stencil_value_mask[0])) { CHECK_GL_ERROR(_orig_fastpath_glStencilFuncSeparate(GL_FRONT, - newctx->gl_stencil_func[0], - newctx->gl_stencil_ref[0], - newctx->gl_stencil_value_mask[0])) + newctx->gl_stencil_func[0], + newctx->gl_stencil_ref[0], + newctx->gl_stencil_value_mask[0])) } if ((oldctx->gl_stencil_fail[0] != newctx->gl_stencil_fail[0]) || - (oldctx->gl_stencil_pass_depth_fail[0] != newctx->gl_stencil_pass_depth_fail[0]) || - (oldctx->gl_stencil_pass_depth_pass[0] != newctx->gl_stencil_pass_depth_pass[0])) - { + (oldctx->gl_stencil_pass_depth_fail[0] != newctx->gl_stencil_pass_depth_fail[0]) + || + (oldctx->gl_stencil_pass_depth_pass[0] != + newctx->gl_stencil_pass_depth_pass[0])) { CHECK_GL_ERROR(_orig_fastpath_glStencilOpSeparate(GL_FRONT, - newctx->gl_stencil_fail[0], - newctx->gl_stencil_pass_depth_fail[0], - newctx->gl_stencil_pass_depth_pass[0])) + newctx->gl_stencil_fail[0], + newctx->gl_stencil_pass_depth_fail[0], + newctx->gl_stencil_pass_depth_pass[0])) } - STATE_COMPARE(gl_stencil_writemask[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glStencilMaskSeparate(GL_FRONT, newctx->gl_stencil_writemask[0])) + STATE_COMPARE(gl_stencil_writemask[0]) { + CHECK_GL_ERROR(_orig_fastpath_glStencilMaskSeparate(GL_FRONT, + newctx->gl_stencil_writemask[0])) } } // _stencil_flag1 flag = oldctx->_stencil_flag2 | newctx->_stencil_flag2; - if (flag) - { + if (flag) { if ((oldctx->gl_stencil_back_func[0] != newctx->gl_stencil_back_func[0]) || (oldctx->gl_stencil_back_ref[0] != newctx->gl_stencil_back_ref[0]) || - (oldctx->gl_stencil_back_value_mask[0] != newctx->gl_stencil_back_value_mask[0])) - { + (oldctx->gl_stencil_back_value_mask[0] != + newctx->gl_stencil_back_value_mask[0])) { CHECK_GL_ERROR(_orig_fastpath_glStencilFuncSeparate(GL_BACK, - newctx->gl_stencil_back_func[0], - newctx->gl_stencil_back_ref[0], - newctx->gl_stencil_back_value_mask[0])) + newctx->gl_stencil_back_func[0], + newctx->gl_stencil_back_ref[0], + newctx->gl_stencil_back_value_mask[0])) } if ((oldctx->gl_stencil_back_fail[0] != newctx->gl_stencil_back_fail[0]) || - (oldctx->gl_stencil_back_pass_depth_fail[0] != newctx->gl_stencil_back_pass_depth_fail[0]) || - (oldctx->gl_stencil_back_pass_depth_pass[0] != newctx->gl_stencil_back_pass_depth_pass[0])) - { + (oldctx->gl_stencil_back_pass_depth_fail[0] != + newctx->gl_stencil_back_pass_depth_fail[0]) || + (oldctx->gl_stencil_back_pass_depth_pass[0] != + newctx->gl_stencil_back_pass_depth_pass[0])) { CHECK_GL_ERROR(_orig_fastpath_glStencilOpSeparate(GL_BACK, - newctx->gl_stencil_back_fail[0], - newctx->gl_stencil_back_pass_depth_fail[0], - newctx->gl_stencil_back_pass_depth_pass[0])) + newctx->gl_stencil_back_fail[0], + newctx->gl_stencil_back_pass_depth_fail[0], + newctx->gl_stencil_back_pass_depth_pass[0])) } - STATE_COMPARE(gl_stencil_back_writemask[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glStencilMaskSeparate(GL_BACK, newctx->gl_stencil_back_writemask[0])) + STATE_COMPARE(gl_stencil_back_writemask[0]) { + CHECK_GL_ERROR(_orig_fastpath_glStencilMaskSeparate(GL_BACK, + newctx->gl_stencil_back_writemask[0])) } - STATE_COMPARE(gl_stencil_clear_value[0]) - { + STATE_COMPARE(gl_stencil_clear_value[0]) { CHECK_GL_ERROR(_orig_fastpath_glClearStencil(newctx->gl_stencil_clear_value[0])) } } @@ -2165,129 +2075,124 @@ fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx) //------------------// // _pixel_flag1 flag = oldctx->_pixel_flag1 | newctx->_pixel_flag1; - if (flag) - { - STATE_COMPARE(gl_pack_row_length[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_ROW_LENGTH, newctx->gl_pack_row_length[0])) + if (flag) { + STATE_COMPARE(gl_pack_row_length[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_ROW_LENGTH, + newctx->gl_pack_row_length[0])) } - STATE_COMPARE(gl_pack_skip_rows[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_SKIP_ROWS, newctx->gl_pack_skip_rows[0])) + STATE_COMPARE(gl_pack_skip_rows[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_SKIP_ROWS, + newctx->gl_pack_skip_rows[0])) } - STATE_COMPARE(gl_pack_skip_pixels[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_SKIP_PIXELS, newctx->gl_pack_skip_pixels[0])) + STATE_COMPARE(gl_pack_skip_pixels[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_SKIP_PIXELS, + newctx->gl_pack_skip_pixels[0])) } - STATE_COMPARE(gl_pack_alignment[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_ALIGNMENT, newctx->gl_pack_alignment[0])) + STATE_COMPARE(gl_pack_alignment[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_PACK_ALIGNMENT, + newctx->gl_pack_alignment[0])) } } // _pixel_flag2 flag = oldctx->_pixel_flag2 | newctx->_pixel_flag2; - if (flag) - { - STATE_COMPARE(gl_unpack_row_length[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_ROW_LENGTH, newctx->gl_unpack_row_length[0])) + if (flag) { + STATE_COMPARE(gl_unpack_row_length[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_ROW_LENGTH, + newctx->gl_unpack_row_length[0])) } - STATE_COMPARE(gl_unpack_skip_rows[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_SKIP_ROWS, newctx->gl_unpack_skip_rows[0])) + STATE_COMPARE(gl_unpack_skip_rows[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_SKIP_ROWS, + newctx->gl_unpack_skip_rows[0])) } - STATE_COMPARE(gl_unpack_skip_pixels[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_SKIP_PIXELS, newctx->gl_unpack_skip_pixels[0])) + STATE_COMPARE(gl_unpack_skip_pixels[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_SKIP_PIXELS, + newctx->gl_unpack_skip_pixels[0])) } - STATE_COMPARE(gl_unpack_alignment[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_ALIGNMENT, newctx->gl_unpack_alignment[0])) + STATE_COMPARE(gl_unpack_alignment[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_ALIGNMENT, + newctx->gl_unpack_alignment[0])) } - STATE_COMPARE(gl_unpack_image_height[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, newctx->gl_unpack_image_height[0])) + STATE_COMPARE(gl_unpack_image_height[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, + newctx->gl_unpack_image_height[0])) } - STATE_COMPARE(gl_unpack_skip_images[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_SKIP_IMAGES, newctx->gl_unpack_skip_images[0])) + STATE_COMPARE(gl_unpack_skip_images[0]) { + CHECK_GL_ERROR(_orig_fastpath_glPixelStorei(GL_UNPACK_SKIP_IMAGES, + newctx->gl_unpack_skip_images[0])) } } //------------------// // _misc_flag1 flag = oldctx->_misc_flag1 | newctx->_misc_flag1; - if (flag) - { - STATE_COMPARE(gl_front_face[0]) - { + if (flag) { + STATE_COMPARE(gl_front_face[0]) { CHECK_GL_ERROR(_orig_fastpath_glFrontFace(newctx->gl_front_face[0])) } - STATE_COMPARE(gl_line_width[0]) - { + STATE_COMPARE(gl_line_width[0]) { CHECK_GL_ERROR(_orig_fastpath_glLineWidth(newctx->gl_line_width[0])) } - if ((oldctx->gl_polygon_offset_factor[0] != newctx->gl_polygon_offset_factor[0]) || - (oldctx->gl_polygon_offset_units[0] != newctx->gl_polygon_offset_units[0])) - { - CHECK_GL_ERROR(_orig_fastpath_glPolygonOffset(newctx->gl_polygon_offset_factor[0], - newctx->gl_polygon_offset_units[0])) - } - if ((oldctx->gl_sample_coverage_value[0] != newctx->gl_sample_coverage_value[0]) || - (oldctx->gl_sample_coverage_invert[0] != newctx->gl_sample_coverage_invert[0])) - { - CHECK_GL_ERROR(_orig_fastpath_glSampleCoverage(newctx->gl_sample_coverage_value[0], - newctx->gl_sample_coverage_invert[0])) - } - STATE_COMPARE(gl_fragment_shader_derivative_hint[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, newctx->gl_fragment_shader_derivative_hint[0])) + if ((oldctx->gl_polygon_offset_factor[0] != newctx->gl_polygon_offset_factor[0]) + || + (oldctx->gl_polygon_offset_units[0] != newctx->gl_polygon_offset_units[0])) { + CHECK_GL_ERROR(_orig_fastpath_glPolygonOffset( + newctx->gl_polygon_offset_factor[0], + newctx->gl_polygon_offset_units[0])) + } + if ((oldctx->gl_sample_coverage_value[0] != + newctx->gl_sample_coverage_value[0]) || + (oldctx->gl_sample_coverage_invert[0] != + newctx->gl_sample_coverage_invert[0])) { + CHECK_GL_ERROR(_orig_fastpath_glSampleCoverage( + newctx->gl_sample_coverage_value[0], + newctx->gl_sample_coverage_invert[0])) + } + STATE_COMPARE(gl_fragment_shader_derivative_hint[0]) { + CHECK_GL_ERROR(_orig_fastpath_glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, + newctx->gl_fragment_shader_derivative_hint[0])) } } // _misc_flag2 flag = oldctx->_misc_flag2 | newctx->_misc_flag2; - if (flag) - { - STATES_COMPARE(gl_scissor_box, 4 * sizeof(GLint)) - { + if (flag) { + STATES_COMPARE(gl_scissor_box, 4 * sizeof(GLint)) { CHECK_GL_ERROR(_orig_fastpath_glScissor(newctx->gl_scissor_box[0], - newctx->gl_scissor_box[1], - newctx->gl_scissor_box[2], - newctx->gl_scissor_box[3])) + newctx->gl_scissor_box[1], + newctx->gl_scissor_box[2], + newctx->gl_scissor_box[3])) } } // _misc_flag3 flag = oldctx->_misc_flag3 | newctx->_misc_flag3; - if (flag) - { - STATE_COMPARE(gl_read_buffer[0]) - { + if (flag) { + STATE_COMPARE(gl_read_buffer[0]) { CHECK_GL_ERROR(_orig_fastpath_glReadBuffer(newctx->gl_read_buffer[0])) } - STATES_COMPARE(gl_draw_buffers, 16 * sizeof(GLenum)) - { + STATES_COMPARE(gl_draw_buffers, 16 * sizeof(GLenum)) { int drawBuffSize = 16; /* If the context has only default framebuffer, then size of glDrawBuffers can only be 1 */ - if(fastpath_ostate_has_object_type(&newctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER) == 0) { + if (fastpath_ostate_has_object_type(&newctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER) == 0) { drawBuffSize = 1; } - CHECK_GL_ERROR(_orig_fastpath_glDrawBuffers(drawBuffSize, newctx->gl_draw_buffers)) + CHECK_GL_ERROR(_orig_fastpath_glDrawBuffers(drawBuffSize, + newctx->gl_draw_buffers)) } - if (oldctx->gl_transform_feedback_active[0] == GL_TRUE && oldctx->gl_transform_feedback_paused[0] == GL_FALSE) - { + if (oldctx->gl_transform_feedback_active[0] == GL_TRUE && + oldctx->gl_transform_feedback_paused[0] == GL_FALSE) { CHECK_GL_ERROR(_orig_fastpath_glPauseTransformFeedback()) } - STATE_COMPARE(gl_transform_feedback_binding[0]) - { - CHECK_GL_ERROR(_orig_fastpath_glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, newctx->gl_transform_feedback_binding[0])) + STATE_COMPARE(gl_transform_feedback_binding[0]) { + CHECK_GL_ERROR(_orig_fastpath_glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, + newctx->gl_transform_feedback_binding[0])) } - if (newctx->gl_transform_feedback_active[0] == GL_TRUE && newctx->gl_transform_feedback_paused[0] == GL_FALSE) - { + if (newctx->gl_transform_feedback_active[0] == GL_TRUE && + newctx->gl_transform_feedback_paused[0] == GL_FALSE) { CHECK_GL_ERROR(_orig_fastpath_glResumeTransformFeedback()) } } diff --git a/src/modules/fastpath/coregl_fastpath.h b/src/modules/fastpath/coregl_fastpath.h index 6fa2622..8bfcb46 100644 --- a/src/modules/fastpath/coregl_fastpath.h +++ b/src/modules/fastpath/coregl_fastpath.h @@ -49,34 +49,30 @@ #define MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 64 #define MAX_UNIFORM_BUFFER_BINDINGS 64 -typedef enum _Fastpath_Opt_Flag -{ - FP_UNKNOWN_PATH, - FP_NORMAL_PATH, - FP_FAST_PATH +typedef enum _Fastpath_Opt_Flag { + FP_UNKNOWN_PATH, + FP_NORMAL_PATH, + FP_FAST_PATH } Fastpath_Opt_Flag; extern Fastpath_Opt_Flag fp_opt; extern int debug_nofp; -typedef struct _GLContextState -{ +typedef struct _GLContextState { int ref_count; GLContext *rctx; GLDisplay *rdpy; void *data; } GLContextState; -typedef struct _Fastpath_ThreadState -{ +typedef struct _Fastpath_ThreadState { EGLenum binded_api; GLContextState *cstate; GLSurface *rsurf_draw; GLSurface *rsurf_read; } Fastpath_ThreadState; -typedef struct _GLContext_List -{ +typedef struct _GLContext_List { void *option; int option_len; int thread_id; @@ -88,13 +84,11 @@ extern GLContext_List *glctx_list; extern Mutex ctx_list_access_mutex; -typedef struct -{ +typedef struct { GLuint tex_id; } GL_Texture_State; -typedef struct -{ +typedef struct { GLboolean modified; GLboolean enabled; GLuint buf_id; @@ -105,8 +99,7 @@ typedef struct const void *pointer; } GL_Vertex_Array_State; -typedef struct -{ +typedef struct { GLboolean modified; GLfloat value[4]; } GL_Vertex_Attrib; @@ -130,8 +123,7 @@ typedef struct #define GL_OBJECT_TYPE_PROGRAMPIPELINE 0x9000000 #define GL_OBJECT_TYPE_UNKNOWN 0xFFFFFFF -typedef struct _GL_Object -{ +typedef struct _GL_Object { GLuint id; GLuint real_id; GLint ref_count; @@ -140,15 +132,13 @@ typedef struct _GL_Object struct _GL_Shared_Object_State *parent; } GL_Object; -typedef struct _GL_Object_Hash -{ +typedef struct _GL_Object_Hash { GLuint hash_key; GL_Object *item; struct _GL_Object_Hash *next; } GL_Object_Hash; -typedef struct _GL_Object_Hash_Base -{ +typedef struct _GL_Object_Hash_Base { GLuint hash_size; GLuint item_size; GLuint last_id; @@ -156,8 +146,7 @@ typedef struct _GL_Object_Hash_Base GL_Object_Hash **hash_field; } GL_Object_Hash_Base; -typedef struct _GL_Shared_Object_State -{ +typedef struct _GL_Shared_Object_State { Mutex access_mutex; Mutex real_access_mutex; int ref_count; @@ -179,8 +168,7 @@ typedef struct _GL_Shared_Object_State GL_Object_Hash_Base programpipeline_real; } GL_Shared_Object_State; -typedef struct _GL_Object_State -{ +typedef struct _GL_Object_State { GL_Shared_Object_State *shared; GL_Object_Hash_Base query; @@ -194,8 +182,7 @@ typedef struct _GL_Object_State GL_Object_Hash_Base transformfeedback_real; } GL_Object_State; -typedef struct _GLGlueContext -{ +typedef struct _GLGlueContext { int magic; int initialized; int surface_attached; @@ -220,7 +207,7 @@ typedef struct _GLGlueContext - unsigned char _bind_flag1; + unsigned char _bind_flag1; #define _BIND_FLAG1_BIT_gl_array_buffer_binding FLAG_BIT_0 #define _BIND_FLAG1_BIT_gl_element_array_buffer_binding FLAG_BIT_1 #define _BIND_FLAG1_BIT_gl_framebuffer_binding FLAG_BIT_2 @@ -356,8 +343,7 @@ typedef struct _GLGlueContext } GLGlueContext; -typedef struct _GLGlueContext_List -{ +typedef struct _GLGlueContext_List { GLGlueContext *gctx; struct _GLGlueContext_List *prev; struct _GLGlueContext_List *next; @@ -370,36 +356,51 @@ extern GLGlueContext *initial_ctx; extern void init_modules_fastpath(); extern void deinit_modules_fastpath(); extern void init_modules_tstate_fastpath(GLThreadState *tstate); -extern void deinit_modules_tstate_fastpath(GLThreadState *tstate); +extern void deinit_modules_tstate_fastpath( + GLThreadState *tstate); extern void fastpath_apply_overrides(); extern void fastpath_apply_overrides_egl(int enable); extern void fastpath_apply_overrides_gl(int enable); extern int fastpath_init_context_states(GLGlueContext *ctx); -extern int fastpath_make_context_current(GLGlueContext *oldctx, GLGlueContext *newctx); +extern int fastpath_make_context_current(GLGlueContext *oldctx, + GLGlueContext *newctx); #ifdef COREGL_FASTPATH_TRACE_STATE_INFO -extern void fastpath_dump_context_states(GLGlueContext *ctx, int force_output); +extern void fastpath_dump_context_states(GLGlueContext *ctx, + int force_output); #endif // COREGL_FASTPATH_TRACE_STATE_INFO // Context state functions -extern int fastpath_add_context_state_to_list(const void *data, const int datalen, GLContextState *cstate, Mutex *mtx); -extern int fastpath_remove_context_states_from_list(GLContextState *cstate, Mutex *mtx); -extern GLContextState *fastpath_get_context_state_from_list(const void *data, const int datalen, Mutex *mtx); +extern int fastpath_add_context_state_to_list(const void *data, + const int datalen, GLContextState *cstate, Mutex *mtx); +extern int fastpath_remove_context_states_from_list( + GLContextState *cstate, Mutex *mtx); +extern GLContextState *fastpath_get_context_state_from_list( + const void *data, const int datalen, Mutex *mtx); // Shared object state functions extern void fastpath_ostate_init(GL_Object_State *ostate); -extern void fastpath_sostate_init(GL_Shared_Object_State *ostate); +extern void fastpath_sostate_init(GL_Shared_Object_State + *ostate); extern void fastpath_ostate_deinit(GL_Object_State *ostate); -extern void fastpath_sostate_deinit(GL_Shared_Object_State *ostate); -extern GLuint fastpath_ostate_create_object(GL_Object_State *ostate, GL_Object_Type type, GLuint name); -extern GLuint fastpath_ostate_remove_object(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name); -extern GLuint fastpath_ostate_get_object(GL_Object_State *ostate, GL_Object_Type type, GLuint name); -extern GLuint fastpath_ostate_find_object(GL_Object_State *ostate, GL_Object_Type type, GLuint real_name); -extern GLint fastpath_ostate_use_object(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name); -extern GLint fastpath_ostate_set_object_tag(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name, GLvoid *tag); -extern GLvoid *fastpath_ostate_get_object_tag(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name); +extern void fastpath_sostate_deinit(GL_Shared_Object_State + *ostate); +extern GLuint fastpath_ostate_create_object( + GL_Object_State *ostate, GL_Object_Type type, GLuint name); +extern GLuint fastpath_ostate_remove_object( + GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name); +extern GLuint fastpath_ostate_get_object(GL_Object_State *ostate, + GL_Object_Type type, GLuint name); +extern GLuint fastpath_ostate_find_object(GL_Object_State *ostate, + GL_Object_Type type, GLuint real_name); +extern GLint fastpath_ostate_use_object(GL_Object_State *ostate, + GL_Object_Type type, GLuint glue_name); +extern GLint fastpath_ostate_set_object_tag( + GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name, GLvoid *tag); +extern GLvoid *fastpath_ostate_get_object_tag( + GL_Object_State *ostate, GL_Object_Type type, GLuint glue_name); // GL context management functions extern void fastpath_release_gl_context(GLGlueContext *gctx); diff --git a/src/modules/fastpath/coregl_fastpath_egl.c b/src/modules/fastpath/coregl_fastpath_egl.c index 343223e..ed994f8 100644 --- a/src/modules/fastpath/coregl_fastpath_egl.c +++ b/src/modules/fastpath/coregl_fastpath_egl.c @@ -26,12 +26,10 @@ _dump_context_info(const char *ment, int force_output) AST(mutex_lock(&ctx_list_access_mutex) == 1); AST(mutex_lock(&general_trace_lists_access_mutex) == 1); - if (!force_output && !trace_ctx_force_flag) - { + if (!force_output && !trace_ctx_force_flag) { struct timeval tv_now = { 0, 0 }; AST(gettimeofday(&tv_now, NULL) == 0); - if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) - { + if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) { goto finish; } tv_last = tv_now; @@ -41,7 +39,8 @@ _dump_context_info(const char *ment, int force_output) TRACE("\n"); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); - TRACE("\E[40;32;1m Context info \E[1;37;1m: %s\E[0m\n", getpid(), ment); + TRACE("\E[40;32;1m Context info \E[1;37;1m: %s\E[0m\n", getpid(), + ment); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); @@ -50,8 +49,7 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = thread_trace_list; - while (current != NULL) - { + while (current != NULL) { GLThreadState *cur_tstate = (GLThreadState *)current->value; MY_MODULE_TSTATE *cur_tstate_tm = NULL; @@ -64,14 +62,11 @@ _dump_context_info(const char *ment, int force_output) cur_tstate_tm->rsurf_draw, cur_tstate_tm->rsurf_read); - if (cur_tstate_tm->cstate != NULL) - { + if (cur_tstate_tm->cstate != NULL) { TRACE(" GlueCTX=[%12p] RealCTX=[%12p]\E[0m\n", cur_tstate_tm->cstate->data, cur_tstate_tm->cstate); - } - else - { + } else { TRACE(" (NOT BINDED TO THREAD)\E[0m\n"); } @@ -80,16 +75,14 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = context_state_trace_list; - while (current != NULL) - { + while (current != NULL) { GLContextState *cur_cstate = (GLContextState *)current->value; MY_MODULE_TSTATE *cur_tstate_tm = NULL; GET_MY_TSTATE(cur_tstate_tm, cur_tstate); AST(cur_tstate_tm != NULL); - if (cur_tstate_tm->cstate == cur_cstate) - { + if (cur_tstate_tm->cstate == cur_cstate) { TRACE(" -> RealCTX [%12p] : EGLDPY=[%12p] EGLCTX=[%12p] <[%2d] GlueCTXs>\E[0m\n", cur_cstate, cur_cstate->rdpy, @@ -101,12 +94,10 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = glue_ctx_trace_list; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->cstate == cur_cstate) - { + if (cur_gctx->cstate == cur_cstate) { TRACE(" -%c GlueCTX [%12p] : EGLDPY=[%12p] TID=[%12d] ", (cur_cstate->data == cur_gctx) ? '>' : '-', cur_gctx, @@ -139,27 +130,23 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = context_state_trace_list; - while (current != NULL) - { + while (current != NULL) { GLContextState *cur_cstate = (GLContextState *)current->value; int isbinded = 0; - if (cur_cstate->data != NULL) - { + if (cur_cstate->data != NULL) { General_Trace_List *current_t = NULL; current_t = thread_trace_list; - while (current_t != NULL) - { + while (current_t != NULL) { GLThreadState *cur_tstate = (GLThreadState *)current_t->value; MY_MODULE_TSTATE *cur_tstate_tm = NULL; GET_MY_TSTATE(cur_tstate_tm, cur_tstate); AST(cur_tstate_tm != NULL); - if (cur_tstate->thread_id == ((GLGlueContext *)cur_cstate->data)->thread_id) - { + if (cur_tstate->thread_id == ((GLGlueContext *)cur_cstate->data)->thread_id) { if (cur_tstate_tm->cstate == cur_cstate) isbinded = 1; break; @@ -168,8 +155,7 @@ _dump_context_info(const char *ment, int force_output) } } - if (isbinded == 0) - { + if (isbinded == 0) { TRACE(" RealCTX [%12p] : EGLDPY=[%12p] EGLCTX=[%12p] <[%2d] GlueCTXs>\E[0m\n", cur_cstate, cur_cstate->rdpy, @@ -181,12 +167,10 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = glue_ctx_trace_list; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->cstate == cur_cstate) - { + if (cur_gctx->cstate == cur_cstate) { TRACE(" -%c GlueCTX [%12p] : EGLDPY=[%12p] TID=[%12d] ", (cur_cstate->data == cur_gctx) ? '>' : '-', cur_gctx, @@ -214,12 +198,10 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = glue_ctx_trace_list; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->cstate == NULL) - { + if (cur_gctx->cstate == NULL) { TRACE(" GlueCTX [%12p] : EGLDPY=[%12p] TID=[%12d] ", cur_gctx, cur_gctx->rdpy, @@ -250,8 +232,7 @@ finish: #endif // COREGL_FASTPATH_TRACE_CONTEXT_INFO -typedef struct -{ +typedef struct { EGLint context_major_version; EGLint context_minor_version; EGLint context_flags; @@ -259,22 +240,21 @@ typedef struct EGLint opengl_reset_notification_strategy; } EGL_packed_attrib_list; -typedef struct -{ +typedef struct { EGLDisplay dpy; EGLConfig cfg; EGL_packed_attrib_list attrib_list; EGLint force_unique; } EGL_packed_option; -typedef struct -{ +typedef struct { EGLContext share_context; } EGL_packed_sharable_option; static int -_pack_egl_context_option(EGL_packed_option *pack_data, EGLDisplay dpy, EGLConfig cfg, EGLint force_unique, const EGLint *attrib_list) +_pack_egl_context_option(EGL_packed_option *pack_data, EGLDisplay dpy, + EGLConfig cfg, EGLint force_unique, const EGLint *attrib_list) { static int force_unique_free_id = 0; int ret = 0; @@ -293,35 +273,32 @@ _pack_egl_context_option(EGL_packed_option *pack_data, EGLDisplay dpy, EGLConfig // Apply specified attributes EGLint *attrib = (EGLint *)attrib_list; - while(attrib[0] != EGL_NONE) - { - switch(attrib[0]) - { - case EGL_CONTEXT_MAJOR_VERSION_KHR: // EGL_CONTEXT_CLIENT_VERSION - pack_data->attrib_list.context_major_version = attrib[1]; - break; - case EGL_CONTEXT_MINOR_VERSION_KHR: - pack_data->attrib_list.context_minor_version = attrib[1]; - break; - case EGL_CONTEXT_FLAGS_KHR: - pack_data->attrib_list.context_flags = attrib[1]; - break; - case EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR: - pack_data->attrib_list.context_opengl_profile_mask = attrib[1]; - break; - case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR: - pack_data->attrib_list.opengl_reset_notification_strategy = attrib[1]; - break; - default: - COREGL_WRN("\E[40;31;1mInvalid context attribute.\E[0m\n"); - goto finish; + while (attrib[0] != EGL_NONE) { + switch (attrib[0]) { + case EGL_CONTEXT_MAJOR_VERSION_KHR: // EGL_CONTEXT_CLIENT_VERSION + pack_data->attrib_list.context_major_version = attrib[1]; + break; + case EGL_CONTEXT_MINOR_VERSION_KHR: + pack_data->attrib_list.context_minor_version = attrib[1]; + break; + case EGL_CONTEXT_FLAGS_KHR: + pack_data->attrib_list.context_flags = attrib[1]; + break; + case EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR: + pack_data->attrib_list.context_opengl_profile_mask = attrib[1]; + break; + case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR: + pack_data->attrib_list.opengl_reset_notification_strategy = attrib[1]; + break; + default: + COREGL_WRN("\E[40;31;1mInvalid context attribute.\E[0m\n"); + goto finish; } attrib += 2; } // Eject condition for context version - if (pack_data->attrib_list.context_major_version != 2) - { + if (pack_data->attrib_list.context_major_version != 2) { pack_data->force_unique = force_unique_free_id; } @@ -333,7 +310,9 @@ finish: } static int -_unpack_egl_context_option(EGL_packed_option *pack_data, EGLDisplay *dpy, EGLConfig *cfg, EGLint *force_unique, EGLint *attrib_list, const int attrib_list_size) +_unpack_egl_context_option(EGL_packed_option *pack_data, EGLDisplay *dpy, + EGLConfig *cfg, EGLint *force_unique, EGLint *attrib_list, + const int attrib_list_size) { int ret = 0; @@ -341,45 +320,45 @@ _unpack_egl_context_option(EGL_packed_option *pack_data, EGLDisplay *dpy, EGLCon if (cfg != NULL) *cfg = pack_data->cfg; if (force_unique != NULL) *force_unique = pack_data->force_unique; - if (attrib_list != NULL && attrib_list_size > 0) - { + if (attrib_list != NULL && attrib_list_size > 0) { int attrib_list_index = 0; memset(attrib_list, 0x00, sizeof(int) * attrib_list_size); - if (pack_data->attrib_list.context_major_version != EGL_DONT_CARE) - { + if (pack_data->attrib_list.context_major_version != EGL_DONT_CARE) { AST(attrib_list_index + 2 < attrib_list_size); attrib_list[attrib_list_index] = EGL_CONTEXT_MAJOR_VERSION_KHR; - attrib_list[attrib_list_index + 1] = pack_data->attrib_list.context_major_version; + attrib_list[attrib_list_index + 1] = + pack_data->attrib_list.context_major_version; attrib_list_index += 2; } - if (pack_data->attrib_list.context_minor_version != EGL_DONT_CARE) - { + if (pack_data->attrib_list.context_minor_version != EGL_DONT_CARE) { AST(attrib_list_index + 2 < attrib_list_size); attrib_list[attrib_list_index] = EGL_CONTEXT_MINOR_VERSION_KHR; - attrib_list[attrib_list_index + 1] = pack_data->attrib_list.context_minor_version; + attrib_list[attrib_list_index + 1] = + pack_data->attrib_list.context_minor_version; attrib_list_index += 2; } - if (pack_data->attrib_list.context_flags != EGL_DONT_CARE) - { + if (pack_data->attrib_list.context_flags != EGL_DONT_CARE) { AST(attrib_list_index + 2 < attrib_list_size); attrib_list[attrib_list_index] = EGL_CONTEXT_FLAGS_KHR; attrib_list[attrib_list_index + 1] = pack_data->attrib_list.context_flags; attrib_list_index += 2; } - if (pack_data->attrib_list.context_opengl_profile_mask != EGL_DONT_CARE) - { + if (pack_data->attrib_list.context_opengl_profile_mask != EGL_DONT_CARE) { AST(attrib_list_index + 2 < attrib_list_size); attrib_list[attrib_list_index] = EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR; - attrib_list[attrib_list_index + 1] = pack_data->attrib_list.context_opengl_profile_mask; + attrib_list[attrib_list_index + 1] = + pack_data->attrib_list.context_opengl_profile_mask; attrib_list_index += 2; } - if (pack_data->attrib_list.opengl_reset_notification_strategy != EGL_DONT_CARE) - { + if (pack_data->attrib_list.opengl_reset_notification_strategy != + EGL_DONT_CARE) { AST(attrib_list_index + 2 < attrib_list_size); - attrib_list[attrib_list_index] = EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR; - attrib_list[attrib_list_index + 1] = pack_data->attrib_list.opengl_reset_notification_strategy; + attrib_list[attrib_list_index] = + EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR; + attrib_list[attrib_list_index + 1] = + pack_data->attrib_list.opengl_reset_notification_strategy; attrib_list_index += 2; } @@ -393,7 +372,8 @@ finish: } static int -_pack_egl_context_sharable_option(EGL_packed_sharable_option *pack_data, EGLContext share_context) +_pack_egl_context_sharable_option(EGL_packed_sharable_option *pack_data, + EGLContext share_context) { int ret = 0; @@ -408,7 +388,8 @@ finish: #if 0 static int -_unpack_egl_context_sharable_option(EGL_packed_sharable_option *pack_data, EGLContext *share_context) +_unpack_egl_context_sharable_option(EGL_packed_sharable_option *pack_data, + EGLContext *share_context) { int ret = 0; @@ -441,8 +422,7 @@ _unlink_context_state(GLGlueContext *gctx, Mutex *ctx_list_mtx) cstate->ref_count--; AST(cstate->ref_count >= 0); - if (cstate->ref_count == 0) - { + if (cstate->ref_count == 0) { MY_MODULE_TSTATE *tstate = NULL; AST(cstate->data == NULL || cstate->data == initial_ctx); @@ -455,11 +435,10 @@ _unlink_context_state(GLGlueContext *gctx, Mutex *ctx_list_mtx) AST(fastpath_remove_context_states_from_list(cstate, ctx_list_mtx) == 1); GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate != NULL) - { - if (tstate->cstate == cstate) - { - _orig_fastpath_eglMakeCurrent(cstate->rdpy, tstate->rsurf_draw, tstate->rsurf_read, EGL_NO_CONTEXT); + if (tstate != NULL) { + if (tstate->cstate == cstate) { + _orig_fastpath_eglMakeCurrent(cstate->rdpy, tstate->rsurf_draw, + tstate->rsurf_read, EGL_NO_CONTEXT); tstate->cstate = NULL; } } @@ -478,7 +457,8 @@ _add_shared_obj_state_ref(GLGlueContext *gctx, GL_Shared_Object_State *sostate) } static void -_remove_shared_obj_state_ref(GLGlueContext *gctx, GL_Shared_Object_State *sostate) +_remove_shared_obj_state_ref(GLGlueContext *gctx, + GL_Shared_Object_State *sostate) { remove_from_general_trace_list(&sostate->using_gctxs, gctx); @@ -487,8 +467,7 @@ _remove_shared_obj_state_ref(GLGlueContext *gctx, GL_Shared_Object_State *sostat AST(sostate->ref_count > 0); sostate->ref_count--; - if (sostate->ref_count == 0) - { + if (sostate->ref_count == 0) { fastpath_sostate_deinit(sostate); free(sostate); } @@ -510,8 +489,7 @@ _remove_context_ref(GLGlueContext *gctx, Mutex *ctx_list_mtx) AST(gctx->ref_count > 0); gctx->ref_count--; - if (gctx->ref_count == 0) - { + if (gctx->ref_count == 0) { #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO if (unlikely(trace_ctx_flag == 1)) remove_from_general_trace_list(&glue_ctx_trace_list, gctx); @@ -529,13 +507,11 @@ _remove_context_ref(GLGlueContext *gctx, Mutex *ctx_list_mtx) fastpath_ostate_deinit(&gctx->ostate); - if (gctx->real_ctx_option != NULL) - { + if (gctx->real_ctx_option != NULL) { free(gctx->real_ctx_option); gctx->real_ctx_option = NULL; } - if (gctx->real_ctx_sharable_option != NULL) - { + if (gctx->real_ctx_sharable_option != NULL) { free(gctx->real_ctx_sharable_option); gctx->real_ctx_sharable_option = NULL; } @@ -548,10 +524,8 @@ _remove_context_ref(GLGlueContext *gctx, Mutex *ctx_list_mtx) current = gctx_list; - while (current != NULL) - { - if (current->gctx == gctx) - { + while (current != NULL) { + if (current->gctx == gctx) { if (current->next != NULL) current->next->prev = current->prev; @@ -573,15 +547,14 @@ _remove_context_ref(GLGlueContext *gctx, Mutex *ctx_list_mtx) } static int -_bind_context_state(GLGlueContext *gctx, GLContextState *cstate, Mutex *ctx_list_mtx) +_bind_context_state(GLGlueContext *gctx, GLContextState *cstate, + Mutex *ctx_list_mtx) { - if (gctx != NULL) - { + if (gctx != NULL) { AST(gctx->cstate == cstate); } - if (cstate->data != gctx) - { + if (cstate->data != gctx) { GLGlueContext *curctx = (GLGlueContext *)cstate->data; GLGlueContext *newctx = gctx; @@ -607,8 +580,9 @@ _bind_context_state(GLGlueContext *gctx, GLContextState *cstate, Mutex *ctx_list } GLContextState * -_egl_create_context(EGL_packed_option *real_ctx_option, GLContextState **cstate_new, EGLContext *ctx, - EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list) +_egl_create_context(EGL_packed_option *real_ctx_option, + GLContextState **cstate_new, EGLContext *ctx, + EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) { GLContextState *cstate = NULL; @@ -617,22 +591,22 @@ _egl_create_context(EGL_packed_option *real_ctx_option, GLContextState **cstate_ AST(ctx != NULL); // Pack context option - AST(_pack_egl_context_option(real_ctx_option, dpy, config, 0, attrib_list) == 1); + AST(_pack_egl_context_option(real_ctx_option, dpy, config, 0, + attrib_list) == 1); - if (debug_nofp == 1) - { - AST(_pack_egl_context_option(real_ctx_option, dpy, config, 1, attrib_list) == 1); + if (debug_nofp == 1) { + AST(_pack_egl_context_option(real_ctx_option, dpy, config, 1, + attrib_list) == 1); } // Find context state - if (real_ctx_option->force_unique == 0) - { - cstate = fastpath_get_context_state_from_list(real_ctx_option, sizeof(EGL_packed_option), &ctx_list_access_mutex); + if (real_ctx_option->force_unique == 0) { + cstate = fastpath_get_context_state_from_list(real_ctx_option, + sizeof(EGL_packed_option), &ctx_list_access_mutex); } // Create a real context if it hasn't been created - if (cstate == NULL) - { + if (cstate == NULL) { EGLContext *real_share_context = EGL_NO_CONTEXT; AST(mutex_lock(&ctx_list_access_mutex) == 1); @@ -640,12 +614,11 @@ _egl_create_context(EGL_packed_option *real_ctx_option, GLContextState **cstate_ GLContext_List *current = NULL; current = glctx_list; - while (current != NULL) - { + while (current != NULL) { EGLDisplay cur_dpy = EGL_NO_DISPLAY; - AST(_unpack_egl_context_option(current->option, &cur_dpy, NULL, NULL, NULL, 0) == 1); - if (cur_dpy == dpy) - { + AST(_unpack_egl_context_option(current->option, &cur_dpy, NULL, NULL, NULL, + 0) == 1); + if (cur_dpy == dpy) { AST(current->cstate != NULL); real_share_context = current->cstate->rctx; break; @@ -655,17 +628,16 @@ _egl_create_context(EGL_packed_option *real_ctx_option, GLContextState **cstate_ } AST(mutex_unlock(&ctx_list_access_mutex) == 1); - *ctx = _orig_fastpath_eglCreateContext(dpy, config, real_share_context, attrib_list); + *ctx = _orig_fastpath_eglCreateContext(dpy, config, real_share_context, + attrib_list); - if (*ctx == EGL_NO_CONTEXT) - { + if (*ctx == EGL_NO_CONTEXT) { COREGL_WRN("\E[40;31;1mFailed creating a egl real context for Fastpath. (Invalid config?)\E[0m\n"); goto finish; } *cstate_new = (GLContextState *)calloc(1, sizeof(GLContextState)); - if (*cstate_new == NULL) - { + if (*cstate_new == NULL) { COREGL_ERR("\E[40;31;1mError creating a new context state. (Memory full)\E[0m\n"); goto finish; } @@ -673,7 +645,8 @@ _egl_create_context(EGL_packed_option *real_ctx_option, GLContextState **cstate_ (*cstate_new)->rdpy = dpy; (*cstate_new)->data = NULL; - AST(fastpath_add_context_state_to_list(real_ctx_option, sizeof(EGL_packed_option), *cstate_new, &ctx_list_access_mutex) == 1); + AST(fastpath_add_context_state_to_list(real_ctx_option, + sizeof(EGL_packed_option), *cstate_new, &ctx_list_access_mutex) == 1); #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO if (unlikely(trace_ctx_flag == 1)) @@ -701,8 +674,7 @@ fastpath_eglBindAPI(EGLenum api) MY_MODULE_TSTATE *tstate = NULL; _COREGL_FASTPATH_FUNC_BEGIN(); - if (fp_opt == FP_UNKNOWN_PATH) - { + if (fp_opt == FP_UNKNOWN_PATH) { COREGL_ERR("\E[40;31;1mInvalid library link! (CoreGL path option is invalid)\E[0m\n"); goto finish; } @@ -710,8 +682,7 @@ fastpath_eglBindAPI(EGLenum api) ret = _orig_fastpath_eglBindAPI(api); GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate == NULL) - { + if (tstate == NULL) { AST(init_new_thread_state() == 1); GET_MY_TSTATE(tstate, get_current_thread_state()); @@ -720,8 +691,7 @@ fastpath_eglBindAPI(EGLenum api) { EGLenum newapi = _orig_fastpath_eglQueryAPI(); - if (tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate->binded_api != EGL_OPENGL_ES_API) { tstate->binded_api = newapi; } } @@ -740,8 +710,7 @@ fastpath_eglQueryAPI(void) MY_MODULE_TSTATE *tstate = NULL; _COREGL_FASTPATH_FUNC_BEGIN(); - if (fp_opt == FP_UNKNOWN_PATH) - { + if (fp_opt == FP_UNKNOWN_PATH) { COREGL_ERR("\E[40;31;1mInvalid library link! (CoreGL path option is invalid)\E[0m\n"); goto finish; } @@ -749,8 +718,7 @@ fastpath_eglQueryAPI(void) ret = _orig_fastpath_eglQueryAPI(); GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate != NULL) - { + if (tstate != NULL) { AST(tstate->binded_api == ret); } @@ -762,7 +730,8 @@ finish: } EGLContext -fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) +fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, const EGLint *attrib_list) { GLGlueContext *gctx = NULL, *newgctx = NULL; GLGlueContext_List *gctx_list_new = NULL; @@ -777,35 +746,34 @@ fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_con // Special eject condition for binding API GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) { return _orig_fastpath_eglCreateContext(dpy, config, share_context, attrib_list); } _COREGL_FASTPATH_FUNC_BEGIN(); real_ctx_option = (EGL_packed_option *)calloc(1, sizeof(EGL_packed_option)); - if (real_ctx_option == NULL) - { + if (real_ctx_option == NULL) { COREGL_ERR("\E[40;31;1mError creating a new GLGlueContext(Memory full 1)\E[0m\n"); goto finish; } - cstate = _egl_create_context(real_ctx_option, &cstate_new, &ctx, dpy, config, attrib_list); + cstate = _egl_create_context(real_ctx_option, &cstate_new, &ctx, dpy, config, + attrib_list); AST(cstate != NULL); // Pack shared context options - real_ctx_sharable_option = (EGL_packed_sharable_option *)calloc(1, sizeof(EGL_packed_sharable_option)); - if (real_ctx_sharable_option == NULL) - { + real_ctx_sharable_option = (EGL_packed_sharable_option *)calloc(1, + sizeof(EGL_packed_sharable_option)); + if (real_ctx_sharable_option == NULL) { COREGL_ERR("\E[40;31;1mError creating a new GLGlueContext(Memory full 2)\E[0m\n"); goto finish; } - AST(_pack_egl_context_sharable_option(real_ctx_sharable_option, share_context) == 1); + AST(_pack_egl_context_sharable_option(real_ctx_sharable_option, + share_context) == 1); // Allocate a new context newgctx = (GLGlueContext *)calloc(1, sizeof(GLGlueContext)); - if (newgctx == NULL) - { + if (newgctx == NULL) { COREGL_ERR("\E[40;31;1mError creating a new GLGlueContext(Memory full 3)\E[0m\n"); goto finish; } @@ -817,18 +785,15 @@ fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_con fastpath_ostate_init(&newgctx->ostate); - if (share_context != EGL_NO_CONTEXT) - { + if (share_context != EGL_NO_CONTEXT) { GLGlueContext *shared_gctx = (GLGlueContext *)share_context; AST(shared_gctx->magic == MAGIC_GLFAST); AST(shared_gctx->ostate.shared != NULL); newgctx->ostate.shared = shared_gctx->ostate.shared; - } - else - { - sostate_new = (GL_Shared_Object_State *)calloc(1, sizeof(GL_Shared_Object_State)); - if (sostate_new == NULL) - { + } else { + sostate_new = (GL_Shared_Object_State *)calloc(1, + sizeof(GL_Shared_Object_State)); + if (sostate_new == NULL) { COREGL_ERR("\E[40;31;1mError creating a new GLGlueContext(Memory full 4)\E[0m\n"); goto finish; } @@ -846,10 +811,10 @@ fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_con newgctx->cstate = cstate; - { // Add glue context to list + { + // Add glue context to list gctx_list_new = (GLGlueContext_List *)calloc(1, sizeof(GLGlueContext_List)); - if (gctx_list_new == NULL) - { + if (gctx_list_new == NULL) { COREGL_ERR("\E[40;31;1mError creating a new GlGlueContext(Memory full 5)\E[0m\n"); goto finish; } @@ -871,8 +836,7 @@ fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_con gctx = newgctx; #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO - if (unlikely(trace_ctx_flag == 1)) - { + if (unlikely(trace_ctx_flag == 1)) { char ment[256]; add_to_general_trace_list(&glue_ctx_trace_list, newgctx); @@ -884,30 +848,24 @@ fastpath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_con goto finish; finish: - if (gctx == NULL) - { - if (ctx != NULL) - { + if (gctx == NULL) { + if (ctx != NULL) { _orig_fastpath_eglDestroyContext(dpy, ctx); ctx = NULL; } - if (sostate_new != NULL) - { + if (sostate_new != NULL) { free(sostate_new); sostate_new = NULL; } - if (real_ctx_option != NULL) - { + if (real_ctx_option != NULL) { free(real_ctx_option); real_ctx_option = NULL; } - if (real_ctx_sharable_option != NULL) - { + if (real_ctx_sharable_option != NULL) { free(real_ctx_sharable_option); real_ctx_sharable_option = NULL; } - if (cstate_new != NULL) - { + if (cstate_new != NULL) { #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO if (unlikely(trace_ctx_flag == 1)) remove_from_general_trace_list(&context_state_trace_list, cstate_new); @@ -917,8 +875,7 @@ finish: free(cstate_new); cstate_new = NULL; } - if (gctx_list_new != NULL) - { + if (gctx_list_new != NULL) { AST(mutex_lock(&ctx_list_access_mutex) == 1); if (gctx_list_new->next != NULL) @@ -933,8 +890,7 @@ finish: free(gctx_list_new); } - if (newgctx != NULL) - { + if (newgctx != NULL) { _remove_context_ref(newgctx, &ctx_list_access_mutex); free(newgctx); newgctx = NULL; @@ -955,12 +911,10 @@ fastpath_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) gctx = (GLGlueContext *)ctx; - if (gctx != NULL && gctx != EGL_NO_CONTEXT) - { + if (gctx != NULL && gctx != EGL_NO_CONTEXT) { GLContextState *cstate = NULL; - if (gctx->magic != MAGIC_GLFAST) - { + if (gctx->magic != MAGIC_GLFAST) { ret = _orig_fastpath_eglDestroyContext(dpy, ctx); goto finish; } @@ -968,14 +922,11 @@ fastpath_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) cstate = gctx->cstate; AST(cstate != NULL); - if (gctx->is_destroyed != 1) - { + if (gctx->is_destroyed != 1) { gctx->is_destroyed = 1; _remove_context_ref(gctx, &ctx_list_access_mutex); } - } - else - { + } else { COREGL_WRN("\E[40;31;1mInvalid destroying context. (no exists)\E[0m\n"); ret = EGL_FALSE; goto finish; @@ -988,8 +939,7 @@ finish: _COREGL_FASTPATH_FUNC_END(); #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO - if (unlikely(trace_ctx_flag == 1)) - { + if (unlikely(trace_ctx_flag == 1)) { char ment[256]; sprintf(ment, "eglDestroyContext completed (GlueCTX=[%12p])", ctx); _dump_context_info(ment, 1); @@ -1000,24 +950,21 @@ finish: } EGLBoolean -fastpath_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) +fastpath_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, + EGLint *value) { EGLBoolean ret = EGL_FALSE; EGLContext real_ctx = EGL_NO_CONTEXT; _COREGL_FASTPATH_FUNC_BEGIN(); - if (ctx != EGL_NO_CONTEXT) - { + if (ctx != EGL_NO_CONTEXT) { GLGlueContext *gctx = NULL; gctx = (GLGlueContext *)ctx; - if (gctx->magic != MAGIC_GLFAST) - { + if (gctx->magic != MAGIC_GLFAST) { real_ctx = ctx; - } - else - { + } else { AST(gctx->cstate != NULL); real_ctx = gctx->cstate->rctx; } @@ -1043,8 +990,7 @@ fastpath_eglReleaseThread(void) GET_MY_TSTATE(tstate, get_current_thread_state()); // Special eject condition for binding API - if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) { return _orig_fastpath_eglReleaseThread(); } @@ -1069,18 +1015,15 @@ fastpath_eglGetCurrentDisplay(void) GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate != NULL) - { + if (tstate != NULL) { // Special eject condition for binding API - if(tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate->binded_api != EGL_OPENGL_ES_API) { return _orig_fastpath_eglGetCurrentDisplay(); } _COREGL_FASTPATH_FUNC_BEGIN(); - if (tstate->cstate != NULL) - { + if (tstate->cstate != NULL) { dpy = tstate->cstate->rdpy; } @@ -1097,7 +1040,8 @@ finish: } EGLBoolean -fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) +fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, + EGLContext ctx) { EGLBoolean ret = EGL_FALSE; EGLBoolean need_mc = EGL_FALSE; @@ -1108,8 +1052,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon GET_MY_TSTATE(tstate, get_current_thread_state()); // Special eject condition for binding API - if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) { return _orig_fastpath_eglMakeCurrent(dpy, draw, read, ctx); } @@ -1117,8 +1060,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon gctx = (GLGlueContext *)ctx; - if (tstate == NULL) - { + if (tstate == NULL) { AST(init_new_thread_state() == 1); GET_MY_TSTATE(tstate, get_current_thread_state()); @@ -1126,21 +1068,18 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon } // Special path for context deletion - if (ctx == EGL_NO_CONTEXT) - { + if (ctx == EGL_NO_CONTEXT) { AST(gctx == NULL); - if (tstate->cstate != NULL) - { - if (_bind_context_state(NULL, tstate->cstate, &ctx_list_access_mutex) != 1) - { + if (tstate->cstate != NULL) { + if (_bind_context_state(NULL, tstate->cstate, &ctx_list_access_mutex) != 1) { COREGL_WRN("\E[40;31;1mError soft-makecurrent for context deletion\E[0m\n"); } tstate->cstate = NULL; } - if (_orig_fastpath_eglMakeCurrent(dpy, draw, read, ctx) != EGL_TRUE) - { - COREGL_WRN("Error making context [%p] current. (invalid EGL display [%p] or EGL surface [D:%p/R:%p])\n", ctx, dpy, draw, read); + if (_orig_fastpath_eglMakeCurrent(dpy, draw, read, ctx) != EGL_TRUE) { + COREGL_WRN("Error making context [%p] current. (invalid EGL display [%p] or EGL surface [D:%p/R:%p])\n", + ctx, dpy, draw, read); ret = EGL_FALSE; goto finish; } @@ -1155,8 +1094,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon AST(gctx != NULL); AST(gctx->cstate != NULL); - if (gctx->rdpy != dpy) - { + if (gctx->rdpy != dpy) { COREGL_WRN("\E[40;31;1mInvalid context (or invalid EGL display)\E[0m\n"); ret = EGL_FALSE; goto finish; @@ -1166,8 +1104,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon AST(gctx->real_ctx_sharable_option != NULL); // Handle cross threading of context (when used by two or more gctx) - if (gctx->thread_id != get_current_thread() && gctx->cstate->ref_count > 1) - { + if (gctx->thread_id != get_current_thread() && gctx->cstate->ref_count > 1) { #define ATTRIB_LIST_BUFFER_SIZE 8 GLContextState *cstate_new = NULL; @@ -1177,15 +1114,16 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon EGLConfig config = NULL; int attrib_list[ATTRIB_LIST_BUFFER_SIZE]; - AST(_unpack_egl_context_option(gctx->real_ctx_option, &dpy, &config, NULL, attrib_list, ATTRIB_LIST_BUFFER_SIZE) == 1); + AST(_unpack_egl_context_option(gctx->real_ctx_option, &dpy, &config, NULL, + attrib_list, ATTRIB_LIST_BUFFER_SIZE) == 1); AST(dpy == gctx->rdpy); - _egl_create_context(gctx->real_ctx_option, &cstate_new, &new_real_ctx, dpy, config, attrib_list); + _egl_create_context(gctx->real_ctx_option, &cstate_new, &new_real_ctx, dpy, + config, attrib_list); AST(cstate_new != NULL); - if (_bind_context_state(gctx, cstate_new, &ctx_list_access_mutex) != 1) - { + if (_bind_context_state(gctx, cstate_new, &ctx_list_access_mutex) != 1) { COREGL_WRN("\E[40;31;1mError soft-makecurrent in Cross-thread usage!\E[0m\n"); free(cstate_new); _orig_fastpath_eglDestroyContext(dpy, new_real_ctx); @@ -1205,8 +1143,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon } // Check if the object is correct - if (gctx->magic != MAGIC_GLFAST) - { + if (gctx->magic != MAGIC_GLFAST) { COREGL_ERR("\E[40;31;1mGlue-CTX Magic Check Failed!!! (Memory broken?)\E[0m\n"); ret = EGL_FALSE; goto finish; @@ -1224,22 +1161,22 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon if (tstate->cstate == NULL || tstate->cstate != gctx->cstate) need_mc = EGL_TRUE; - if (need_mc == EGL_TRUE) - { + if (need_mc == EGL_TRUE) { AST(dpy == gctx->cstate->rdpy); // BB : full makecurrent - if (_orig_fastpath_eglMakeCurrent(dpy, draw, read, gctx->cstate->rctx) != EGL_TRUE) - { + if (_orig_fastpath_eglMakeCurrent(dpy, draw, read, + gctx->cstate->rctx) != EGL_TRUE) { COREGL_WRN("\E[40;31;1mError making context current with the drawable. (Bad match?)\E[0m\n"); ret = EGL_FALSE; goto finish; } // Update references only when the contexts are different - if(tstate->cstate != gctx->cstate) { + if (tstate->cstate != gctx->cstate) { if (tstate->cstate != NULL && tstate->cstate->data != NULL) - _remove_context_ref((GLGlueContext *)tstate->cstate->data, &ctx_list_access_mutex); + _remove_context_ref((GLGlueContext *)tstate->cstate->data, + &ctx_list_access_mutex); tstate->cstate = gctx->cstate; @@ -1252,18 +1189,15 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon } // Initialize context states - if (gctx->initialized == 0) - { - if (fastpath_init_context_states(gctx) != 1) - { + if (gctx->initialized == 0) { + if (fastpath_init_context_states(gctx) != 1) { COREGL_ERR("\E[40;31;1mError intializing context. (Check driver specification)\E[0m\n"); goto finish; } } // Setup initial Viewport & Scissor - if (gctx->surface_attached == 0 && draw != EGL_NO_SURFACE) - { + if (gctx->surface_attached == 0 && draw != EGL_NO_SURFACE) { EGLint box_buffer[4]; EGLint width = 0; EGLint height = 0; @@ -1291,8 +1225,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLCon gctx->surface_attached = 1; } - if (_bind_context_state(gctx, tstate->cstate, &ctx_list_access_mutex) != 1) - { + if (_bind_context_state(gctx, tstate->cstate, &ctx_list_access_mutex) != 1) { ret = EGL_FALSE; goto finish; } @@ -1306,10 +1239,10 @@ finish: _COREGL_FASTPATH_FUNC_END(); #ifdef COREGL_FASTPATH_TRACE_CONTEXT_INFO - if (unlikely(trace_ctx_flag == 1)) - { + if (unlikely(trace_ctx_flag == 1)) { char ment[256]; - sprintf(ment, "eglMakeCurrent finished (GlueCTX=[%12p] Surf=[D:%12p R:%12p])", ctx, draw, read); + sprintf(ment, "eglMakeCurrent finished (GlueCTX=[%12p] Surf=[D:%12p R:%12p])", + ctx, draw, read); _dump_context_info(ment, 0); } #endif // COREGL_FASTPATH_TRACE_CONTEXT_INFO @@ -1327,17 +1260,14 @@ fastpath_eglGetCurrentContext(void) GET_MY_TSTATE(tstate, get_current_thread_state()); // Special eject condition for binding API - if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) { return _orig_fastpath_eglGetCurrentContext(); } _COREGL_FASTPATH_FUNC_BEGIN(); - if (tstate != NULL) - { - if (tstate->cstate != NULL) - { + if (tstate != NULL) { + if (tstate->cstate != NULL) { ret = (GLGlueContext *)tstate->cstate->data; AST(ret->magic == MAGIC_GLFAST); } @@ -1359,23 +1289,20 @@ fastpath_eglGetCurrentSurface(EGLint readdraw) GET_MY_TSTATE(tstate, get_current_thread_state()); // Special eject condition for binding API - if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) - { + if (tstate != NULL && tstate->binded_api != EGL_OPENGL_ES_API) { return _orig_fastpath_eglGetCurrentSurface(readdraw); } _COREGL_FASTPATH_FUNC_BEGIN(); - if (tstate != NULL) - { - switch (readdraw) - { - case EGL_DRAW : - ret = (GLGlueContext *)tstate->rsurf_draw; - break; - case EGL_READ : - ret = (GLGlueContext *)tstate->rsurf_read; - break; + if (tstate != NULL) { + switch (readdraw) { + case EGL_DRAW : + ret = (GLGlueContext *)tstate->rsurf_draw; + break; + case EGL_READ : + ret = (GLGlueContext *)tstate->rsurf_read; + break; } } goto finish; @@ -1386,7 +1313,8 @@ finish: } EGLImageKHR -fastpath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list) +fastpath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, + EGLClientBuffer buffer, const EGLint *attrib_list) { void *ret = NULL; EGLContext real_ctx = EGL_NO_CONTEXT; @@ -1394,49 +1322,45 @@ fastpath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLC _COREGL_FASTPATH_FUNC_BEGIN(); - if (ctx != NULL && ctx != EGL_NO_CONTEXT) - { + if (ctx != NULL && ctx != EGL_NO_CONTEXT) { GLGlueContext *gctx = (GLGlueContext *)ctx; - if (gctx->magic != MAGIC_GLFAST) - { + if (gctx->magic != MAGIC_GLFAST) { real_ctx = ctx; - } - else - { + } else { AST(gctx->cstate != NULL); real_ctx = gctx->cstate->rctx; } - switch(target) - { - case EGL_GL_TEXTURE_2D_KHR: - case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR: - case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR: - case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR: - case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR: - case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR: - case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR: - case EGL_GL_TEXTURE_3D_KHR: - case EGL_GL_RENDERBUFFER_KHR: - if((GLuint )buffer == 0) - { - COREGL_ERR("\E[40;31;1m fastpath_eglCreateImageKHR buffer object NULL \E[0m\n"); - real_obj = 0; - } else { - real_obj = fastpath_ostate_get_object(&gctx->ostate, GL_OBJECT_TYPE_TEXTURE, (GLuint )buffer); - } - break; - default: - COREGL_ERR("\E[40;31;1mError Not supported target NULL client buffer\E[0m\n"); - goto finish; + switch (target) { + case EGL_GL_TEXTURE_2D_KHR: + case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR: + case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR: + case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR: + case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR: + case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR: + case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR: + case EGL_GL_TEXTURE_3D_KHR: + case EGL_GL_RENDERBUFFER_KHR: + if ((GLuint )buffer == 0) { + COREGL_ERR("\E[40;31;1m fastpath_eglCreateImageKHR buffer object NULL \E[0m\n"); + real_obj = 0; + } else { + real_obj = fastpath_ostate_get_object(&gctx->ostate, GL_OBJECT_TYPE_TEXTURE, + (GLuint )buffer); + } + break; + default: + COREGL_ERR("\E[40;31;1mError Not supported target NULL client buffer\E[0m\n"); + goto finish; } } else { real_obj = (GLuint )buffer; } - ret = _orig_fastpath_eglCreateImageKHR(dpy, real_ctx, target, (EGLClientBuffer)real_obj, attrib_list); + ret = _orig_fastpath_eglCreateImageKHR(dpy, real_ctx, target, + (EGLClientBuffer)real_obj, attrib_list); goto finish; @@ -1447,7 +1371,7 @@ finish: } _eng_fn -fastpath_eglGetProcAddress(const char* procname) +fastpath_eglGetProcAddress(const char *procname) { _eng_fn ret = NULL; @@ -1479,8 +1403,7 @@ fastpath_eglGetProcAddress(const char* procname) #undef _COREGL_EXT_SYMBOL_ALIAS ret = _orig_fastpath_eglGetProcAddress(procname); - if (ret != NULL) - { + if (ret != NULL) { #define _COREGL_EXT_SYMBOL_FASTPATH_PASS(FUNC_NAME) \ if (strcmp(procname, #FUNC_NAME) == 0) \ @@ -1498,7 +1421,8 @@ fastpath_eglGetProcAddress(const char* procname) #undef _COREGL_EXT_SYMBOL_FASTPATH_PASS #undef _COREGL_EXT_SYMBOL_FASTPATH_BLOCK - COREGL_ERR("\E[40;31;1mFASTPATH can't support '%s' (will be terminated with Illegal instruction!)\E[0m\n", procname); + COREGL_ERR("\E[40;31;1mFASTPATH can't support '%s' (will be terminated with Illegal instruction!)\E[0m\n", + procname); assert(0); } @@ -1520,10 +1444,8 @@ fastpath_eglTerminate(EGLDisplay dpy) AST(mutex_lock(&ctx_list_access_mutex) == 1); current = gctx_list; - while (current != NULL) - { - if (current->gctx->cstate->rdpy == dpy) - { + while (current != NULL) { + if (current->gctx->cstate->rdpy == dpy) { GLGlueContext_List *rm_newitm = NULL; rm_newitm = (GLGlueContext_List *)calloc(1, sizeof(GLGlueContext_List)); rm_newitm->gctx = current->gctx; @@ -1536,8 +1458,7 @@ fastpath_eglTerminate(EGLDisplay dpy) AST(mutex_unlock(&ctx_list_access_mutex) == 1); current = remove_list; - while (current != NULL) - { + while (current != NULL) { fastpath_eglDestroyContext(dpy, current->gctx); remove_list = current->next; free(current); diff --git a/src/modules/fastpath/coregl_fastpath_gl.c b/src/modules/fastpath/coregl_fastpath_gl.c index 887dcec..9044bf5 100644 --- a/src/modules/fastpath/coregl_fastpath_gl.c +++ b/src/modules/fastpath/coregl_fastpath_gl.c @@ -46,14 +46,12 @@ _get_glue_obj(¤t_ctx->ostate, type, real_handle, glue_handle) static inline int -_get_real_obj(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_handle, GLuint *real_handle) +_get_real_obj(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_handle, + GLuint *real_handle) { - if (glue_handle == 0) - { + if (glue_handle == 0) { *real_handle = 0; - } - else - { + } else { AST(ostate != NULL); *real_handle = fastpath_ostate_get_object(ostate, type, glue_handle); if (*real_handle == 0) @@ -63,14 +61,12 @@ _get_real_obj(GL_Object_State *ostate, GL_Object_Type type, GLuint glue_handle, } static inline int -_get_glue_obj(GL_Object_State *ostate, GL_Object_Type type, GLuint real_handle, GLuint *glue_handle) +_get_glue_obj(GL_Object_State *ostate, GL_Object_Type type, GLuint real_handle, + GLuint *glue_handle) { - if (real_handle == 0) - { + if (real_handle == 0) { *glue_handle = 0; - } - else - { + } else { AST(ostate != NULL); *glue_handle = fastpath_ostate_find_object(ostate, type, real_handle); if (*glue_handle == 0) @@ -88,8 +84,7 @@ _get_gl_error() glerror = _orig_fastpath_glGetError(); - if (current_ctx->gl_error == GL_NO_ERROR && glerror != GL_NO_ERROR) - { + if (current_ctx->gl_error == GL_NO_ERROR && glerror != GL_NO_ERROR) { current_ctx->gl_error = glerror; } goto finish; @@ -106,8 +101,7 @@ _set_gl_error(GLenum error) _get_gl_error(); - if (current_ctx->gl_error == GL_NO_ERROR && error != GL_NO_ERROR) - { + if (current_ctx->gl_error == GL_NO_ERROR && error != GL_NO_ERROR) { current_ctx->gl_error = error; } goto finish; @@ -116,15 +110,15 @@ finish: return; } -typedef struct -{ +typedef struct { GLsizei shader_count; GLuint shaders[10]; GLuint is_deleting; } Program_object_attached_tag; GLuint -_create_program_object(GL_Object_State *ostate, int is_program, GLenum shader_type) +_create_program_object(GL_Object_State *ostate, int is_program, + GLenum shader_type) { GLuint ret = 0; GLuint real_obj = 0; @@ -134,24 +128,22 @@ _create_program_object(GL_Object_State *ostate, int is_program, GLenum shader_ty else real_obj = _orig_fastpath_glCreateShader(shader_type); - if (real_obj != 0) - { + if (real_obj != 0) { ret = fastpath_ostate_create_object(ostate, GL_OBJECT_TYPE_PROGRAM, real_obj); Program_object_attached_tag *poat = NULL; - if (ret != _COREGL_INT_INIT_VALUE) - { - poat = (Program_object_attached_tag *)calloc(1, sizeof(Program_object_attached_tag)); - if (poat == NULL) - { - AST(poat != NULL); - fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, ret); - } - poat->is_deleting = 0; - poat->shader_count = 0; + if (ret != _COREGL_INT_INIT_VALUE) { + poat = (Program_object_attached_tag *)calloc(1, + sizeof(Program_object_attached_tag)); + if (poat == NULL) { + AST(poat != NULL); + fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, ret); + } + poat->is_deleting = 0; + poat->shader_count = 0; - fastpath_ostate_set_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, ret, poat); - } + fastpath_ostate_set_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, ret, poat); + } } return ret; @@ -163,20 +155,22 @@ _update_program_attach_info(GL_Object_State *ostate, GLuint program) Program_object_attached_tag *poat = NULL; GLuint real_program = _COREGL_INT_INIT_VALUE; - poat = (Program_object_attached_tag *)fastpath_ostate_get_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, program); + poat = (Program_object_attached_tag *)fastpath_ostate_get_object_tag(ostate, + GL_OBJECT_TYPE_PROGRAM, program); AST(poat != NULL); - real_program = fastpath_ostate_get_object(ostate, GL_OBJECT_TYPE_PROGRAM, program); + real_program = fastpath_ostate_get_object(ostate, GL_OBJECT_TYPE_PROGRAM, + program); AST(real_program > 0); - _orig_fastpath_glGetAttachedShaders(real_program, 10, &poat->shader_count, poat->shaders); + _orig_fastpath_glGetAttachedShaders(real_program, 10, &poat->shader_count, + poat->shaders); } static void _attach_program_object(GL_Object_State *ostate, GLuint object) { - if (object != 0) - { + if (object != 0) { fastpath_ostate_use_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); } } @@ -185,48 +179,45 @@ static int _is_deleted_program_object(GL_Object_State *ostate, GLuint glue_object) { Program_object_attached_tag *poat = NULL; - poat = (Program_object_attached_tag *)fastpath_ostate_get_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, glue_object); + poat = (Program_object_attached_tag *)fastpath_ostate_get_object_tag(ostate, + GL_OBJECT_TYPE_PROGRAM, glue_object); AST(poat != NULL); return poat->is_deleting; } static void -_detach_program_object(GL_Object_State *ostate, GLuint real_object, int is_program, int is_deleting) +_detach_program_object(GL_Object_State *ostate, GLuint real_object, + int is_program, int is_deleting) { - if (real_object != 0) - { + if (real_object != 0) { GLuint object = _COREGL_INT_INIT_VALUE; Program_object_attached_tag *poat = NULL; - object = fastpath_ostate_find_object(ostate, GL_OBJECT_TYPE_PROGRAM, real_object); + object = fastpath_ostate_find_object(ostate, GL_OBJECT_TYPE_PROGRAM, + real_object); AST(object != 0); - poat = (Program_object_attached_tag *)fastpath_ostate_get_object_tag(ostate, GL_OBJECT_TYPE_PROGRAM, object); + poat = (Program_object_attached_tag *)fastpath_ostate_get_object_tag(ostate, + GL_OBJECT_TYPE_PROGRAM, object); AST(poat != NULL); - if (is_deleting == 1) - { - if (poat->is_deleting == 0) - { + if (is_deleting == 1) { + if (poat->is_deleting == 0) { poat->is_deleting = 1; - /* Ref count increased when glCreateProgram/initial attach */ + /* Ref count increased when glCreateProgram/initial attach */ + fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); + /* Ref count increased when glCreateProgram/create object */ + /* So, we have to call the under function twice.*/ fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); - /* Ref count increased when glCreateProgram/create object */ - /* So, we have to call the under function twice.*/ - fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); } - } - else - { + } else { fastpath_ostate_remove_object(ostate, GL_OBJECT_TYPE_PROGRAM, object); } - if (fastpath_ostate_get_object(ostate, GL_OBJECT_TYPE_PROGRAM, object) == 0) - { + if (fastpath_ostate_get_object(ostate, GL_OBJECT_TYPE_PROGRAM, object) == 0) { // Is completely removed. De-referencing attached shader objects int i; - for (i = 0; i < poat->shader_count; i++) - { + for (i = 0; i < poat->shader_count; i++) { AST(is_program == 1); _detach_program_object(ostate, poat->shaders[i], 0, 0); } @@ -247,8 +238,7 @@ void fastpath_release_gl_context(GLGlueContext *gctx) { // Release program - if (gctx->gl_current_program[0] != 0) - { + if (gctx->gl_current_program[0] != 0) { _detach_program_object(&gctx->ostate, gctx->gl_current_program[0], 1, 0); gctx->gl_current_program[0] = 0; } @@ -263,22 +253,17 @@ _get_gl_version() int vlen = _COREGL_INT_INIT_VALUE; int i = _COREGL_INT_INIT_VALUE; char vret_tmp[80 + 1] = { 0 }; - IF_GL_SUCCESS(vret = (const char *)_orig_fastpath_glGetString(GL_VERSION)) - { + IF_GL_SUCCESS(vret = (const char *)_orig_fastpath_glGetString(GL_VERSION)) { vlen = (int)strlen(vret); - if (!strncmp(vret, "OpenGL ES", 9) && vlen >= 11) - { + if (!strncmp(vret, "OpenGL ES", 9) && vlen >= 11) { int stp = 10; - if (vret[9] == '-') - { + if (vret[9] == '-') { if (vlen < 14) return 0.0f; stp = 13; } - for (i = stp; ; i++) - { - if (vret[i] == ' ' || vret[i] == 0x00 || i >= 80) - { + for (i = stp; ; i++) { + if (vret[i] == ' ' || vret[i] == 0x00 || i >= 80) { strncpy(vret_tmp, &vret[stp], i - stp); vret_tmp[i - stp] = 0x00; break; @@ -306,21 +291,16 @@ _valid_extension_string() AST(mutex_lock(&extension_check_mutex) == 1); - if (gl_extension_count == 0) - { - IF_GL_SUCCESS(res = (const char *)_orig_fastpath_glGetString(GL_EXTENSIONS)) - { - if (string_extensions[0] == 0x00) - { + if (gl_extension_count == 0) { + IF_GL_SUCCESS(res = (const char *)_orig_fastpath_glGetString(GL_EXTENSIONS)) { + if (string_extensions[0] == 0x00) { double GLver = _get_gl_version(); strcpy(string_tmpbuf, res); char *fstr = &string_tmpbuf[0], *estr = NULL; - for (estr = fstr; ; estr++) - { + for (estr = fstr; ; estr++) { if (*estr == 0x00) break; - if (*estr == ' ') - { + if (*estr == ' ') { *estr = 0x00; #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) @@ -358,14 +338,11 @@ fastpath_glGetError(void) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (current_ctx->gl_error != GL_NO_ERROR) - { + if (current_ctx->gl_error != GL_NO_ERROR) { ret = current_ctx->gl_error; current_ctx->gl_error = GL_NO_ERROR; _orig_fastpath_glGetError(); - } - else - { + } else { ret = _orig_fastpath_glGetError(); } goto finish; @@ -387,37 +364,33 @@ fastpath_glGetString(GLenum name) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - switch (name) - { - case GL_VERSION: - IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetString(name)) - { - double GLver = _get_gl_version(); - if (GLver > 3.1) - { - COREGL_WRN("\E[40;31;1mFastpath can't support %s (Fixed to %s)\E[0m\n", ret, string_gles30); - ret = string_gles30; - } - if (GLver < 2.0) - { - COREGL_WRN("\E[40;31;1mFastpath can't support %s (Fixed to %s)\E[0m\n", ret, string_gles20); - ret = string_gles20; - } + switch (name) { + case GL_VERSION: + IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetString(name)) { + double GLver = _get_gl_version(); + if (GLver > 3.1) { + COREGL_WRN("\E[40;31;1mFastpath can't support %s (Fixed to %s)\E[0m\n", ret, + string_gles30); + ret = string_gles30; } - break; - case GL_EXTENSIONS: - _valid_extension_string(); - ret = string_extensions; - break; - default: - IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetString(name)) - { - } - else - { - ret = NULL; + if (GLver < 2.0) { + COREGL_WRN("\E[40;31;1mFastpath can't support %s (Fixed to %s)\E[0m\n", ret, + string_gles20); + ret = string_gles20; } - break; + } + break; + case GL_EXTENSIONS: + _valid_extension_string(); + ret = string_extensions; + break; + default: + IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetString(name)) { + } + else { + ret = NULL; + } + break; } goto finish; @@ -436,10 +409,8 @@ fastpath_glActiveTexture(GLenum texture) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_active_texture, texture) - { - IF_GL_SUCCESS(_orig_fastpath_glActiveTexture(texture)) - { + CURR_STATE_COMPARE(gl_active_texture, texture) { + IF_GL_SUCCESS(_orig_fastpath_glActiveTexture(texture)) { current_ctx->_tex_flag1 |= _TEX_FLAG1_BIT_gl_active_texture; current_ctx->gl_active_texture[0] = texture; } @@ -452,7 +423,7 @@ finish: void -fastpath_glGenTextures(GLsizei n, GLuint* textures) +fastpath_glGenTextures(GLsizei n, GLuint *textures) { int i; GLuint *objid_array = NULL; @@ -461,8 +432,7 @@ fastpath_glGenTextures(GLsizei n, GLuint* textures) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -473,19 +443,17 @@ fastpath_glGenTextures(GLsizei n, GLuint* textures) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenTextures(n, objid_array)) - { - for (i = 0; i < n; i++) - { - textures[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TEXTURE, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenTextures(n, objid_array)) { + for (i = 0; i < n; i++) { + textures[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_TEXTURE, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -505,8 +473,7 @@ fastpath_glBindTexture(GLenum target, GLuint texture) active_idx = current_ctx->gl_active_texture[0] - GL_TEXTURE0; - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } @@ -522,26 +489,25 @@ fastpath_glBindTexture(GLenum target, GLuint texture) } \ } - switch (target) - { - case GL_TEXTURE_2D: - STATE_PROC(gl_tex_2d_state, _tex_flag1, _TEX_FLAG1_BIT); - break; - case GL_TEXTURE_3D: - STATE_PROC_WITH_CHECK(gl_tex_3d_state, _tex_flag1, _TEX_FLAG1_BIT); - break; - case GL_TEXTURE_2D_ARRAY: - STATE_PROC_WITH_CHECK(gl_tex_2d_array_state, _tex_flag1, _TEX_FLAG1_BIT); - break; - case GL_TEXTURE_CUBE_MAP: - STATE_PROC(gl_tex_cube_state, _tex_flag1, _TEX_FLAG1_BIT); - break; - case GL_TEXTURE_EXTERNAL_OES: - STATE_PROC(gl_tex_external_oes_state, _tex_flag1, _TEX_FLAG1_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (target) { + case GL_TEXTURE_2D: + STATE_PROC(gl_tex_2d_state, _tex_flag1, _TEX_FLAG1_BIT); + break; + case GL_TEXTURE_3D: + STATE_PROC_WITH_CHECK(gl_tex_3d_state, _tex_flag1, _TEX_FLAG1_BIT); + break; + case GL_TEXTURE_2D_ARRAY: + STATE_PROC_WITH_CHECK(gl_tex_2d_array_state, _tex_flag1, _TEX_FLAG1_BIT); + break; + case GL_TEXTURE_CUBE_MAP: + STATE_PROC(gl_tex_cube_state, _tex_flag1, _TEX_FLAG1_BIT); + break; + case GL_TEXTURE_EXTERNAL_OES: + STATE_PROC(gl_tex_external_oes_state, _tex_flag1, _TEX_FLAG1_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } @@ -555,7 +521,8 @@ finish: void -fastpath_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +fastpath_glFramebufferTexture2D(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level) { GLuint real_obj; @@ -563,13 +530,13 @@ fastpath_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarg _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferTexture2D(target, attachment, textarget, real_obj, level); + _orig_fastpath_glFramebufferTexture2D(target, attachment, textarget, real_obj, + level); goto finish; @@ -579,7 +546,8 @@ finish: void -fastpath_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) +fastpath_glFramebufferTexture3DOES(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, GLint zoffset) { GLuint real_obj; @@ -587,13 +555,13 @@ fastpath_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum text _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferTexture3DOES(target, attachment, textarget, real_obj, level, zoffset); + _orig_fastpath_glFramebufferTexture3DOES(target, attachment, textarget, + real_obj, level, zoffset); goto finish; @@ -603,7 +571,8 @@ finish: void -fastpath_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) +fastpath_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, GLsizei samples) { GLuint real_obj; @@ -611,13 +580,13 @@ fastpath_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, real_obj, level, samples); + _orig_fastpath_glFramebufferTexture2DMultisampleEXT(target, attachment, + textarget, real_obj, level, samples); goto finish; @@ -627,7 +596,8 @@ finish: void -fastpath_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params) +fastpath_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, + GLenum pname, GLint *params) { GLint real_obj, fa_type; @@ -635,33 +605,33 @@ fastpath_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - params[0] = 0; - _orig_fastpath_glGetFramebufferAttachmentParameteriv(target, attachment, pname, &real_obj); - _orig_fastpath_glGetFramebufferAttachmentParameteriv(target, attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); - switch (fa_type) - { - case GL_TEXTURE: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) - { - params[0] = 0; - goto finish; - } - break; - case GL_RENDERBUFFER: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)params) != 1) - { - params[0] = 0; - goto finish; - } - break; + switch (pname) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + params[0] = 0; + _orig_fastpath_glGetFramebufferAttachmentParameteriv(target, attachment, pname, + &real_obj); + _orig_fastpath_glGetFramebufferAttachmentParameteriv(target, attachment, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); + switch (fa_type) { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) { + params[0] = 0; + goto finish; } break; - default: - _orig_fastpath_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, + (GLuint *)params) != 1) { + params[0] = 0; + goto finish; + } break; + } + break; + default: + _orig_fastpath_glGetFramebufferAttachmentParameteriv(target, attachment, pname, + params); + break; } goto finish; @@ -681,8 +651,7 @@ fastpath_glIsTexture(GLuint texture) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -698,7 +667,7 @@ finish: void -fastpath_glDeleteTextures(GLsizei n, const GLuint* textures) +fastpath_glDeleteTextures(GLsizei n, const GLuint *textures) { int i, j; GLuint *objid_array = NULL; @@ -707,8 +676,7 @@ fastpath_glDeleteTextures(GLsizei n, const GLuint* textures) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -721,31 +689,28 @@ fastpath_glDeleteTextures(GLsizei n, const GLuint* textures) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (textures[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TEXTURE, textures[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_TEXTURE, textures[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TEXTURE, textures[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TEXTURE, + textures[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteTextures(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteTextures(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - for (j = 0; j < cur_gctx->gl_num_tex_units[0]; j++) - { + for (j = 0; j < cur_gctx->gl_num_tex_units[0]; j++) { if (cur_gctx->gl_tex_2d_state[j] == objid_array[i]) cur_gctx->gl_tex_2d_state[j] = 0; if (cur_gctx->gl_tex_3d_state[j] == objid_array[i]) @@ -767,8 +732,7 @@ fastpath_glDeleteTextures(GLsizei n, const GLuint* textures) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -778,7 +742,7 @@ finish: //////////////////////////////////////////////////////////////////////// void -fastpath_glGenBuffers(GLsizei n, GLuint* buffers) +fastpath_glGenBuffers(GLsizei n, GLuint *buffers) { int i; GLuint *objid_array = NULL; @@ -787,8 +751,7 @@ fastpath_glGenBuffers(GLsizei n, GLuint* buffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -799,19 +762,17 @@ fastpath_glGenBuffers(GLsizei n, GLuint* buffers) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenBuffers(n, objid_array)) - { - for (i = 0; i < n; i++) - { - buffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_BUFFER, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenBuffers(n, objid_array)) { + for (i = 0; i < n; i++) { + buffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_BUFFER, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -828,8 +789,7 @@ fastpath_glBindBuffer(GLenum target, GLuint buffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } @@ -850,35 +810,39 @@ fastpath_glBindBuffer(GLenum target, GLuint buffer) } - switch (target) - { - case GL_ARRAY_BUFFER: - STATE_PROC(gl_array_buffer_binding, _bind_flag1, _BIND_FLAG1_BIT); - break; - case GL_COPY_READ_BUFFER: - STATE_PROC_WITH_CHECK(gl_copy_read_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - case GL_COPY_WRITE_BUFFER: - STATE_PROC_WITH_CHECK(gl_copy_write_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - case GL_ELEMENT_ARRAY_BUFFER: - STATE_PROC(gl_element_array_buffer_binding, _bind_flag1, _BIND_FLAG1_BIT); - break; - case GL_PIXEL_PACK_BUFFER: - STATE_PROC_WITH_CHECK(gl_pixel_pack_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - case GL_PIXEL_UNPACK_BUFFER: - STATE_PROC_WITH_CHECK(gl_pixel_unpack_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - case GL_TRANSFORM_FEEDBACK_BUFFER: - STATE_PROC_WITH_CHECK(gl_transform_feedback_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - case GL_UNIFORM_BUFFER: - STATE_PROC_WITH_CHECK(gl_uniform_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (target) { + case GL_ARRAY_BUFFER: + STATE_PROC(gl_array_buffer_binding, _bind_flag1, _BIND_FLAG1_BIT); + break; + case GL_COPY_READ_BUFFER: + STATE_PROC_WITH_CHECK(gl_copy_read_buffer_binding, _bind_flag2, + _BIND_FLAG2_BIT); + break; + case GL_COPY_WRITE_BUFFER: + STATE_PROC_WITH_CHECK(gl_copy_write_buffer_binding, _bind_flag2, + _BIND_FLAG2_BIT); + break; + case GL_ELEMENT_ARRAY_BUFFER: + STATE_PROC(gl_element_array_buffer_binding, _bind_flag1, _BIND_FLAG1_BIT); + break; + case GL_PIXEL_PACK_BUFFER: + STATE_PROC_WITH_CHECK(gl_pixel_pack_buffer_binding, _bind_flag2, + _BIND_FLAG2_BIT); + break; + case GL_PIXEL_UNPACK_BUFFER: + STATE_PROC_WITH_CHECK(gl_pixel_unpack_buffer_binding, _bind_flag2, + _BIND_FLAG2_BIT); + break; + case GL_TRANSFORM_FEEDBACK_BUFFER: + STATE_PROC_WITH_CHECK(gl_transform_feedback_buffer_binding, _bind_flag2, + _BIND_FLAG2_BIT); + break; + case GL_UNIFORM_BUFFER: + STATE_PROC_WITH_CHECK(gl_uniform_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } @@ -901,8 +865,7 @@ fastpath_glIsBuffer(GLuint buffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -918,7 +881,7 @@ finish: void -fastpath_glDeleteBuffers(GLsizei n, const GLuint* buffers) +fastpath_glDeleteBuffers(GLsizei n, const GLuint *buffers) { int i; GLuint *objid_array = NULL; @@ -927,8 +890,7 @@ fastpath_glDeleteBuffers(GLsizei n, const GLuint* buffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -941,66 +903,57 @@ fastpath_glDeleteBuffers(GLsizei n, const GLuint* buffers) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (buffers[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_BUFFER, buffers[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_BUFFER, buffers[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_BUFFER, buffers[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_BUFFER, + buffers[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteBuffers(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteBuffers(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->gl_array_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_array_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_array_buffer_binding); cur_gctx->gl_array_buffer_binding[0] = 0; } - if (cur_gctx->gl_copy_read_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_copy_read_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag2 &= (~_BIND_FLAG2_BIT_gl_copy_read_buffer_binding); cur_gctx->gl_copy_read_buffer_binding[0] = 0; } - if (cur_gctx->gl_copy_write_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_copy_write_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag2 &= (~_BIND_FLAG2_BIT_gl_copy_write_buffer_binding); cur_gctx->gl_copy_write_buffer_binding[0] = 0; } - if (cur_gctx->gl_element_array_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_element_array_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_element_array_buffer_binding); cur_gctx->gl_element_array_buffer_binding[0] = 0; } - if (cur_gctx->gl_pixel_pack_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_pixel_pack_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag2 &= (~_BIND_FLAG2_BIT_gl_pixel_pack_buffer_binding); cur_gctx->gl_pixel_pack_buffer_binding[0] = 0; } - if (cur_gctx->gl_pixel_unpack_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_pixel_unpack_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag2 &= (~_BIND_FLAG2_BIT_gl_pixel_unpack_buffer_binding); cur_gctx->gl_pixel_unpack_buffer_binding[0] = 0; } - if (cur_gctx->gl_transform_feedback_buffer_binding[0] == objid_array[i]) - { - cur_gctx->_bind_flag2 &= (~_BIND_FLAG2_BIT_gl_transform_feedback_buffer_binding); + if (cur_gctx->gl_transform_feedback_buffer_binding[0] == objid_array[i]) { + cur_gctx->_bind_flag2 &= + (~_BIND_FLAG2_BIT_gl_transform_feedback_buffer_binding); cur_gctx->gl_transform_feedback_buffer_binding[0] = 0; } - if (cur_gctx->gl_uniform_buffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_uniform_buffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag2 &= (~_BIND_FLAG2_BIT_gl_uniform_buffer_binding); cur_gctx->gl_uniform_buffer_binding[0] = 0; } @@ -1014,8 +967,7 @@ fastpath_glDeleteBuffers(GLsizei n, const GLuint* buffers) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -1025,7 +977,7 @@ finish: ////////////////////////////////////////////////////////////////////////////////// void -fastpath_glGenFramebuffers(GLsizei n, GLuint* framebuffers) +fastpath_glGenFramebuffers(GLsizei n, GLuint *framebuffers) { int i; GLuint *objid_array = NULL; @@ -1034,8 +986,7 @@ fastpath_glGenFramebuffers(GLsizei n, GLuint* framebuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1046,19 +997,17 @@ fastpath_glGenFramebuffers(GLsizei n, GLuint* framebuffers) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenFramebuffers(n, objid_array)) - { - for (i = 0; i < n; i++) - { - framebuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenFramebuffers(n, objid_array)) { + for (i = 0; i < n; i++) { + framebuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -1075,20 +1024,15 @@ fastpath_glBindFramebuffer(GLenum target, GLuint framebuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - if (target == GL_FRAMEBUFFER) - { - if (current_ctx->gl_framebuffer_binding_read_used == 1) - { - CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) - { + if (target == GL_FRAMEBUFFER) { + if (current_ctx->gl_framebuffer_binding_read_used == 1) { + CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); else @@ -1096,10 +1040,8 @@ fastpath_glBindFramebuffer(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_read[0] = real_obj; } } - CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) - { + CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); else @@ -1107,13 +1049,9 @@ fastpath_glBindFramebuffer(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_draw[0] = real_obj; } } - } - else - { - CURR_STATE_COMPARE(gl_framebuffer_binding, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) - { + } else { + CURR_STATE_COMPARE(gl_framebuffer_binding, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding); else @@ -1122,13 +1060,10 @@ fastpath_glBindFramebuffer(GLenum target, GLuint framebuffer) } } } - } - else if (target == GL_READ_FRAMEBUFFER && current_ctx->gl_framebuffer_binding_read_used) - { - CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) - { + } else if (target == GL_READ_FRAMEBUFFER && + current_ctx->gl_framebuffer_binding_read_used) { + CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); else @@ -1136,13 +1071,10 @@ fastpath_glBindFramebuffer(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_read[0] = real_obj; } } - } - else if (target == GL_DRAW_FRAMEBUFFER && current_ctx->gl_framebuffer_binding_draw_used) - { - CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) - { + } else if (target == GL_DRAW_FRAMEBUFFER && + current_ctx->gl_framebuffer_binding_draw_used) { + CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebuffer(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); else @@ -1150,9 +1082,7 @@ fastpath_glBindFramebuffer(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_draw[0] = real_obj; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -1173,8 +1103,7 @@ fastpath_glIsFramebuffer(GLuint framebuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -1190,7 +1119,7 @@ finish: void -fastpath_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) +fastpath_glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) { int i; GLuint *objid_array = NULL; @@ -1199,8 +1128,7 @@ fastpath_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1213,41 +1141,36 @@ fastpath_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (framebuffers[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteFramebuffers(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteFramebuffers(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->gl_framebuffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_framebuffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding); cur_gctx->gl_framebuffer_binding[0] = 0; } - if (cur_gctx->gl_framebuffer_binding_read[0] == objid_array[i]) - { + if (cur_gctx->gl_framebuffer_binding_read[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); cur_gctx->gl_framebuffer_binding_read[0] = 0; } - if (cur_gctx->gl_framebuffer_binding_draw[0] == objid_array[i]) - { + if (cur_gctx->gl_framebuffer_binding_draw[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); cur_gctx->gl_framebuffer_binding_draw[0] = 0; } @@ -1261,8 +1184,7 @@ fastpath_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -1272,7 +1194,7 @@ finish: ////////////////////////////////////////////////////////////////////////////////// void -fastpath_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) +fastpath_glGenRenderbuffers(GLsizei n, GLuint *renderbuffers) { int i; GLuint *objid_array = NULL; @@ -1281,8 +1203,7 @@ fastpath_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1293,19 +1214,17 @@ fastpath_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenRenderbuffers(n, objid_array)) - { - for (i = 0; i < n; i++) - { - renderbuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenRenderbuffers(n, objid_array)) { + for (i = 0; i < n; i++) { + renderbuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_RENDERBUFFER, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -1322,18 +1241,14 @@ fastpath_glBindRenderbuffer(GLenum target, GLuint renderbuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - if (target == GL_RENDERBUFFER) - { - CURR_STATE_COMPARE(gl_renderbuffer_binding, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindRenderbuffer(target, real_obj)) - { + if (target == GL_RENDERBUFFER) { + CURR_STATE_COMPARE(gl_renderbuffer_binding, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindRenderbuffer(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_renderbuffer_binding); else @@ -1341,9 +1256,7 @@ fastpath_glBindRenderbuffer(GLenum target, GLuint renderbuffer) current_ctx->gl_renderbuffer_binding[0] = real_obj; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -1356,7 +1269,8 @@ finish: void -fastpath_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +fastpath_glFramebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { GLuint real_obj; @@ -1364,13 +1278,13 @@ fastpath_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum rend _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, real_obj); + _orig_fastpath_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, + real_obj); goto finish; @@ -1389,8 +1303,7 @@ fastpath_glIsRenderbuffer(GLuint renderbuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -1406,7 +1319,7 @@ finish: void -fastpath_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) +fastpath_glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) { int i; GLuint *objid_array = NULL; @@ -1415,8 +1328,7 @@ fastpath_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1429,31 +1341,28 @@ fastpath_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (renderbuffers[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteRenderbuffers(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteRenderbuffers(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->gl_renderbuffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_renderbuffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_renderbuffer_binding); cur_gctx->gl_renderbuffer_binding[0] = 0; } @@ -1467,8 +1376,7 @@ fastpath_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -1525,7 +1433,8 @@ finish: void -fastpath_glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) +fastpath_glShaderSource(GLuint shader, GLsizei count, const char **string, + const GLint *length) { GLuint real_obj; @@ -1533,8 +1442,7 @@ fastpath_glShaderSource(GLuint shader, GLsizei count, const char** string, const _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1548,7 +1456,8 @@ finish: void -fastpath_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +fastpath_glShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, + const void *binary, GLsizei length) { int i; GLuint *objid_array = NULL; @@ -1557,8 +1466,7 @@ fastpath_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1569,10 +1477,10 @@ fastpath_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, c objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { if (shaders[i] == 0) continue; - objid_array[i] = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, shaders[i]); + objid_array[i] = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_PROGRAM, shaders[i]); } _orig_fastpath_glShaderBinary(n, objid_array, binaryformat, binary, length); @@ -1580,8 +1488,7 @@ fastpath_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, c goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -1599,8 +1506,7 @@ fastpath_glCompileShader(GLuint shader) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1615,7 +1521,7 @@ finish: void -fastpath_glBindAttribLocation(GLuint program, GLuint index, const char* name) +fastpath_glBindAttribLocation(GLuint program, GLuint index, const char *name) { GLuint real_obj; @@ -1623,8 +1529,7 @@ fastpath_glBindAttribLocation(GLuint program, GLuint index, const char* name) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1649,14 +1554,13 @@ fastpath_glAttachShader(GLuint program, GLuint shader) INIT_FASTPATH_GL_FUNC(); if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj_program) != 1 || - GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj_shader) != 1) - { + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj_shader) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - IF_GL_SUCCESS(_orig_fastpath_glAttachShader(real_obj_program, real_obj_shader)) - { + IF_GL_SUCCESS(_orig_fastpath_glAttachShader(real_obj_program, + real_obj_shader)) { _update_program_attach_info(¤t_ctx->ostate, program); _attach_program_object(¤t_ctx->ostate, shader); } @@ -1679,14 +1583,13 @@ fastpath_glDetachShader(GLuint program, GLuint shader) INIT_FASTPATH_GL_FUNC(); if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj_program) != 1 || - GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj_shader) != 1) - { + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj_shader) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - IF_GL_SUCCESS(_orig_fastpath_glDetachShader(real_obj_program, real_obj_shader)) - { + IF_GL_SUCCESS(_orig_fastpath_glDetachShader(real_obj_program, + real_obj_shader)) { _update_program_attach_info(¤t_ctx->ostate, program); _detach_program_object(¤t_ctx->ostate, real_obj_shader, 0, 0); } @@ -1708,8 +1611,7 @@ fastpath_glIsShader(GLuint shader) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -1734,8 +1636,7 @@ fastpath_glIsProgram(GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -1759,8 +1660,7 @@ fastpath_glLinkProgram(GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1783,8 +1683,7 @@ fastpath_glValidateProgram(GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1807,18 +1706,16 @@ fastpath_glUseProgram(GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - CURR_STATE_COMPARE(gl_current_program, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glUseProgram(real_obj)) - { + CURR_STATE_COMPARE(gl_current_program, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glUseProgram(real_obj)) { _attach_program_object(¤t_ctx->ostate, program); - _detach_program_object(¤t_ctx->ostate, current_ctx->gl_current_program[0], 1, 0); + _detach_program_object(¤t_ctx->ostate, current_ctx->gl_current_program[0], + 1, 0); current_ctx->_clear_flag1 |= _CLEAR_FLAG1_BIT_gl_current_program; current_ctx->gl_current_program[0] = real_obj; @@ -1832,7 +1729,8 @@ finish: void -fastpath_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +fastpath_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { GLuint real_obj; @@ -1840,13 +1738,13 @@ fastpath_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsize _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetActiveAttrib(real_obj, index, bufsize, length, size, type, name); + _orig_fastpath_glGetActiveAttrib(real_obj, index, bufsize, length, size, type, + name); goto finish; @@ -1856,7 +1754,8 @@ finish: void -fastpath_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +fastpath_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { GLuint real_obj; @@ -1864,13 +1763,13 @@ fastpath_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsiz _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetActiveUniform(real_obj, index, bufsize, length, size, type, name); + _orig_fastpath_glGetActiveUniform(real_obj, index, bufsize, length, size, type, + name); goto finish; @@ -1880,7 +1779,8 @@ finish: void -fastpath_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +fastpath_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, + GLuint *shaders) { int i; GLsizei real_count = _COREGL_INT_INIT_VALUE; @@ -1890,18 +1790,17 @@ fastpath_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - IF_GL_SUCCESS(_orig_fastpath_glGetAttachedShaders(real_obj, maxcount, &real_count, shaders)) - { - for (i = 0; i < real_count; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glGetAttachedShaders(real_obj, maxcount, + &real_count, shaders)) { + for (i = 0; i < real_count; i++) { if (shaders[i] != 0) - shaders[i] = fastpath_ostate_find_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, shaders[i]); + shaders[i] = fastpath_ostate_find_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_PROGRAM, shaders[i]); } if (count != NULL) *count = real_count; } @@ -1914,7 +1813,7 @@ finish: int -fastpath_glGetAttribLocation(GLuint program, const char* name) +fastpath_glGetAttribLocation(GLuint program, const char *name) { int ret = _COREGL_INT_INIT_VALUE; GLuint real_obj; @@ -1923,8 +1822,7 @@ fastpath_glGetAttribLocation(GLuint program, const char* name) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1940,7 +1838,7 @@ finish: void -fastpath_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) +fastpath_glGetShaderiv(GLuint shader, GLenum pname, GLint *params) { GLuint real_obj; @@ -1948,22 +1846,20 @@ fastpath_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - switch (pname) - { - case GL_DELETE_STATUS: - *params = GL_FALSE; - if (_is_deleted_program_object(¤t_ctx->ostate, shader) == 1) - *params = GL_TRUE; - break; - default: - _orig_fastpath_glGetShaderiv(real_obj, pname, params); - break; + switch (pname) { + case GL_DELETE_STATUS: + *params = GL_FALSE; + if (_is_deleted_program_object(¤t_ctx->ostate, shader) == 1) + *params = GL_TRUE; + break; + default: + _orig_fastpath_glGetShaderiv(real_obj, pname, params); + break; } goto finish; @@ -1974,7 +1870,8 @@ finish: void -fastpath_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) +fastpath_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, + char *infolog) { GLuint real_obj; @@ -1982,8 +1879,7 @@ fastpath_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, cha _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -1998,7 +1894,7 @@ finish: void -fastpath_glGetProgramiv(GLuint program, GLenum pname, GLint* params) +fastpath_glGetProgramiv(GLuint program, GLenum pname, GLint *params) { GLuint real_obj; @@ -2006,22 +1902,20 @@ fastpath_glGetProgramiv(GLuint program, GLenum pname, GLint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - switch (pname) - { - case GL_DELETE_STATUS: - *params = GL_FALSE; - if (_is_deleted_program_object(¤t_ctx->ostate, program) == 1) - *params = GL_TRUE; - break; - default: - _orig_fastpath_glGetProgramiv(real_obj, pname, params); - break; + switch (pname) { + case GL_DELETE_STATUS: + *params = GL_FALSE; + if (_is_deleted_program_object(¤t_ctx->ostate, program) == 1) + *params = GL_TRUE; + break; + default: + _orig_fastpath_glGetProgramiv(real_obj, pname, params); + break; } goto finish; @@ -2032,7 +1926,8 @@ finish: void -fastpath_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) +fastpath_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, + char *infolog) { GLuint real_obj; @@ -2040,8 +1935,7 @@ fastpath_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2056,7 +1950,8 @@ finish: void -fastpath_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) +fastpath_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, + char *source) { GLuint real_obj; @@ -2064,8 +1959,7 @@ fastpath_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2080,7 +1974,7 @@ finish: void -fastpath_glGetUniformfv(GLuint program, GLint location, GLfloat* params) +fastpath_glGetUniformfv(GLuint program, GLint location, GLfloat *params) { GLuint real_obj; @@ -2088,8 +1982,7 @@ fastpath_glGetUniformfv(GLuint program, GLint location, GLfloat* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2104,7 +1997,7 @@ finish: void -fastpath_glGetUniformiv(GLuint program, GLint location, GLint* params) +fastpath_glGetUniformiv(GLuint program, GLint location, GLint *params) { GLuint real_obj; @@ -2112,8 +2005,7 @@ fastpath_glGetUniformiv(GLuint program, GLint location, GLint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2128,7 +2020,8 @@ finish: void -fastpath_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) +fastpath_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, + GLuint program) { GLuint real_obj; @@ -2136,8 +2029,7 @@ fastpath_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint progra _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2160,8 +2052,7 @@ fastpath_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2184,8 +2075,7 @@ fastpath_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2208,8 +2098,7 @@ fastpath_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2232,8 +2121,7 @@ fastpath_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2248,7 +2136,8 @@ finish: void -fastpath_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) +fastpath_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, + GLint z) { GLuint real_obj; @@ -2256,8 +2145,7 @@ fastpath_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2272,7 +2160,8 @@ finish: void -fastpath_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +fastpath_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, + GLint z, GLint w) { GLuint real_obj; @@ -2280,8 +2169,7 @@ fastpath_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2304,8 +2192,7 @@ fastpath_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2320,7 +2207,8 @@ finish: void -fastpath_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) +fastpath_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, + GLfloat y) { GLuint real_obj; @@ -2328,8 +2216,7 @@ fastpath_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloa _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2344,7 +2231,8 @@ finish: void -fastpath_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +fastpath_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z) { GLuint real_obj; @@ -2352,8 +2240,7 @@ fastpath_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloa _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2368,7 +2255,8 @@ finish: void -fastpath_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +fastpath_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z, GLfloat w) { GLuint real_obj; @@ -2376,8 +2264,7 @@ fastpath_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloa _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2392,7 +2279,8 @@ finish: void -fastpath_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -2400,8 +2288,7 @@ fastpath_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2416,7 +2303,8 @@ finish: void -fastpath_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -2424,8 +2312,7 @@ fastpath_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2440,7 +2327,8 @@ finish: void -fastpath_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -2448,8 +2336,7 @@ fastpath_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2464,7 +2351,8 @@ finish: void -fastpath_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -2472,8 +2360,7 @@ fastpath_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2488,7 +2375,8 @@ finish: void -fastpath_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -2496,8 +2384,7 @@ fastpath_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2512,7 +2399,8 @@ finish: void -fastpath_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -2520,8 +2408,7 @@ fastpath_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2536,7 +2423,8 @@ finish: void -fastpath_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -2544,8 +2432,7 @@ fastpath_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2560,7 +2447,8 @@ finish: void -fastpath_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -2568,8 +2456,7 @@ fastpath_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2584,7 +2471,8 @@ finish: void -fastpath_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -2592,13 +2480,13 @@ fastpath_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei co _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix2fvEXT(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix2fvEXT(real_obj, location, count, + transpose, value); goto finish; @@ -2608,7 +2496,8 @@ finish: void -fastpath_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -2616,13 +2505,13 @@ fastpath_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei co _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix3fvEXT(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix3fvEXT(real_obj, location, count, + transpose, value); goto finish; @@ -2632,7 +2521,8 @@ finish: void -fastpath_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -2640,13 +2530,13 @@ fastpath_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei co _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix4fvEXT(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix4fvEXT(real_obj, location, count, + transpose, value); goto finish; @@ -2656,7 +2546,7 @@ finish: int -fastpath_glGetUniformLocation(GLuint program, const char* name) +fastpath_glGetUniformLocation(GLuint program, const char *name) { int ret = _COREGL_INT_INIT_VALUE; GLuint real_obj; @@ -2665,8 +2555,7 @@ fastpath_glGetUniformLocation(GLuint program, const char* name) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); ret = -1; goto finish; @@ -2690,8 +2579,7 @@ fastpath_glDeleteShader(GLuint shader) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, shader, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2713,8 +2601,7 @@ fastpath_glDeleteProgram(GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -2732,7 +2619,8 @@ finish: ////////////////////////////////////////////////////////////////////////////////// void -fastpath_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +fastpath_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -2741,10 +2629,8 @@ fastpath_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alph if ((current_ctx->gl_blend_color[0] != red) || (current_ctx->gl_blend_color[1] != green) || (current_ctx->gl_blend_color[2] != blue) || - (current_ctx->gl_blend_color[3] != alpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glBlendColor(red, green, blue, alpha)) - { + (current_ctx->gl_blend_color[3] != alpha)) { + IF_GL_SUCCESS(_orig_fastpath_glBlendColor(red, green, blue, alpha)) { current_ctx->_blend_flag |= _BLEND_FLAG_BIT_gl_blend_color; current_ctx->gl_blend_color[0] = red; current_ctx->gl_blend_color[1] = green; @@ -2766,14 +2652,15 @@ fastpath_glBlendEquation(GLenum mode) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glBlendEquation(mode)) - { + IF_GL_SUCCESS(_orig_fastpath_glBlendEquation(mode)) { current_ctx->_blend_flag |= _BLEND_FLAG_BIT_gl_blend_equation_rgb | _BLEND_FLAG_BIT_gl_blend_equation_alpha; - _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint*) & (current_ctx->gl_blend_equation_rgb)); - _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint*) & (current_ctx->gl_blend_equation_alpha)); + _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_RGB, + (GLint *) & (current_ctx->gl_blend_equation_rgb)); + _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, + (GLint *) & (current_ctx->gl_blend_equation_alpha)); } goto finish; @@ -2790,10 +2677,8 @@ fastpath_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_blend_equation_rgb[0] != modeRGB) || - (current_ctx->gl_blend_equation_alpha[0] != modeAlpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glBlendEquationSeparate(modeRGB, modeAlpha)) - { + (current_ctx->gl_blend_equation_alpha[0] != modeAlpha)) { + IF_GL_SUCCESS(_orig_fastpath_glBlendEquationSeparate(modeRGB, modeAlpha)) { current_ctx->_blend_flag |= _BLEND_FLAG_BIT_gl_blend_equation_rgb | _BLEND_FLAG_BIT_gl_blend_equation_alpha; @@ -2816,18 +2701,21 @@ fastpath_glBlendFunc(GLenum sfactor, GLenum dfactor) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glBlendFunc(sfactor, dfactor)) - { + IF_GL_SUCCESS(_orig_fastpath_glBlendFunc(sfactor, dfactor)) { current_ctx->_blend_flag |= _BLEND_FLAG_BIT_gl_blend_src_rgb | _BLEND_FLAG_BIT_gl_blend_src_alpha | _BLEND_FLAG_BIT_gl_blend_dst_rgb | _BLEND_FLAG_BIT_gl_blend_dst_alpha; - _orig_fastpath_glGetIntegerv(GL_BLEND_SRC_RGB, (GLint*) & (current_ctx->gl_blend_src_rgb)); - _orig_fastpath_glGetIntegerv(GL_BLEND_SRC_ALPHA, (GLint*) & (current_ctx->gl_blend_src_alpha)); - _orig_fastpath_glGetIntegerv(GL_BLEND_DST_RGB, (GLint*) & (current_ctx->gl_blend_dst_rgb)); - _orig_fastpath_glGetIntegerv(GL_BLEND_DST_ALPHA, (GLint*) & (current_ctx->gl_blend_dst_alpha)); + _orig_fastpath_glGetIntegerv(GL_BLEND_SRC_RGB, + (GLint *) & (current_ctx->gl_blend_src_rgb)); + _orig_fastpath_glGetIntegerv(GL_BLEND_SRC_ALPHA, + (GLint *) & (current_ctx->gl_blend_src_alpha)); + _orig_fastpath_glGetIntegerv(GL_BLEND_DST_RGB, + (GLint *) & (current_ctx->gl_blend_dst_rgb)); + _orig_fastpath_glGetIntegerv(GL_BLEND_DST_ALPHA, + (GLint *) & (current_ctx->gl_blend_dst_alpha)); } goto finish; @@ -2837,7 +2725,8 @@ finish: void -fastpath_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +fastpath_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -2846,15 +2735,14 @@ fastpath_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLen if ((current_ctx->gl_blend_src_rgb[0] != srcRGB) || (current_ctx->gl_blend_dst_rgb[0] != dstRGB) || (current_ctx->gl_blend_src_alpha[0] != srcAlpha) || - (current_ctx->gl_blend_dst_alpha[0] != dstAlpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha)) - { + (current_ctx->gl_blend_dst_alpha[0] != dstAlpha)) { + IF_GL_SUCCESS(_orig_fastpath_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, + dstAlpha)) { current_ctx->_blend_flag |= - _BLEND_FLAG_BIT_gl_blend_src_rgb | - _BLEND_FLAG_BIT_gl_blend_src_alpha | - _BLEND_FLAG_BIT_gl_blend_dst_rgb | - _BLEND_FLAG_BIT_gl_blend_dst_alpha; + _BLEND_FLAG_BIT_gl_blend_src_rgb | + _BLEND_FLAG_BIT_gl_blend_src_alpha | + _BLEND_FLAG_BIT_gl_blend_dst_rgb | + _BLEND_FLAG_BIT_gl_blend_dst_alpha; current_ctx->gl_blend_src_rgb[0] = srcRGB; current_ctx->gl_blend_dst_rgb[0] = dstRGB; @@ -2870,7 +2758,8 @@ finish: void -fastpath_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +fastpath_glClearColor(GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -2879,10 +2768,8 @@ fastpath_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alph if ((current_ctx->gl_color_clear_value[0] != red) || (current_ctx->gl_color_clear_value[1] != green) || (current_ctx->gl_color_clear_value[2] != blue) || - (current_ctx->gl_color_clear_value[3] != alpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glClearColor(red, green, blue, alpha)) - { + (current_ctx->gl_color_clear_value[3] != alpha)) { + IF_GL_SUCCESS(_orig_fastpath_glClearColor(red, green, blue, alpha)) { current_ctx->_clear_flag1 |= _CLEAR_FLAG1_BIT_gl_color_clear_value; current_ctx->gl_color_clear_value[0] = red; current_ctx->gl_color_clear_value[1] = green; @@ -2904,10 +2791,8 @@ fastpath_glClearDepthf(GLclampf depth) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_depth_clear_value, depth) - { - IF_GL_SUCCESS(_orig_fastpath_glClearDepthf(depth)) - { + CURR_STATE_COMPARE(gl_depth_clear_value, depth) { + IF_GL_SUCCESS(_orig_fastpath_glClearDepthf(depth)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_clear_value; current_ctx->gl_depth_clear_value[0] = depth; } @@ -2926,10 +2811,8 @@ fastpath_glClearStencil(GLint s) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_stencil_clear_value, s) - { - IF_GL_SUCCESS(_orig_fastpath_glClearStencil(s)) - { + CURR_STATE_COMPARE(gl_stencil_clear_value, s) { + IF_GL_SUCCESS(_orig_fastpath_glClearStencil(s)) { current_ctx->_stencil_flag2 |= _STENCIL_FLAG2_BIT_gl_stencil_clear_value; current_ctx->gl_stencil_clear_value[0] = s; } @@ -2942,7 +2825,8 @@ finish: void -fastpath_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +fastpath_glColorMask(GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -2951,10 +2835,8 @@ fastpath_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean a if ((current_ctx->gl_color_writemask[0] != red) || (current_ctx->gl_color_writemask[1] != green) || (current_ctx->gl_color_writemask[2] != blue) || - (current_ctx->gl_color_writemask[3] != alpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glColorMask(red, green, blue, alpha)) - { + (current_ctx->gl_color_writemask[3] != alpha)) { + IF_GL_SUCCESS(_orig_fastpath_glColorMask(red, green, blue, alpha)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_color_writemask; current_ctx->gl_color_writemask[0] = red; current_ctx->gl_color_writemask[1] = green; @@ -2976,10 +2858,8 @@ fastpath_glCullFace(GLenum mode) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_cull_face_mode, mode) - { - IF_GL_SUCCESS(_orig_fastpath_glCullFace(mode)) - { + CURR_STATE_COMPARE(gl_cull_face_mode, mode) { + IF_GL_SUCCESS(_orig_fastpath_glCullFace(mode)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_cull_face_mode; current_ctx->gl_cull_face_mode[0] = mode; } @@ -2998,10 +2878,8 @@ fastpath_glDepthFunc(GLenum func) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_depth_func, func) - { - IF_GL_SUCCESS(_orig_fastpath_glDepthFunc(func)) - { + CURR_STATE_COMPARE(gl_depth_func, func) { + IF_GL_SUCCESS(_orig_fastpath_glDepthFunc(func)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_func; current_ctx->gl_depth_func[0] = func; } @@ -3020,10 +2898,8 @@ fastpath_glDepthMask(GLboolean flag) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_depth_writemask, flag) - { - IF_GL_SUCCESS(_orig_fastpath_glDepthMask(flag)) - { + CURR_STATE_COMPARE(gl_depth_writemask, flag) { + IF_GL_SUCCESS(_orig_fastpath_glDepthMask(flag)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_writemask; current_ctx->gl_depth_writemask[0] = flag; } @@ -3043,10 +2919,8 @@ fastpath_glDepthRangef(GLclampf zNear, GLclampf zFar) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_depth_range[0] != zNear) || - (current_ctx->gl_depth_range[1] != zFar)) - { - IF_GL_SUCCESS(_orig_fastpath_glDepthRangef(zNear, zFar)) - { + (current_ctx->gl_depth_range[1] != zFar)) { + IF_GL_SUCCESS(_orig_fastpath_glDepthRangef(zNear, zFar)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_range; current_ctx->gl_depth_range[0] = zNear; current_ctx->gl_depth_range[1] = zFar; @@ -3075,44 +2949,44 @@ fastpath_glDisable(GLenum cap) } - switch (cap) - { - case GL_BLEND: - STATE_PROC(gl_blend, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_CULL_FACE: - STATE_PROC(gl_cull_face, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_DEPTH_TEST: - STATE_PROC(gl_depth_test, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_DITHER: - STATE_PROC(gl_dither, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_POLYGON_OFFSET_FILL: - STATE_PROC(gl_polygon_offset_fill, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_PRIMITIVE_RESTART_FIXED_INDEX: - STATE_PROC_WITH_CHECK(gl_primitive_restart_fixed_index, _enable_flag3, _ENABLE_FLAG3_BIT); - break; - case GL_RASTERIZER_DISCARD: - STATE_PROC_WITH_CHECK(gl_rasterizer_discard, _enable_flag3, _ENABLE_FLAG3_BIT); - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE: - STATE_PROC(gl_sample_alpha_to_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_SAMPLE_COVERAGE: - STATE_PROC(gl_sample_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_SCISSOR_TEST: - STATE_PROC(gl_scissor_test, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_STENCIL_TEST: - STATE_PROC(gl_stencil_test, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (cap) { + case GL_BLEND: + STATE_PROC(gl_blend, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_CULL_FACE: + STATE_PROC(gl_cull_face, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_DEPTH_TEST: + STATE_PROC(gl_depth_test, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_DITHER: + STATE_PROC(gl_dither, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_POLYGON_OFFSET_FILL: + STATE_PROC(gl_polygon_offset_fill, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_PRIMITIVE_RESTART_FIXED_INDEX: + STATE_PROC_WITH_CHECK(gl_primitive_restart_fixed_index, _enable_flag3, + _ENABLE_FLAG3_BIT); + break; + case GL_RASTERIZER_DISCARD: + STATE_PROC_WITH_CHECK(gl_rasterizer_discard, _enable_flag3, _ENABLE_FLAG3_BIT); + break; + case GL_SAMPLE_ALPHA_TO_COVERAGE: + STATE_PROC(gl_sample_alpha_to_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_SAMPLE_COVERAGE: + STATE_PROC(gl_sample_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_SCISSOR_TEST: + STATE_PROC(gl_scissor_test, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_STENCIL_TEST: + STATE_PROC(gl_stencil_test, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } goto finish; @@ -3133,10 +3007,8 @@ fastpath_glDisableVertexAttribArray(GLuint index) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glDisableVertexAttribArray(index)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glDisableVertexAttribArray(index)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_array; current_ctx->gl_vertex_array_enabled[index] = GL_FALSE; } @@ -3164,44 +3036,44 @@ fastpath_glEnable(GLenum cap) } - switch (cap) - { - case GL_BLEND: - STATE_PROC(gl_blend, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_CULL_FACE: - STATE_PROC(gl_cull_face, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_DEPTH_TEST: - STATE_PROC(gl_depth_test, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_DITHER: - STATE_PROC(gl_dither, _enable_flag1, _ENABLE_FLAG1_BIT); - break; - case GL_POLYGON_OFFSET_FILL: - STATE_PROC(gl_polygon_offset_fill, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_PRIMITIVE_RESTART_FIXED_INDEX: - STATE_PROC_WITH_CHECK(gl_primitive_restart_fixed_index, _enable_flag3, _ENABLE_FLAG3_BIT); - break; - case GL_RASTERIZER_DISCARD: - STATE_PROC_WITH_CHECK(gl_rasterizer_discard, _enable_flag3, _ENABLE_FLAG3_BIT); - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE: - STATE_PROC(gl_sample_alpha_to_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_SAMPLE_COVERAGE: - STATE_PROC(gl_sample_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_SCISSOR_TEST: - STATE_PROC(gl_scissor_test, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - case GL_STENCIL_TEST: - STATE_PROC(gl_stencil_test, _enable_flag2, _ENABLE_FLAG2_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (cap) { + case GL_BLEND: + STATE_PROC(gl_blend, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_CULL_FACE: + STATE_PROC(gl_cull_face, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_DEPTH_TEST: + STATE_PROC(gl_depth_test, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_DITHER: + STATE_PROC(gl_dither, _enable_flag1, _ENABLE_FLAG1_BIT); + break; + case GL_POLYGON_OFFSET_FILL: + STATE_PROC(gl_polygon_offset_fill, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_PRIMITIVE_RESTART_FIXED_INDEX: + STATE_PROC_WITH_CHECK(gl_primitive_restart_fixed_index, _enable_flag3, + _ENABLE_FLAG3_BIT); + break; + case GL_RASTERIZER_DISCARD: + STATE_PROC_WITH_CHECK(gl_rasterizer_discard, _enable_flag3, _ENABLE_FLAG3_BIT); + break; + case GL_SAMPLE_ALPHA_TO_COVERAGE: + STATE_PROC(gl_sample_alpha_to_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_SAMPLE_COVERAGE: + STATE_PROC(gl_sample_coverage, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_SCISSOR_TEST: + STATE_PROC(gl_scissor_test, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + case GL_STENCIL_TEST: + STATE_PROC(gl_stencil_test, _enable_flag2, _ENABLE_FLAG2_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } goto finish; @@ -3220,10 +3092,8 @@ fastpath_glEnableVertexAttribArray(GLuint index) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glEnableVertexAttribArray(index)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glEnableVertexAttribArray(index)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_array; current_ctx->gl_vertex_array_enabled[index] = GL_TRUE; } @@ -3243,10 +3113,8 @@ fastpath_glFrontFace(GLenum mode) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_front_face, mode) - { - IF_GL_SUCCESS(_orig_fastpath_glFrontFace(mode)) - { + CURR_STATE_COMPARE(gl_front_face, mode) { + IF_GL_SUCCESS(_orig_fastpath_glFrontFace(mode)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_front_face; current_ctx->gl_front_face[0] = mode; } @@ -3276,17 +3144,17 @@ fastpath_glHint(GLenum target, GLenum mode) } - switch (target) - { - case GL_FRAGMENT_SHADER_DERIVATIVE_HINT: - STATE_PROC_WITH_CHECK(gl_fragment_shader_derivative_hint, _misc_flag1, _MISC_FLAG1_BIT); - break; - case GL_GENERATE_MIPMAP_HINT: - STATE_PROC(gl_generate_mipmap_hint, _tex_flag1, _TEX_FLAG1_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (target) { + case GL_FRAGMENT_SHADER_DERIVATIVE_HINT: + STATE_PROC_WITH_CHECK(gl_fragment_shader_derivative_hint, _misc_flag1, + _MISC_FLAG1_BIT); + break; + case GL_GENERATE_MIPMAP_HINT: + STATE_PROC(gl_generate_mipmap_hint, _tex_flag1, _TEX_FLAG1_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } goto finish; @@ -3305,10 +3173,8 @@ fastpath_glLineWidth(GLfloat width) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_line_width, width) - { - IF_GL_SUCCESS(_orig_fastpath_glLineWidth(width)) - { + CURR_STATE_COMPARE(gl_line_width, width) { + IF_GL_SUCCESS(_orig_fastpath_glLineWidth(width)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_line_width; current_ctx->gl_line_width[0] = width; } @@ -3338,38 +3204,37 @@ fastpath_glPixelStorei(GLenum pname, GLint param) } - switch (pname) - { - case GL_PACK_ROW_LENGTH: - STATE_PROC_WITH_CHECK(gl_pack_row_length, _pixel_flag1, _PIXEL_FLAG1_BIT); - break; - case GL_PACK_SKIP_PIXELS: - STATE_PROC_WITH_CHECK(gl_pack_skip_pixels, _pixel_flag1, _PIXEL_FLAG1_BIT); - break; - case GL_PACK_SKIP_ROWS: - STATE_PROC_WITH_CHECK(gl_pack_skip_rows, _pixel_flag1, _PIXEL_FLAG1_BIT); - break; - case GL_PACK_ALIGNMENT: - STATE_PROC(gl_pack_alignment, _pixel_flag1, _PIXEL_FLAG1_BIT); - break; - case GL_UNPACK_ROW_LENGTH: - STATE_PROC_WITH_CHECK(gl_unpack_row_length, _pixel_flag2, _PIXEL_FLAG2_BIT); - break; - case GL_UNPACK_IMAGE_HEIGHT: - STATE_PROC_WITH_CHECK(gl_unpack_image_height, _pixel_flag2, _PIXEL_FLAG2_BIT); - break; - case GL_UNPACK_SKIP_PIXELS: - STATE_PROC_WITH_CHECK(gl_unpack_skip_pixels, _pixel_flag2, _PIXEL_FLAG2_BIT); - break; - case GL_UNPACK_SKIP_IMAGES: - STATE_PROC_WITH_CHECK(gl_unpack_skip_images, _pixel_flag2, _PIXEL_FLAG2_BIT); - break; - case GL_UNPACK_ALIGNMENT: - STATE_PROC(gl_unpack_alignment, _pixel_flag2, _PIXEL_FLAG2_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (pname) { + case GL_PACK_ROW_LENGTH: + STATE_PROC_WITH_CHECK(gl_pack_row_length, _pixel_flag1, _PIXEL_FLAG1_BIT); + break; + case GL_PACK_SKIP_PIXELS: + STATE_PROC_WITH_CHECK(gl_pack_skip_pixels, _pixel_flag1, _PIXEL_FLAG1_BIT); + break; + case GL_PACK_SKIP_ROWS: + STATE_PROC_WITH_CHECK(gl_pack_skip_rows, _pixel_flag1, _PIXEL_FLAG1_BIT); + break; + case GL_PACK_ALIGNMENT: + STATE_PROC(gl_pack_alignment, _pixel_flag1, _PIXEL_FLAG1_BIT); + break; + case GL_UNPACK_ROW_LENGTH: + STATE_PROC_WITH_CHECK(gl_unpack_row_length, _pixel_flag2, _PIXEL_FLAG2_BIT); + break; + case GL_UNPACK_IMAGE_HEIGHT: + STATE_PROC_WITH_CHECK(gl_unpack_image_height, _pixel_flag2, _PIXEL_FLAG2_BIT); + break; + case GL_UNPACK_SKIP_PIXELS: + STATE_PROC_WITH_CHECK(gl_unpack_skip_pixels, _pixel_flag2, _PIXEL_FLAG2_BIT); + break; + case GL_UNPACK_SKIP_IMAGES: + STATE_PROC_WITH_CHECK(gl_unpack_skip_images, _pixel_flag2, _PIXEL_FLAG2_BIT); + break; + case GL_UNPACK_ALIGNMENT: + STATE_PROC(gl_unpack_alignment, _pixel_flag2, _PIXEL_FLAG2_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } @@ -3390,10 +3255,8 @@ fastpath_glPolygonOffset(GLfloat factor, GLfloat units) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_polygon_offset_factor[0] != factor) || - (current_ctx->gl_polygon_offset_units[0] != units)) - { - IF_GL_SUCCESS(_orig_fastpath_glPolygonOffset(factor, units)) - { + (current_ctx->gl_polygon_offset_units[0] != units)) { + IF_GL_SUCCESS(_orig_fastpath_glPolygonOffset(factor, units)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_polygon_offset_factor | _MISC_FLAG1_BIT_gl_polygon_offset_units; @@ -3417,10 +3280,8 @@ fastpath_glSampleCoverage(GLclampf value, GLboolean invert) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_sample_coverage_value[0] != value) || - (current_ctx->gl_sample_coverage_invert[0] != invert)) - { - IF_GL_SUCCESS(_orig_fastpath_glSampleCoverage(value, invert)) - { + (current_ctx->gl_sample_coverage_invert[0] != invert)) { + IF_GL_SUCCESS(_orig_fastpath_glSampleCoverage(value, invert)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_sample_coverage_value | _MISC_FLAG1_BIT_gl_sample_coverage_invert; @@ -3446,10 +3307,8 @@ fastpath_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) if ((current_ctx->gl_scissor_box[0] != x) || (current_ctx->gl_scissor_box[1] != y) || (current_ctx->gl_scissor_box[2] != width) || - (current_ctx->gl_scissor_box[3] != height)) - { - IF_GL_SUCCESS(_orig_fastpath_glScissor(x, y, width, height)) - { + (current_ctx->gl_scissor_box[3] != height)) { + IF_GL_SUCCESS(_orig_fastpath_glScissor(x, y, width, height)) { current_ctx->_misc_flag2 |= _MISC_FLAG2_BIT_gl_scissor_box; current_ctx->gl_scissor_box[0] = x; current_ctx->gl_scissor_box[1] = y; @@ -3476,10 +3335,8 @@ fastpath_glStencilFunc(GLenum func, GLint ref, GLuint mask) (current_ctx->gl_stencil_value_mask[0] != mask) || (current_ctx->gl_stencil_back_func[0] != func) || (current_ctx->gl_stencil_back_ref[0] != ref) || - (current_ctx->gl_stencil_back_value_mask[0] != mask)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilFunc(func, ref, mask)) - { + (current_ctx->gl_stencil_back_value_mask[0] != mask)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilFunc(func, ref, mask)) { current_ctx->_stencil_flag1 |= _STENCIL_FLAG1_BIT_gl_stencil_func | _STENCIL_FLAG1_BIT_gl_stencil_ref | @@ -3513,14 +3370,11 @@ fastpath_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) - { + if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) { if ((current_ctx->gl_stencil_func[0] != func) || (current_ctx->gl_stencil_ref[0] != ref) || - (current_ctx->gl_stencil_value_mask[0] != mask)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilFuncSeparate(face, func, ref, mask)) - { + (current_ctx->gl_stencil_value_mask[0] != mask)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilFuncSeparate(face, func, ref, mask)) { current_ctx->_stencil_flag1 |= _STENCIL_FLAG1_BIT_gl_stencil_func | _STENCIL_FLAG1_BIT_gl_stencil_ref | @@ -3531,15 +3385,11 @@ fastpath_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) current_ctx->gl_stencil_value_mask[0] = mask; } } - } - else if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) - { + } else if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) { if ((current_ctx->gl_stencil_back_func[0] != func) || (current_ctx->gl_stencil_back_ref[0] != ref) || - (current_ctx->gl_stencil_back_value_mask[0] != mask)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilFuncSeparate(face, func, ref, mask)) - { + (current_ctx->gl_stencil_back_value_mask[0] != mask)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilFuncSeparate(face, func, ref, mask)) { current_ctx->_stencil_flag2 |= _STENCIL_FLAG2_BIT_gl_stencil_back_func | _STENCIL_FLAG2_BIT_gl_stencil_back_ref | @@ -3550,9 +3400,7 @@ fastpath_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) current_ctx->gl_stencil_back_value_mask[0] = mask; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -3571,10 +3419,8 @@ fastpath_glStencilMask(GLuint mask) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_stencil_writemask[0] != mask) || - (current_ctx->gl_stencil_back_writemask[0] != mask)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilMask(mask)) - { + (current_ctx->gl_stencil_back_writemask[0] != mask)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilMask(mask)) { current_ctx->_stencil_flag1 |= _STENCIL_FLAG1_BIT_gl_stencil_writemask; current_ctx->_stencil_flag2 |= _STENCIL_FLAG2_BIT_gl_stencil_back_writemask; @@ -3596,30 +3442,21 @@ fastpath_glStencilMaskSeparate(GLenum face, GLuint mask) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) - { - if (current_ctx->gl_stencil_writemask[0] != mask) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilMaskSeparate(face, mask)) - { + if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) { + if (current_ctx->gl_stencil_writemask[0] != mask) { + IF_GL_SUCCESS(_orig_fastpath_glStencilMaskSeparate(face, mask)) { current_ctx->_stencil_flag1 |= _STENCIL_FLAG1_BIT_gl_stencil_writemask; current_ctx->gl_stencil_writemask[0] = mask; } } - } - else if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) - { - if (current_ctx->gl_stencil_back_writemask[0] != mask) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilMaskSeparate(face, mask)) - { + } else if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) { + if (current_ctx->gl_stencil_back_writemask[0] != mask) { + IF_GL_SUCCESS(_orig_fastpath_glStencilMaskSeparate(face, mask)) { current_ctx->_stencil_flag2 |= _STENCIL_FLAG2_BIT_gl_stencil_back_writemask; current_ctx->gl_stencil_back_writemask[0] = mask; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -3642,10 +3479,8 @@ fastpath_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) (current_ctx->gl_stencil_pass_depth_pass[0] != zpass) || (current_ctx->gl_stencil_back_fail[0] != fail) || (current_ctx->gl_stencil_back_pass_depth_fail[0] != zfail) || - (current_ctx->gl_stencil_back_pass_depth_pass[0] != zpass)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilOp(fail, zfail, zpass)) - { + (current_ctx->gl_stencil_back_pass_depth_pass[0] != zpass)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilOp(fail, zfail, zpass)) { current_ctx->_stencil_flag1 |= _STENCIL_FLAG1_BIT_gl_stencil_fail | _STENCIL_FLAG1_BIT_gl_stencil_pass_depth_fail | @@ -3673,52 +3508,44 @@ finish: void -fastpath_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +fastpath_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, + GLenum zpass) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) - { + if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) { if ((current_ctx->gl_stencil_fail[0] != fail) || (current_ctx->gl_stencil_pass_depth_fail[0] != zfail) || - (current_ctx->gl_stencil_pass_depth_pass[0] != zpass)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilOpSeparate(face, fail, zfail, zpass)) - { + (current_ctx->gl_stencil_pass_depth_pass[0] != zpass)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilOpSeparate(face, fail, zfail, zpass)) { current_ctx->_stencil_flag1 |= - _STENCIL_FLAG1_BIT_gl_stencil_fail | - _STENCIL_FLAG1_BIT_gl_stencil_pass_depth_fail | - _STENCIL_FLAG1_BIT_gl_stencil_pass_depth_pass; + _STENCIL_FLAG1_BIT_gl_stencil_fail | + _STENCIL_FLAG1_BIT_gl_stencil_pass_depth_fail | + _STENCIL_FLAG1_BIT_gl_stencil_pass_depth_pass; current_ctx->gl_stencil_fail[0] = fail; current_ctx->gl_stencil_pass_depth_fail[0] = zfail; current_ctx->gl_stencil_pass_depth_pass[0] = zpass; } } - } - else if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) - { + } else if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) { if ((current_ctx->gl_stencil_back_fail[0] != fail) || (current_ctx->gl_stencil_back_pass_depth_fail[0] != zfail) || - (current_ctx->gl_stencil_back_pass_depth_pass[0] != zpass)) - { - IF_GL_SUCCESS(_orig_fastpath_glStencilOpSeparate(face, fail, zfail, zpass)) - { + (current_ctx->gl_stencil_back_pass_depth_pass[0] != zpass)) { + IF_GL_SUCCESS(_orig_fastpath_glStencilOpSeparate(face, fail, zfail, zpass)) { current_ctx->_stencil_flag2 |= - _STENCIL_FLAG2_BIT_gl_stencil_back_fail | - _STENCIL_FLAG2_BIT_gl_stencil_back_pass_depth_fail | - _STENCIL_FLAG2_BIT_gl_stencil_back_pass_depth_pass; + _STENCIL_FLAG2_BIT_gl_stencil_back_fail | + _STENCIL_FLAG2_BIT_gl_stencil_back_pass_depth_fail | + _STENCIL_FLAG2_BIT_gl_stencil_back_pass_depth_pass; current_ctx->gl_stencil_back_fail[0] = fail; current_ctx->gl_stencil_back_pass_depth_fail[0] = zfail; current_ctx->gl_stencil_back_pass_depth_pass[0] = zpass; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -3736,10 +3563,8 @@ fastpath_glVertexAttrib1f(GLuint index, GLfloat x) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib1f(index, x)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib1f(index, x)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3758,16 +3583,14 @@ finish: void -fastpath_glVertexAttrib1fv(GLuint index, const GLfloat* values) +fastpath_glVertexAttrib1fv(GLuint index, const GLfloat *values) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib1fv(index, values)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib1fv(index, values)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3792,10 +3615,8 @@ fastpath_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib2f(index, x, y)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib2f(index, x, y)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3814,16 +3635,14 @@ finish: void -fastpath_glVertexAttrib2fv(GLuint index, const GLfloat* values) +fastpath_glVertexAttrib2fv(GLuint index, const GLfloat *values) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib2fv(index, values)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib2fv(index, values)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3848,10 +3667,8 @@ fastpath_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib3f(index, x, y, z)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib3f(index, x, y, z)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3870,16 +3687,14 @@ finish: void -fastpath_glVertexAttrib3fv(GLuint index, const GLfloat* values) +fastpath_glVertexAttrib3fv(GLuint index, const GLfloat *values) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib3fv(index, values)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib3fv(index, values)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3898,16 +3713,15 @@ finish: void -fastpath_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +fastpath_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib4f(index, x, y, z, w)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib4f(index, x, y, z, w)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3926,16 +3740,14 @@ finish: void -fastpath_glVertexAttrib4fv(GLuint index, const GLfloat* values) +fastpath_glVertexAttrib4fv(GLuint index, const GLfloat *values) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib4fv(index, values)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttrib4fv(index, values)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_FALSE; @@ -3954,19 +3766,20 @@ finish: void -fastpath_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) +fastpath_glVertexAttribPointer(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, const void *pointer) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribPointer(index, size, type, normalized, stride, pointer)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribPointer(index, size, type, + normalized, stride, pointer)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_array; - current_ctx->gl_vertex_array_buf_id[index] = current_ctx->gl_array_buffer_binding[0]; + current_ctx->gl_vertex_array_buf_id[index] = + current_ctx->gl_array_buffer_binding[0]; current_ctx->gl_vertex_array_size[index] = size; current_ctx->gl_vertex_array_type[index] = type; current_ctx->gl_vertex_array_normalized[index] = normalized; @@ -3992,10 +3805,8 @@ fastpath_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) if ((current_ctx->gl_viewport[0] != x) || (current_ctx->gl_viewport[1] != y) || (current_ctx->gl_viewport[2] != width) || - (current_ctx->gl_viewport[3] != height)) - { - IF_GL_SUCCESS(_orig_fastpath_glViewport(x, y, width, height)) - { + (current_ctx->gl_viewport[3] != height)) { + IF_GL_SUCCESS(_orig_fastpath_glViewport(x, y, width, height)) { current_ctx->_clear_flag1 |= _CLEAR_FLAG1_BIT_gl_viewport; current_ctx->gl_viewport[0] = x; current_ctx->gl_viewport[1] = y; @@ -4038,15 +3849,40 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) DEFINE_FASTPAH_GL_FUNC(); INIT_FASTPATH_GL_FUNC(); - switch (pname) - { - case GL_NUM_EXTENSIONS: - _valid_extension_string(); - TRANS_VALUE(0, gl_extension_count); - break; - + switch (pname) { + case GL_NUM_EXTENSIONS: + _valid_extension_string(); + TRANS_VALUE(0, gl_extension_count); + break; + + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_CUBE_MAP: + case GL_ARRAY_BUFFER_BINDING: + case GL_ELEMENT_ARRAY_BUFFER_BINDING: + case GL_COPY_READ_BUFFER_BINDING: + case GL_COPY_WRITE_BUFFER_BINDING: + case GL_PIXEL_PACK_BUFFER_BINDING: + case GL_PIXEL_UNPACK_BUFFER_BINDING: + case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: + case GL_UNIFORM_BUFFER_BINDING: + case GL_DRAW_FRAMEBUFFER_BINDING: + case GL_READ_FRAMEBUFFER_BINDING: + case GL_RENDERBUFFER_BINDING: + case GL_CURRENT_PROGRAM: + case GL_VERTEX_ARRAY_BINDING: + case GL_SAMPLER_BINDING: + case GL_TRANSFORM_FEEDBACK_BINDING: + case GL_PROGRAM_PIPELINE_BINDING: { + GLint real_obj_id = _COREGL_INT_INIT_VALUE; + GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; + GL_Object_Type obj_type = GL_OBJECT_TYPE_UNKNOWN; + EXTRACT_VALUE(0, real_obj_id); + + switch (pname) { case GL_TEXTURE_BINDING_2D: case GL_TEXTURE_BINDING_CUBE_MAP: + obj_type = GL_OBJECT_TYPE_TEXTURE; + break; case GL_ARRAY_BUFFER_BINDING: case GL_ELEMENT_ARRAY_BUFFER_BINDING: case GL_COPY_READ_BUFFER_BINDING: @@ -4055,65 +3891,37 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) case GL_PIXEL_UNPACK_BUFFER_BINDING: case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: case GL_UNIFORM_BUFFER_BINDING: + obj_type = GL_OBJECT_TYPE_BUFFER; + break; case GL_DRAW_FRAMEBUFFER_BINDING: case GL_READ_FRAMEBUFFER_BINDING: + obj_type = GL_OBJECT_TYPE_FRAMEBUFFER; + break; case GL_RENDERBUFFER_BINDING: + obj_type = GL_OBJECT_TYPE_RENDERBUFFER; + break; case GL_CURRENT_PROGRAM: + obj_type = GL_OBJECT_TYPE_PROGRAM; + break; case GL_VERTEX_ARRAY_BINDING: + obj_type = GL_OBJECT_TYPE_VERTEXARRAY; + break; case GL_SAMPLER_BINDING: + obj_type = GL_OBJECT_TYPE_SAMPLER; + break; case GL_TRANSFORM_FEEDBACK_BINDING: - case GL_PROGRAM_PIPELINE_BINDING: - { - GLint real_obj_id = _COREGL_INT_INIT_VALUE; - GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; - GL_Object_Type obj_type = GL_OBJECT_TYPE_UNKNOWN; - EXTRACT_VALUE(0, real_obj_id); - - switch (pname) - { - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_CUBE_MAP: - obj_type = GL_OBJECT_TYPE_TEXTURE; - break; - case GL_ARRAY_BUFFER_BINDING: - case GL_ELEMENT_ARRAY_BUFFER_BINDING: - case GL_COPY_READ_BUFFER_BINDING: - case GL_COPY_WRITE_BUFFER_BINDING: - case GL_PIXEL_PACK_BUFFER_BINDING: - case GL_PIXEL_UNPACK_BUFFER_BINDING: - case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: - case GL_UNIFORM_BUFFER_BINDING: - obj_type = GL_OBJECT_TYPE_BUFFER; - break; - case GL_DRAW_FRAMEBUFFER_BINDING: - case GL_READ_FRAMEBUFFER_BINDING: - obj_type = GL_OBJECT_TYPE_FRAMEBUFFER; - break; - case GL_RENDERBUFFER_BINDING: - obj_type = GL_OBJECT_TYPE_RENDERBUFFER; - break; - case GL_CURRENT_PROGRAM: - obj_type = GL_OBJECT_TYPE_PROGRAM; - break; - case GL_VERTEX_ARRAY_BINDING: - obj_type = GL_OBJECT_TYPE_VERTEXARRAY; - break; - case GL_SAMPLER_BINDING: - obj_type = GL_OBJECT_TYPE_SAMPLER; - break; - case GL_TRANSFORM_FEEDBACK_BINDING: - obj_type = GL_OBJECT_TYPE_TRANSFORMFEEDBACK; - break; - case GL_PROGRAM_PIPELINE_BINDING: - obj_type = GL_OBJECT_TYPE_PROGRAMPIPELINE; - } - AST(obj_type != GL_OBJECT_TYPE_UNKNOWN); - AST(GET_GLUE_OBJ(obj_type, real_obj_id, &glue_obj_id) == 1); - TRANS_VALUE(0, glue_obj_id); - - ret = GL_TRUE; + obj_type = GL_OBJECT_TYPE_TRANSFORMFEEDBACK; break; + case GL_PROGRAM_PIPELINE_BINDING: + obj_type = GL_OBJECT_TYPE_PROGRAMPIPELINE; } + AST(obj_type != GL_OBJECT_TYPE_UNKNOWN); + AST(GET_GLUE_OBJ(obj_type, real_obj_id, &glue_obj_id) == 1); + TRANS_VALUE(0, glue_obj_id); + + ret = GL_TRUE; + break; + } } goto finish; @@ -4122,14 +3930,13 @@ finish: } void -fastpath_glGetBooleanv(GLenum pname, GLboolean* params) +fastpath_glGetBooleanv(GLenum pname, GLboolean *params) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetBooleanv(pname, params)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetBooleanv(pname, params)) { _modify_get_value(pname, params, GL_BOOL, GL_FALSE); } goto finish; @@ -4139,14 +3946,13 @@ finish: } void -fastpath_glGetFloatv(GLenum pname, GLfloat* params) +fastpath_glGetFloatv(GLenum pname, GLfloat *params) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetFloatv(pname, params)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetFloatv(pname, params)) { _modify_get_value(pname, params, GL_FLOAT, GL_FALSE); } goto finish; @@ -4156,14 +3962,13 @@ finish: } void -fastpath_glGetIntegerv(GLenum pname, GLint* params) +fastpath_glGetIntegerv(GLenum pname, GLint *params) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetIntegerv(pname, params)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetIntegerv(pname, params)) { _modify_get_value(pname, params, GL_INT, GL_FALSE); } goto finish; @@ -4176,7 +3981,8 @@ finish: /* ES 3.0 PASS (SUPPORT) */ void -fastpath_glGetProgramBinary(GLuint program, GLsizei bufsize, GLsizei* length, GLenum* binaryFormat, void* binary) +fastpath_glGetProgramBinary(GLuint program, GLsizei bufsize, GLsizei *length, + GLenum *binaryFormat, void *binary) { GLuint real_obj; @@ -4184,13 +3990,13 @@ fastpath_glGetProgramBinary(GLuint program, GLsizei bufsize, GLsizei* length, GL _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetProgramBinary(real_obj, bufsize, length, binaryFormat, binary); + _orig_fastpath_glGetProgramBinary(real_obj, bufsize, length, binaryFormat, + binary); goto finish; @@ -4200,7 +4006,8 @@ finish: void -fastpath_glGetProgramBinaryOES(GLuint program, GLsizei bufsize, GLsizei* length, GLenum* binaryFormat, void* binary) +fastpath_glGetProgramBinaryOES(GLuint program, GLsizei bufsize, GLsizei *length, + GLenum *binaryFormat, void *binary) { GLuint real_obj; @@ -4208,13 +4015,13 @@ fastpath_glGetProgramBinaryOES(GLuint program, GLsizei bufsize, GLsizei* length, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetProgramBinaryOES(real_obj, bufsize, length, binaryFormat, binary); + _orig_fastpath_glGetProgramBinaryOES(real_obj, bufsize, length, binaryFormat, + binary); goto finish; @@ -4224,7 +4031,8 @@ finish: void -fastpath_glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary, GLint length) +fastpath_glProgramBinary(GLuint program, GLenum binaryFormat, + const void *binary, GLint length) { GLuint real_obj; @@ -4232,8 +4040,7 @@ fastpath_glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4248,7 +4055,8 @@ finish: void -fastpath_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void* binary, GLint length) +fastpath_glProgramBinaryOES(GLuint program, GLenum binaryFormat, + const void *binary, GLint length) { GLuint real_obj; @@ -4256,8 +4064,7 @@ fastpath_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void* bin _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4278,10 +4085,8 @@ fastpath_glReadBuffer(GLenum mode) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_read_buffer, mode) - { - IF_GL_SUCCESS(_orig_fastpath_glReadBuffer(mode)) - { + CURR_STATE_COMPARE(gl_read_buffer, mode) { + IF_GL_SUCCESS(_orig_fastpath_glReadBuffer(mode)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_read_buffer; current_ctx->gl_read_buffer[0] = mode; } @@ -4295,7 +4100,7 @@ finish: void -fastpath_glGenQueries(GLsizei n, GLuint* ids) +fastpath_glGenQueries(GLsizei n, GLuint *ids) { int i; GLuint *objid_array = NULL; @@ -4304,8 +4109,7 @@ fastpath_glGenQueries(GLsizei n, GLuint* ids) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4316,19 +4120,17 @@ fastpath_glGenQueries(GLsizei n, GLuint* ids) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenQueries(n, objid_array)) - { - for (i = 0; i < n; i++) - { - ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenQueries(n, objid_array)) { + for (i = 0; i < n; i++) { + ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_QUERY, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -4337,7 +4139,7 @@ finish: void -fastpath_glDeleteQueries(GLsizei n, const GLuint* ids) +fastpath_glDeleteQueries(GLsizei n, const GLuint *ids) { int i; GLuint *objid_array = NULL; @@ -4346,8 +4148,7 @@ fastpath_glDeleteQueries(GLsizei n, const GLuint* ids) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4360,15 +4161,16 @@ fastpath_glDeleteQueries(GLsizei n, const GLuint* ids) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (ids[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, ids[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_QUERY, ids[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, ids[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, + ids[i]) == 1); objid_array[real_n++] = real_objid; } @@ -4378,8 +4180,7 @@ fastpath_glDeleteQueries(GLsizei n, const GLuint* ids) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -4397,8 +4198,7 @@ fastpath_glIsQuery(GLuint id) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -4422,8 +4222,7 @@ fastpath_glBeginQuery(GLenum target, GLuint id) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { // TODO : Begin - Context Switch _set_gl_error(GL_INVALID_OPERATION); goto finish; @@ -4439,7 +4238,7 @@ finish: void -fastpath_glGetQueryiv(GLenum target, GLenum pname, GLint* params) +fastpath_glGetQueryiv(GLenum target, GLenum pname, GLint *params) { GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; @@ -4449,15 +4248,13 @@ fastpath_glGetQueryiv(GLenum target, GLenum pname, GLint* params) _orig_fastpath_glGetQueryiv(target, pname, params); - switch (pname) - { - case GL_CURRENT_QUERY: - if (params[0] != 0) - { - AST(GET_GLUE_OBJ(GL_OBJECT_TYPE_QUERY, params[0], &glue_obj_id) == 1); - params[0] = glue_obj_id; - } - break; + switch (pname) { + case GL_CURRENT_QUERY: + if (params[0] != 0) { + AST(GET_GLUE_OBJ(GL_OBJECT_TYPE_QUERY, params[0], &glue_obj_id) == 1); + params[0] = glue_obj_id; + } + break; } goto finish; @@ -4468,7 +4265,7 @@ finish: void -fastpath_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) +fastpath_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) { GLuint real_obj; @@ -4476,8 +4273,7 @@ fastpath_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } @@ -4492,14 +4288,13 @@ finish: void -fastpath_glDrawBuffers(GLsizei n, const GLenum* bufs) +fastpath_glDrawBuffers(GLsizei n, const GLenum *bufs) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glDrawBuffers(n, bufs)) - { + IF_GL_SUCCESS(_orig_fastpath_glDrawBuffers(n, bufs)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_draw_buffers; fastpath_state_get_draw_buffers(current_ctx->gl_draw_buffers); } @@ -4512,7 +4307,8 @@ finish: void -fastpath_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) +fastpath_glFramebufferTextureLayer(GLenum target, GLenum attachment, + GLuint texture, GLint level, GLint layer) { GLuint real_obj; @@ -4520,13 +4316,13 @@ fastpath_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint text _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferTextureLayer(target, attachment, texture, level, layer); + _orig_fastpath_glFramebufferTextureLayer(target, attachment, texture, level, + layer); goto finish; @@ -4538,7 +4334,7 @@ finish: //////////////////////////////////////////////////////////////////////// void -fastpath_glGenVertexArrays(GLsizei n, GLuint* arrays) +fastpath_glGenVertexArrays(GLsizei n, GLuint *arrays) { int i; GLuint *objid_array = NULL; @@ -4547,8 +4343,7 @@ fastpath_glGenVertexArrays(GLsizei n, GLuint* arrays) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4559,19 +4354,17 @@ fastpath_glGenVertexArrays(GLsizei n, GLuint* arrays) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenVertexArrays(n, objid_array)) - { - for (i = 0; i < n; i++) - { - arrays[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenVertexArrays(n, objid_array)) { + for (i = 0; i < n; i++) { + arrays[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_VERTEXARRAY, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -4588,16 +4381,13 @@ fastpath_glBindVertexArray(GLuint array) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } - if (current_ctx->gl_vertex_array_binding[0] != real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindVertexArray(real_obj)) - { + if (current_ctx->gl_vertex_array_binding[0] != real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindVertexArray(real_obj)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_vertex_array_binding; current_ctx->gl_vertex_array_binding[0] = real_obj; } @@ -4619,8 +4409,7 @@ fastpath_glIsVertexArray(GLuint array) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -4636,7 +4425,7 @@ finish: void -fastpath_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) +fastpath_glDeleteVertexArrays(GLsizei n, const GLuint *arrays) { int i; GLuint *objid_array = NULL; @@ -4645,8 +4434,7 @@ fastpath_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4659,27 +4447,25 @@ fastpath_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (arrays[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteVertexArrays(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteVertexArrays(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; if (cur_gctx->gl_vertex_array_binding[0] == objid_array[i]) @@ -4694,8 +4480,7 @@ fastpath_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -4705,14 +4490,13 @@ finish: //////////////////////////////////////////////////////////////////////// void -fastpath_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) +fastpath_glGetIntegeri_v(GLenum target, GLuint index, GLint *data) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetIntegeri_v(target, index, data)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetIntegeri_v(target, index, data)) { _modify_get_value(target, data, GL_INT, GL_FALSE); } goto finish; @@ -4724,7 +4508,7 @@ finish: //////////////////////////////////////////////////////////////////////// void -fastpath_glGenTransformFeedbacks(GLsizei n, GLuint* ids) +fastpath_glGenTransformFeedbacks(GLsizei n, GLuint *ids) { int i; GLuint *objid_array = NULL; @@ -4733,8 +4517,7 @@ fastpath_glGenTransformFeedbacks(GLsizei n, GLuint* ids) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4745,19 +4528,17 @@ fastpath_glGenTransformFeedbacks(GLsizei n, GLuint* ids) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenTransformFeedbacks(n, objid_array)) - { - for (i = 0; i < n; i++) - { - ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TRANSFORMFEEDBACK, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenTransformFeedbacks(n, objid_array)) { + for (i = 0; i < n; i++) { + ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_TRANSFORMFEEDBACK, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -4774,16 +4555,13 @@ fastpath_glBindTransformFeedback(GLenum target, GLuint id) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TRANSFORMFEEDBACK, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TRANSFORMFEEDBACK, id, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - if (current_ctx->gl_transform_feedback_binding[0] != real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindTransformFeedback(target, real_obj)) - { + if (current_ctx->gl_transform_feedback_binding[0] != real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindTransformFeedback(target, real_obj)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_transform_feedback_binding; current_ctx->gl_transform_feedback_binding[0] = real_obj; } @@ -4802,8 +4580,7 @@ fastpath_glBeginTransformFeedback(GLenum primitiveMode) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glBeginTransformFeedback(primitiveMode)) - { + IF_GL_SUCCESS(_orig_fastpath_glBeginTransformFeedback(primitiveMode)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_transform_feedback; current_ctx->gl_transform_feedback_active[0] = GL_TRUE; @@ -4824,8 +4601,7 @@ fastpath_glEndTransformFeedback() _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glEndTransformFeedback()) - { + IF_GL_SUCCESS(_orig_fastpath_glEndTransformFeedback()) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_transform_feedback; current_ctx->gl_transform_feedback_active[0] = GL_FALSE; @@ -4846,8 +4622,7 @@ fastpath_glPauseTransformFeedback() _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glPauseTransformFeedback()) - { + IF_GL_SUCCESS(_orig_fastpath_glPauseTransformFeedback()) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_transform_feedback; current_ctx->gl_transform_feedback_active[0] = GL_TRUE; @@ -4867,8 +4642,7 @@ fastpath_glResumeTransformFeedback() _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glResumeTransformFeedback()) - { + IF_GL_SUCCESS(_orig_fastpath_glResumeTransformFeedback()) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_transform_feedback; current_ctx->gl_transform_feedback_active[0] = GL_TRUE; @@ -4892,8 +4666,7 @@ fastpath_glIsTransformFeedback(GLuint id) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TRANSFORMFEEDBACK, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TRANSFORMFEEDBACK, id, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -4909,7 +4682,7 @@ finish: void -fastpath_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) +fastpath_glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids) { int i; GLuint *objid_array = NULL; @@ -4918,8 +4691,7 @@ fastpath_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -4932,27 +4704,25 @@ fastpath_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (ids[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TRANSFORMFEEDBACK, ids[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_TRANSFORMFEEDBACK, ids[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_TRANSFORMFEEDBACK, ids[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_TRANSFORMFEEDBACK, ids[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteTransformFeedbacks(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteTransformFeedbacks(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; if (cur_gctx->gl_transform_feedback_binding[0] == objid_array[i]) @@ -4967,8 +4737,7 @@ fastpath_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -4987,8 +4756,7 @@ fastpath_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } @@ -5009,18 +4777,17 @@ fastpath_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) } - switch (target) - { - case GL_TRANSFORM_FEEDBACK_BUFFER: - STATE_PROC(gl_transform_feedback_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - case GL_UNIFORM_BUFFER: - STATE_PROC(gl_uniform_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; - } + switch (target) { + case GL_TRANSFORM_FEEDBACK_BUFFER: + STATE_PROC(gl_transform_feedback_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); + break; + case GL_UNIFORM_BUFFER: + STATE_PROC(gl_uniform_buffer_binding, _bind_flag2, _BIND_FLAG2_BIT); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; + } #undef STATE_PROC @@ -5034,7 +4801,8 @@ finish: void -fastpath_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) +fastpath_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size) { GLuint real_obj; @@ -5042,8 +4810,7 @@ fastpath_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } @@ -5064,12 +4831,17 @@ fastpath_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr } - switch (target) - { - case GL_TRANSFORM_FEEDBACK_BUFFER: STATE_PROC(gl_transform_feedback_buffer_binding, 0); break; - case GL_UNIFORM_BUFFER: STATE_PROC(gl_uniform_buffer_binding, 0); break; - default: _set_gl_error(GL_INVALID_ENUM); break; - } + switch (target) { + case GL_TRANSFORM_FEEDBACK_BUFFER: + STATE_PROC(gl_transform_feedback_buffer_binding, 0); + break; + case GL_UNIFORM_BUFFER: + STATE_PROC(gl_uniform_buffer_binding, 0); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; + } #undef STATE_PROC @@ -5082,7 +4854,8 @@ finish: void -fastpath_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) +fastpath_glTransformFeedbackVaryings(GLuint program, GLsizei count, + const GLchar *const *varyings, GLenum bufferMode) { GLuint real_obj; @@ -5090,13 +4863,13 @@ fastpath_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glTransformFeedbackVaryings(real_obj, count, varyings, bufferMode); + _orig_fastpath_glTransformFeedbackVaryings(real_obj, count, varyings, + bufferMode); goto finish; finish: @@ -5105,7 +4878,8 @@ finish: void -fastpath_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) +fastpath_glGetTransformFeedbackVarying(GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) { GLuint real_obj; @@ -5113,13 +4887,13 @@ fastpath_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei buf _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetTransformFeedbackVarying(real_obj, index, bufSize, length, size, type, name); + _orig_fastpath_glGetTransformFeedbackVarying(real_obj, index, bufSize, length, + size, type, name); goto finish; finish: @@ -5128,19 +4902,20 @@ finish: void -fastpath_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) +fastpath_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribIPointer(index, size, type, stride, pointer)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribIPointer(index, size, type, stride, + pointer)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_array; - current_ctx->gl_vertex_array_buf_id[index] = current_ctx->gl_array_buffer_binding[0]; + current_ctx->gl_vertex_array_buf_id[index] = + current_ctx->gl_array_buffer_binding[0]; current_ctx->gl_vertex_array_size[index] = size; current_ctx->gl_vertex_array_type[index] = type; current_ctx->gl_vertex_array_normalized[index] = GL_FALSE; @@ -5163,10 +4938,8 @@ fastpath_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4i(index, x, y, z, w)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4i(index, x, y, z, w)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_TRUE; @@ -5186,16 +4959,15 @@ finish: void -fastpath_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) +fastpath_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4ui(index, x, y, z, w)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4ui(index, x, y, z, w)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_TRUE; @@ -5215,16 +4987,14 @@ finish: void -fastpath_glVertexAttribI4iv(GLuint index, const GLint* v) +fastpath_glVertexAttribI4iv(GLuint index, const GLint *v) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4iv(index, v)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4iv(index, v)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_TRUE; @@ -5244,16 +5014,14 @@ finish: void -fastpath_glVertexAttribI4uiv(GLuint index, const GLuint* v) +fastpath_glVertexAttribI4uiv(GLuint index, const GLuint *v) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4uiv(index, v)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribI4uiv(index, v)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_attrib_value; current_ctx->gl_vertex_array_size[index] = 0; current_ctx->gl_vertex_array_integer[index] = GL_TRUE; @@ -5273,7 +5041,7 @@ finish: void -fastpath_glGetUniformuiv(GLuint program, GLint location, GLuint* params) +fastpath_glGetUniformuiv(GLuint program, GLint location, GLuint *params) { GLuint real_obj; @@ -5281,8 +5049,7 @@ fastpath_glGetUniformuiv(GLuint program, GLint location, GLuint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5306,8 +5073,7 @@ fastpath_glGetFragDataLocation(GLuint program, const GLchar *name) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5322,7 +5088,7 @@ finish: } -const GLubyte* +const GLubyte * fastpath_glGetStringi(GLenum name, GLuint index) { const char *ret = NULL; @@ -5331,29 +5097,25 @@ fastpath_glGetStringi(GLenum name, GLuint index) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - switch (name) - { - case GL_VERSION: - _set_gl_error(GL_INVALID_ENUM); + switch (name) { + case GL_VERSION: + _set_gl_error(GL_INVALID_ENUM); + goto finish; + case GL_EXTENSIONS: + _valid_extension_string(); + if (index < 0 || index >= gl_extension_count) { + _set_gl_error(GL_INVALID_VALUE); goto finish; - case GL_EXTENSIONS: - _valid_extension_string(); - if (index < 0 || index >= gl_extension_count) - { - _set_gl_error(GL_INVALID_VALUE); - goto finish; - } - ret = string_each_extensions[index]; - break; - default: - IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetStringi(name, index)) - { - } - else - { - ret = NULL; - } - break; + } + ret = string_each_extensions[index]; + break; + default: + IF_GL_SUCCESS(ret = (const char *)_orig_fastpath_glGetStringi(name, index)) { + } + else { + ret = NULL; + } + break; } goto finish; @@ -5365,7 +5127,8 @@ finish: void -fastpath_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) +fastpath_glGetUniformIndices(GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices) { GLuint real_obj; @@ -5373,13 +5136,13 @@ fastpath_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetUniformIndices(real_obj, uniformCount, uniformNames, uniformIndices); + _orig_fastpath_glGetUniformIndices(real_obj, uniformCount, uniformNames, + uniformIndices); goto finish; @@ -5389,7 +5152,8 @@ finish: void -fastpath_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) +fastpath_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, GLint *params) { GLuint real_obj; @@ -5397,13 +5161,13 @@ fastpath_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuin _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetActiveUniformsiv(real_obj, uniformCount, uniformIndices, pname, params); + _orig_fastpath_glGetActiveUniformsiv(real_obj, uniformCount, uniformIndices, + pname, params); goto finish; @@ -5413,7 +5177,7 @@ finish: GLuint -fastpath_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) +fastpath_glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) { GLuint ret = _COREGL_INT_INIT_VALUE; GLuint real_obj; @@ -5422,8 +5186,7 @@ fastpath_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5438,7 +5201,8 @@ finish: } void -fastpath_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) +fastpath_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, + GLenum pname, GLint *params) { GLuint real_obj; @@ -5446,13 +5210,13 @@ fastpath_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLe _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetActiveUniformBlockiv(real_obj, uniformBlockIndex, pname, params); + _orig_fastpath_glGetActiveUniformBlockiv(real_obj, uniformBlockIndex, pname, + params); goto finish; @@ -5461,7 +5225,8 @@ finish: } void -fastpath_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) +fastpath_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) { GLuint real_obj; @@ -5469,13 +5234,13 @@ fastpath_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, G _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetActiveUniformBlockName(real_obj, uniformBlockIndex, bufSize, length, uniformBlockName); + _orig_fastpath_glGetActiveUniformBlockName(real_obj, uniformBlockIndex, bufSize, + length, uniformBlockName); goto finish; @@ -5485,7 +5250,8 @@ finish: void -fastpath_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) +fastpath_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding) { GLuint real_obj; @@ -5493,13 +5259,13 @@ fastpath_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glUniformBlockBinding(real_obj, uniformBlockIndex, uniformBlockBinding); + _orig_fastpath_glUniformBlockBinding(real_obj, uniformBlockIndex, + uniformBlockBinding); goto finish; @@ -5509,14 +5275,13 @@ finish: void -fastpath_glGetInteger64v(GLenum pname, GLint64* params) +fastpath_glGetInteger64v(GLenum pname, GLint64 *params) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetInteger64v(pname, params)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetInteger64v(pname, params)) { _modify_get_value(pname, params, GL_INT, GL_TRUE); } goto finish; @@ -5527,14 +5292,13 @@ finish: void -fastpath_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) +fastpath_glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetInteger64i_v(target, index, data)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetInteger64i_v(target, index, data)) { _modify_get_value(target, data, GL_INT, GL_TRUE); } goto finish; @@ -5547,7 +5311,7 @@ finish: //////////////////////////////////////////////////////////////////////// void -fastpath_glGenSamplers(GLsizei n, GLuint* samplers) +fastpath_glGenSamplers(GLsizei n, GLuint *samplers) { int i; GLuint *objid_array = NULL; @@ -5556,8 +5320,7 @@ fastpath_glGenSamplers(GLsizei n, GLuint* samplers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5568,19 +5331,17 @@ fastpath_glGenSamplers(GLsizei n, GLuint* samplers) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenSamplers(n, objid_array)) - { - for (i = 0; i < n; i++) - { - samplers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_SAMPLER, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenSamplers(n, objid_array)) { + for (i = 0; i < n; i++) { + samplers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_SAMPLER, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -5597,8 +5358,7 @@ fastpath_glBindSampler(GLuint unit, GLuint sampler) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } @@ -5621,8 +5381,7 @@ fastpath_glIsSampler(GLuint sampler) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -5638,7 +5397,7 @@ finish: void -fastpath_glDeleteSamplers(GLsizei n, const GLuint* samplers) +fastpath_glDeleteSamplers(GLsizei n, const GLuint *samplers) { int i; GLuint *objid_array = NULL; @@ -5647,8 +5406,7 @@ fastpath_glDeleteSamplers(GLsizei n, const GLuint* samplers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5661,15 +5419,16 @@ fastpath_glDeleteSamplers(GLsizei n, const GLuint* samplers) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (samplers[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_SAMPLER, samplers[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_SAMPLER, samplers[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_SAMPLER, samplers[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_SAMPLER, + samplers[i]) == 1); objid_array[real_n++] = real_objid; } @@ -5679,8 +5438,7 @@ fastpath_glDeleteSamplers(GLsizei n, const GLuint* samplers) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -5699,8 +5457,7 @@ fastpath_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { goto finish; } @@ -5713,7 +5470,7 @@ finish: } void -fastpath_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) +fastpath_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) { GLuint real_obj; @@ -5721,8 +5478,7 @@ fastpath_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { goto finish; } @@ -5743,8 +5499,7 @@ fastpath_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { goto finish; } @@ -5757,7 +5512,8 @@ finish: } void -fastpath_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) +fastpath_glSamplerParameterfv(GLuint sampler, GLenum pname, + const GLfloat *param) { GLuint real_obj; @@ -5765,8 +5521,7 @@ fastpath_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { goto finish; } @@ -5779,7 +5534,7 @@ finish: } void -fastpath_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) +fastpath_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) { GLuint real_obj; @@ -5787,8 +5542,7 @@ fastpath_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { goto finish; } @@ -5801,7 +5555,7 @@ finish: } void -fastpath_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) +fastpath_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) { GLuint real_obj; @@ -5809,8 +5563,7 @@ fastpath_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_SAMPLER, sampler, &real_obj) != 1) { goto finish; } @@ -5830,10 +5583,8 @@ fastpath_glVertexAttribDivisor(GLuint index, GLuint divisor) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glVertexAttribDivisor(index, divisor)) - { - if (current_ctx->gl_vertex_array_binding[0] == 0) - { + IF_GL_SUCCESS(_orig_fastpath_glVertexAttribDivisor(index, divisor)) { + if (current_ctx->gl_vertex_array_binding[0] == 0) { current_ctx->_vattrib_flag |= _VATTRIB_FLAG_BIT_gl_vertex_array; current_ctx->gl_vertex_array_divisor[index] = divisor; } @@ -5854,8 +5605,7 @@ fastpath_glProgramParameteri(GLuint program, GLenum pname, GLint value) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5871,38 +5621,41 @@ finish: /* GLES3.1 API */ GLuint -fastpath_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +fastpath_glCreateShaderProgramv(GLenum type, GLsizei count, + const GLchar *const *strings) { - GLuint ret = 0; - GLuint real_obj = 0; + GLuint ret = 0; + GLuint real_obj = 0; - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); + DEFINE_FASTPAH_GL_FUNC(); + _COREGL_FASTPATH_FUNC_BEGIN(); + INIT_FASTPATH_GL_FUNC(); - AST(current_ctx->ostate.shared != NULL); + AST(current_ctx->ostate.shared != NULL); - real_obj = _orig_fastpath_glCreateShaderProgramv(type, count, strings); - if (real_obj != 0) - { - ret = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, real_obj); + real_obj = _orig_fastpath_glCreateShaderProgramv(type, count, strings); + if (real_obj != 0) { + ret = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_PROGRAM, real_obj); - Program_object_attached_tag *poat = NULL; - poat = (Program_object_attached_tag *)calloc(1, sizeof(Program_object_attached_tag)); - AST(poat != NULL); + Program_object_attached_tag *poat = NULL; + poat = (Program_object_attached_tag *)calloc(1, + sizeof(Program_object_attached_tag)); + AST(poat != NULL); - poat->is_deleting = 0; - poat->shader_count = 0; + poat->is_deleting = 0; + poat->shader_count = 0; - fastpath_ostate_set_object_tag(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, ret, poat); - } - _attach_program_object(¤t_ctx->ostate, real_obj); + fastpath_ostate_set_object_tag(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAM, + ret, poat); + } + _attach_program_object(¤t_ctx->ostate, real_obj); - goto finish; + goto finish; - finish: - _COREGL_FASTPATH_FUNC_END(); - return ret; +finish: + _COREGL_FASTPATH_FUNC_END(); + return ret; } void @@ -5915,8 +5668,7 @@ fastpath_glGenProgramPipelines( GLsizei n, GLuint *pipelines) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0 || pipelines == NULL) - { + if (n < 0 || pipelines == NULL) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -5925,19 +5677,17 @@ fastpath_glGenProgramPipelines( GLsizei n, GLuint *pipelines) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenProgramPipelines(n, objid_array)) - { - for (i = 0; i < n; i++) - { - pipelines[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAMPIPELINE, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenProgramPipelines(n, objid_array)) { + for (i = 0; i < n; i++) { + pipelines[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_PROGRAMPIPELINE, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -5953,16 +5703,13 @@ fastpath_glBindProgramPipeline( GLuint pipeline) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } - if (current_ctx->gl_program_pipeline_binding[0] != real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindProgramPipeline(real_obj)) - { + if (current_ctx->gl_program_pipeline_binding[0] != real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindProgramPipeline(real_obj)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_program_pipeline_binding; current_ctx->gl_program_pipeline_binding[0] = real_obj; } @@ -5983,25 +5730,24 @@ fastpath_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (params == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) - { + if (params == NULL || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - switch (pname) - { - case GL_ACTIVE_PROGRAM: - case GL_VERTEX_SHADER: - case GL_FRAGMENT_SHADER: - case GL_COMPUTE_SHADER: - case GL_INFO_LOG_LENGTH: - case GL_VALIDATE_STATUS: - _orig_fastpath_glGetProgramPipelineiv(real_obj, pname, params); - break; - default: - _set_gl_error(GL_INVALID_ENUM); - break; + switch (pname) { + case GL_ACTIVE_PROGRAM: + case GL_VERTEX_SHADER: + case GL_FRAGMENT_SHADER: + case GL_COMPUTE_SHADER: + case GL_INFO_LOG_LENGTH: + case GL_VALIDATE_STATUS: + _orig_fastpath_glGetProgramPipelineiv(real_obj, pname, params); + break; + default: + _set_gl_error(GL_INVALID_ENUM); + break; } goto finish; @@ -6020,8 +5766,7 @@ fastpath_glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0 || pipelines == NULL) - { + if (n < 0 || pipelines == NULL) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6035,27 +5780,25 @@ fastpath_glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (pipelines[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAMPIPELINE, pipelines[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_PROGRAMPIPELINE, pipelines[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_PROGRAMPIPELINE, pipelines[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_PROGRAMPIPELINE, pipelines[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteProgramPipelines(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteProgramPipelines(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; if (cur_gctx->gl_program_pipeline_binding[0] == objid_array[i]) @@ -6070,8 +5813,7 @@ fastpath_glDeleteProgramPipelines(GLsizei n, GLuint const *pipelines) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -6088,8 +5830,7 @@ fastpath_glIsProgramPipeline( GLuint pipeline) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -6112,8 +5853,7 @@ fastpath_glValidateProgramPipeline(GLuint pipeline) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6127,7 +5867,8 @@ finish: } void -fastpath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +fastpath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) { GLuint real_obj; @@ -6135,8 +5876,8 @@ fastpath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei * _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (NULL == infoLog || bufSize < 0 || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) - { + if (NULL == infoLog || bufSize < 0 || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAMPIPELINE, pipeline, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6150,22 +5891,21 @@ finish: } void -fastpath_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +fastpath_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); if (num_groups_x > GL_MAX_COMPUTE_WORK_GROUP_COUNT || - num_groups_y > GL_MAX_COMPUTE_WORK_GROUP_COUNT || - num_groups_z > GL_MAX_COMPUTE_WORK_GROUP_COUNT) - { + num_groups_y > GL_MAX_COMPUTE_WORK_GROUP_COUNT || + num_groups_z > GL_MAX_COMPUTE_WORK_GROUP_COUNT) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - if (num_groups_x == 0 || num_groups_y == 0 || num_groups_z == 0) - { + if (num_groups_x == 0 || num_groups_y == 0 || num_groups_z == 0) { goto finish; } @@ -6182,8 +5922,7 @@ fastpath_glDispatchComputeIndirect( GLintptr indirect) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (indirect < 0 || (indirect % sizeof(GLuint)) != 0) - { + if (indirect < 0 || (indirect % sizeof(GLuint)) != 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6195,7 +5934,8 @@ finish: } void -fastpath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +fastpath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, + GLenum pname, GLint *params) { GLuint real_obj; @@ -6203,13 +5943,14 @@ fastpath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLen _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (params == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (params == NULL || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetProgramInterfaceiv(real_obj, programInterface, pname, params); + _orig_fastpath_glGetProgramInterfaceiv(real_obj, programInterface, pname, + params); goto finish; @@ -6218,7 +5959,8 @@ finish: } GLuint -fastpath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +fastpath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, + const char *name) { GLuint real_obj; GLuint ret = GL_INVALID_INDEX; @@ -6227,13 +5969,14 @@ fastpath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, c _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (name == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (name == NULL || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - ret = _orig_fastpath_glGetProgramResourceIndex(real_obj, programInterface, name); + ret = _orig_fastpath_glGetProgramResourceIndex(real_obj, programInterface, + name); goto finish; @@ -6243,7 +5986,8 @@ finish: } void -fastpath_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +fastpath_glGetProgramResourceName(GLuint program, GLenum programInterface, + GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) { GLuint real_obj; @@ -6251,13 +5995,14 @@ fastpath_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuin _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if ((NULL == name && 0 != bufSize) || 0 > bufSize || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if ((NULL == name && 0 != bufSize) || 0 > bufSize || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetProgramResourceName(real_obj, programInterface, index, bufSize, length, name); + _orig_fastpath_glGetProgramResourceName(real_obj, programInterface, index, + bufSize, length, name); goto finish; @@ -6266,7 +6011,9 @@ finish: } void -fastpath_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +fastpath_glGetProgramResourceiv( GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params) { GLuint real_obj; @@ -6274,13 +6021,15 @@ fastpath_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLui _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (0 > bufSize || 0 >= propCount || NULL == props || ((NULL == params && 0 < bufSize)) || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (0 > bufSize || 0 >= propCount || NULL == props || ((NULL == params && + 0 < bufSize)) || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glGetProgramResourceiv(real_obj, programInterface, index, propCount, props, bufSize, length, params); + _orig_fastpath_glGetProgramResourceiv(real_obj, programInterface, index, + propCount, props, bufSize, length, params); goto finish; @@ -6289,7 +6038,8 @@ finish: } GLint -fastpath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +fastpath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, + GLchar const *name) { GLuint real_obj; GLuint ret = -1; @@ -6298,13 +6048,14 @@ fastpath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, G _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (name == NULL || GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (name == NULL || + GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - ret = _orig_fastpath_glGetProgramResourceLocation(real_obj, programInterface, name); + ret = _orig_fastpath_glGetProgramResourceLocation(real_obj, programInterface, + name); goto finish; @@ -6322,8 +6073,7 @@ fastpath_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6345,8 +6095,7 @@ fastpath_glActiveShaderProgram(GLuint pipeline, GLuint program) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6360,7 +6109,8 @@ finish: } void -fastpath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -6368,8 +6118,7 @@ fastpath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6384,7 +6133,8 @@ finish: void -fastpath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -6392,8 +6142,7 @@ fastpath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6408,7 +6157,8 @@ finish: void -fastpath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -6416,8 +6166,7 @@ fastpath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6432,7 +6181,8 @@ finish: void -fastpath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +fastpath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { GLuint real_obj; @@ -6440,8 +6190,7 @@ fastpath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6457,7 +6206,8 @@ finish: void -fastpath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -6465,8 +6215,7 @@ fastpath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6481,7 +6230,8 @@ finish: void -fastpath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -6489,8 +6239,7 @@ fastpath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6505,7 +6254,8 @@ finish: void -fastpath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -6513,8 +6263,7 @@ fastpath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6529,7 +6278,8 @@ finish: void -fastpath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +fastpath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { GLuint real_obj; @@ -6537,8 +6287,7 @@ fastpath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, cons _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6552,7 +6301,8 @@ finish: } void -fastpath_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -6560,13 +6310,13 @@ fastpath_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix2fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix2fv(real_obj, location, count, transpose, + value); goto finish; @@ -6576,7 +6326,8 @@ finish: void -fastpath_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -6584,13 +6335,13 @@ fastpath_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix3fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix3fv(real_obj, location, count, transpose, + value); goto finish; @@ -6600,7 +6351,8 @@ finish: void -fastpath_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -6608,13 +6360,13 @@ fastpath_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix4fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix4fv(real_obj, location, count, transpose, + value); goto finish; @@ -6632,8 +6384,7 @@ fastpath_glProgramUniform1i(GLuint program, GLint location, GLint x) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6656,8 +6407,7 @@ fastpath_glProgramUniform2i(GLuint program, GLint location, GLint x, GLint y) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6672,7 +6422,8 @@ finish: void -fastpath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +fastpath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, + GLint z) { GLuint real_obj; @@ -6680,8 +6431,7 @@ fastpath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GL _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6696,7 +6446,8 @@ finish: void -fastpath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +fastpath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, + GLint z, GLint w) { GLuint real_obj; @@ -6704,8 +6455,7 @@ fastpath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GL _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6728,8 +6478,7 @@ fastpath_glProgramUniform1f(GLuint program, GLint location, GLfloat x) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6744,7 +6493,8 @@ finish: void -fastpath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +fastpath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, + GLfloat y) { GLuint real_obj; @@ -6752,8 +6502,7 @@ fastpath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6768,7 +6517,8 @@ finish: void -fastpath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +fastpath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z) { GLuint real_obj; @@ -6776,8 +6526,7 @@ fastpath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6792,7 +6541,8 @@ finish: void -fastpath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +fastpath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z, GLfloat w) { GLuint real_obj; @@ -6800,8 +6550,7 @@ fastpath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6823,8 +6572,7 @@ fastpath_glProgramUniform1ui(GLuint program, GLint location, GLuint x) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6847,8 +6595,7 @@ fastpath_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6863,7 +6610,8 @@ finish: void -fastpath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +fastpath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, + GLuint z) { GLuint real_obj; @@ -6871,8 +6619,7 @@ fastpath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6887,7 +6634,8 @@ finish: void -fastpath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +fastpath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, + GLuint z, GLuint w) { GLuint real_obj; @@ -6895,8 +6643,7 @@ fastpath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6910,7 +6657,8 @@ finish: } void -fastpath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +fastpath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { GLuint real_obj; @@ -6918,8 +6666,7 @@ fastpath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, con _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6934,7 +6681,8 @@ finish: void -fastpath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +fastpath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { GLuint real_obj; @@ -6942,8 +6690,7 @@ fastpath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, con _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6958,7 +6705,8 @@ finish: void -fastpath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +fastpath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { GLuint real_obj; @@ -6966,8 +6714,7 @@ fastpath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, con _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -6982,7 +6729,8 @@ finish: void -fastpath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +fastpath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { GLuint real_obj; @@ -6990,8 +6738,7 @@ fastpath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, con _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -7005,7 +6752,8 @@ finish: } void -fastpath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -7013,13 +6761,13 @@ fastpath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei cou _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix2x3fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix2x3fv(real_obj, location, count, transpose, + value); goto finish; @@ -7029,7 +6777,8 @@ finish: void -fastpath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -7037,13 +6786,13 @@ fastpath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei cou _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix3x2fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix3x2fv(real_obj, location, count, transpose, + value); goto finish; @@ -7053,7 +6802,8 @@ finish: void -fastpath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -7061,13 +6811,13 @@ fastpath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei cou _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix4x2fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix4x2fv(real_obj, location, count, transpose, + value); goto finish; @@ -7076,7 +6826,8 @@ finish: } void -fastpath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -7084,13 +6835,13 @@ fastpath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei cou _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix2x4fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix2x4fv(real_obj, location, count, transpose, + value); goto finish; @@ -7100,7 +6851,8 @@ finish: void -fastpath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -7108,13 +6860,13 @@ fastpath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei cou _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix3x4fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix3x4fv(real_obj, location, count, transpose, + value); goto finish; @@ -7124,7 +6876,8 @@ finish: void -fastpath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +fastpath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { GLuint real_obj; @@ -7132,13 +6885,13 @@ fastpath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei cou _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM, program, &real_obj) != 1) { _set_gl_error(GL_INVALID_VALUE); goto finish; } - _orig_fastpath_glProgramUniformMatrix4x3fv(real_obj, location, count, transpose, value); + _orig_fastpath_glProgramUniformMatrix4x3fv(real_obj, location, count, transpose, + value); goto finish; @@ -7147,13 +6900,15 @@ finish: } void -fastpath_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +fastpath_glBindImageTexture(GLuint unit, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, GLenum format) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - _orig_fastpath_glBindImageTexture(unit, texture, level, layered, layer, access, format); + _orig_fastpath_glBindImageTexture(unit, texture, level, layered, layer, access, + format); goto finish; @@ -7168,8 +6923,7 @@ fastpath_glGetBooleani_v (GLenum target, GLuint index, GLboolean *data) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glGetBooleani_v(target, index, data)) - { + IF_GL_SUCCESS(_orig_fastpath_glGetBooleani_v(target, index, data)) { _modify_get_value(target, data, GL_BOOL, GL_FALSE); } @@ -7210,13 +6964,16 @@ finish: } void -fastpath_glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +fastpath_glTexStorage2DMultisample (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - _orig_fastpath_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); + _orig_fastpath_glTexStorage2DMultisample (target, samples, internalformat, + width, height, fixedsamplelocations); goto finish; @@ -7255,7 +7012,8 @@ finish: } void -fastpath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +fastpath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, + GLint *params) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -7270,7 +7028,8 @@ finish: } void -fastpath_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +fastpath_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, + GLfloat *params) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -7285,7 +7044,8 @@ finish: } void -fastpath_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +fastpath_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -7301,13 +7061,15 @@ finish: } void -fastpath_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +fastpath_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - _orig_fastpath_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); + _orig_fastpath_glVertexAttribFormat (attribindex, size, type, normalized, + relativeoffset); goto finish; @@ -7316,7 +7078,8 @@ finish: } void -fastpath_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +fastpath_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -7368,20 +7131,15 @@ fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - if (target == GL_FRAMEBUFFER) - { - if (current_ctx->gl_framebuffer_binding_read_used == 1) - { - CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) - { + if (target == GL_FRAMEBUFFER) { + if (current_ctx->gl_framebuffer_binding_read_used == 1) { + CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); else @@ -7389,10 +7147,8 @@ fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_read[0] = real_obj; } } - CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) - { + CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); else @@ -7400,13 +7156,9 @@ fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_draw[0] = real_obj; } } - } - else - { - CURR_STATE_COMPARE(gl_framebuffer_binding, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) - { + } else { + CURR_STATE_COMPARE(gl_framebuffer_binding, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding); else @@ -7415,13 +7167,10 @@ fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) } } } - } - else if (target == GL_READ_FRAMEBUFFER && current_ctx->gl_framebuffer_binding_read_used) - { - CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) - { + } else if (target == GL_READ_FRAMEBUFFER && + current_ctx->gl_framebuffer_binding_read_used) { + CURR_STATE_COMPARE(gl_framebuffer_binding_read, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); else @@ -7429,13 +7178,10 @@ fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_read[0] = real_obj; } } - } - else if (target == GL_DRAW_FRAMEBUFFER && current_ctx->gl_framebuffer_binding_draw_used) - { - CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) - { + } else if (target == GL_DRAW_FRAMEBUFFER && + current_ctx->gl_framebuffer_binding_draw_used) { + CURR_STATE_COMPARE(gl_framebuffer_binding_draw, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindFramebufferOES(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); else @@ -7443,9 +7189,7 @@ fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) current_ctx->gl_framebuffer_binding_draw[0] = real_obj; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -7464,18 +7208,14 @@ fastpath_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - if (target == GL_RENDERBUFFER) - { - CURR_STATE_COMPARE(gl_renderbuffer_binding, real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindRenderbufferOES(target, real_obj)) - { + if (target == GL_RENDERBUFFER) { + CURR_STATE_COMPARE(gl_renderbuffer_binding, real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindRenderbufferOES(target, real_obj)) { if (real_obj == 0) current_ctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_renderbuffer_binding); else @@ -7483,9 +7223,7 @@ fastpath_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) current_ctx->gl_renderbuffer_binding[0] = real_obj; } } - } - else - { + } else { _set_gl_error(GL_INVALID_ENUM); goto finish; } @@ -7498,7 +7236,8 @@ finish: void -fastpath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +fastpath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, + GLint stencil) { GLuint real_obj; @@ -7506,8 +7245,7 @@ fastpath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint s _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { goto finish; } @@ -7528,8 +7266,7 @@ fastpath_glClearBufferfv(GLenum buffer, GLint drawbuffer, GLfloat const *value) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { goto finish; } @@ -7550,8 +7287,7 @@ fastpath_glClearBufferiv(GLenum buffer, GLint drawbuffer, GLint const *value) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { goto finish; } @@ -7572,8 +7308,7 @@ fastpath_glClearBufferuiv(GLenum buffer, GLint drawbuffer, GLuint const *value) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { goto finish; } @@ -7586,7 +7321,7 @@ finish: } void -fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) +fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers) { int i; GLuint *objid_array = NULL; @@ -7595,8 +7330,7 @@ fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -7609,41 +7343,36 @@ fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (framebuffers[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER, framebuffers[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteFramebuffersOES(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteFramebuffersOES(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->gl_framebuffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_framebuffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding); cur_gctx->gl_framebuffer_binding[0] = 0; } - if (cur_gctx->gl_framebuffer_binding_read[0] == objid_array[i]) - { + if (cur_gctx->gl_framebuffer_binding_read[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_read); cur_gctx->gl_framebuffer_binding_read[0] = 0; } - if (cur_gctx->gl_framebuffer_binding_draw[0] == objid_array[i]) - { + if (cur_gctx->gl_framebuffer_binding_draw[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_framebuffer_binding_draw); cur_gctx->gl_framebuffer_binding_draw[0] = 0; } @@ -7657,8 +7386,7 @@ fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -7666,7 +7394,7 @@ finish: } void -fastpath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) +fastpath_glDeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers) { int i; GLuint *objid_array = NULL; @@ -7675,8 +7403,7 @@ fastpath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -7689,31 +7416,28 @@ fastpath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (renderbuffers[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_RENDERBUFFER, renderbuffers[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteRenderbuffersOES(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteRenderbuffersOES(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; - if (cur_gctx->gl_renderbuffer_binding[0] == objid_array[i]) - { + if (cur_gctx->gl_renderbuffer_binding[0] == objid_array[i]) { cur_gctx->_bind_flag1 &= (~_BIND_FLAG1_BIT_gl_renderbuffer_binding); cur_gctx->gl_renderbuffer_binding[0] = 0; } @@ -7727,8 +7451,7 @@ fastpath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -7743,10 +7466,8 @@ fastpath_glDepthRangefOES(GLclampf zNear, GLclampf zFar) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_depth_range[0] != zNear) || - (current_ctx->gl_depth_range[1] != zFar)) - { - IF_GL_SUCCESS(_orig_fastpath_glDepthRangefOES(zNear, zFar)) - { + (current_ctx->gl_depth_range[1] != zFar)) { + IF_GL_SUCCESS(_orig_fastpath_glDepthRangefOES(zNear, zFar)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_range; current_ctx->gl_depth_range[0] = zNear; current_ctx->gl_depth_range[1] = zFar; @@ -7766,10 +7487,8 @@ fastpath_glDepthRangexOES(GLclampx zNear, GLclampx zFar) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_depth_range[0] != zNear) || - (current_ctx->gl_depth_range[1] != zFar)) - { - IF_GL_SUCCESS(_orig_fastpath_glDepthRangexOES(zNear, zFar)) - { + (current_ctx->gl_depth_range[1] != zFar)) { + IF_GL_SUCCESS(_orig_fastpath_glDepthRangexOES(zNear, zFar)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_range; current_ctx->gl_depth_range[0] = zNear; current_ctx->gl_depth_range[1] = zFar; @@ -7790,33 +7509,31 @@ fastpath_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - param = 0; - _orig_fastpath_glFramebufferParameteri(target, pname, real_obj); - _orig_fastpath_glFramebufferParameteri(target, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, fa_type); - switch (fa_type) - { - case GL_TEXTURE: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)¶m) != 1) - { - param = 0; - goto finish; - } - break; - case GL_RENDERBUFFER: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)¶m) != 1) - { - param = 0; - goto finish; - } - break; + switch (pname) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + param = 0; + _orig_fastpath_glFramebufferParameteri(target, pname, real_obj); + _orig_fastpath_glFramebufferParameteri(target, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, fa_type); + switch (fa_type) { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)¶m) != 1) { + param = 0; + goto finish; } break; - default: - _orig_fastpath_glFramebufferParameteri(target, pname, param); + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, + (GLuint *)¶m) != 1) { + param = 0; + goto finish; + } break; + } + break; + default: + _orig_fastpath_glFramebufferParameteri(target, pname, param); + break; } goto finish; @@ -7834,33 +7551,31 @@ fastpath_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - params[0] = 0; - _orig_fastpath_glGetFramebufferParameteriv(target, pname, &real_obj); - _orig_fastpath_glGetFramebufferParameteriv(target, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); - switch (fa_type) - { - case GL_TEXTURE: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) - { - params[0] = 0; - goto finish; - } - break; - case GL_RENDERBUFFER: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)params) != 1) - { - params[0] = 0; - goto finish; - } - break; + switch (pname) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + params[0] = 0; + _orig_fastpath_glGetFramebufferParameteriv(target, pname, &real_obj); + _orig_fastpath_glGetFramebufferParameteriv(target, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); + switch (fa_type) { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) { + params[0] = 0; + goto finish; } break; - default: - _orig_fastpath_glGetFramebufferParameteriv(target, pname, params); + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, + (GLuint *)params) != 1) { + params[0] = 0; + goto finish; + } break; + } + break; + default: + _orig_fastpath_glGetFramebufferParameteriv(target, pname, params); + break; } goto finish; @@ -7870,7 +7585,8 @@ finish: } void -fastpath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +fastpath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { GLuint real_obj; @@ -7878,13 +7594,13 @@ fastpath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum r _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, real_obj); + _orig_fastpath_glFramebufferRenderbufferOES(target, attachment, + renderbuffertarget, real_obj); goto finish; @@ -7893,7 +7609,8 @@ finish: } void -fastpath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +fastpath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level) { GLuint real_obj; @@ -7901,13 +7618,13 @@ fastpath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum text _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_TEXTURE, texture, &real_obj) != 1) { _set_gl_error(GL_OUT_OF_MEMORY); goto finish; } - _orig_fastpath_glFramebufferTexture2DOES(target, attachment, textarget, real_obj, level); + _orig_fastpath_glFramebufferTexture2DOES(target, attachment, textarget, + real_obj, level); goto finish; @@ -7916,7 +7633,7 @@ finish: } void -fastpath_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) +fastpath_glGenFramebuffersOES(GLsizei n, GLuint *framebuffers) { int i; GLuint *objid_array = NULL; @@ -7925,8 +7642,7 @@ fastpath_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -7937,19 +7653,17 @@ fastpath_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenFramebuffersOES(n, objid_array)) - { - for (i = 0; i < n; i++) - { - framebuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_FRAMEBUFFER, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenFramebuffersOES(n, objid_array)) { + for (i = 0; i < n; i++) { + framebuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_FRAMEBUFFER, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -7957,7 +7671,7 @@ finish: } void -fastpath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) +fastpath_glGenRenderbuffersOES(GLsizei n, GLuint *renderbuffers) { int i; GLuint *objid_array = NULL; @@ -7966,8 +7680,7 @@ fastpath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -7978,19 +7691,17 @@ fastpath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenRenderbuffersOES(n, objid_array)) - { - for (i = 0; i < n; i++) - { - renderbuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_RENDERBUFFER, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenRenderbuffersOES(n, objid_array)) { + for (i = 0; i < n; i++) { + renderbuffers[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_RENDERBUFFER, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -7998,7 +7709,8 @@ finish: } void -fastpath_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint *params) +fastpath_glGetFramebufferAttachmentParameterivOES(GLenum target, + GLenum attachment, GLenum pname, GLint *params) { GLint real_obj, fa_type; @@ -8006,33 +7718,33 @@ fastpath_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachme _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - params[0] = 0; - _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, pname, &real_obj); - _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); - switch (fa_type) - { - case GL_TEXTURE: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) - { - params[0] = 0; - goto finish; - } - break; - case GL_RENDERBUFFER: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, (GLuint *)params) != 1) - { - params[0] = 0; - goto finish; - } - break; + switch (pname) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + params[0] = 0; + _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, + pname, &real_obj); + _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); + switch (fa_type) { + case GL_TEXTURE: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) { + params[0] = 0; + goto finish; } break; - default: - _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params); + case GL_RENDERBUFFER: + if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, + (GLuint *)params) != 1) { + params[0] = 0; + goto finish; + } break; + } + break; + default: + _orig_fastpath_glGetFramebufferAttachmentParameterivOES(target, attachment, + pname, params); + break; } goto finish; @@ -8050,8 +7762,7 @@ fastpath_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } @@ -8073,8 +7784,7 @@ fastpath_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } @@ -8096,8 +7806,7 @@ fastpath_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } @@ -8111,7 +7820,7 @@ finish: } void -fastpath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) +fastpath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) { GLuint real_obj; @@ -8119,8 +7828,7 @@ fastpath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } @@ -8134,7 +7842,7 @@ finish: } void -fastpath_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) +fastpath_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) { GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; @@ -8144,15 +7852,13 @@ fastpath_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) _orig_fastpath_glGetQueryivEXT(target, pname, params); - switch (pname) - { - case GL_CURRENT_QUERY: - if (params[0] != 0) - { - AST(GET_GLUE_OBJ(GL_OBJECT_TYPE_QUERY, params[0], &glue_obj_id) == 1); - params[0] = glue_obj_id; - } - break; + switch (pname) { + case GL_CURRENT_QUERY: + if (params[0] != 0) { + AST(GET_GLUE_OBJ(GL_OBJECT_TYPE_QUERY, params[0], &glue_obj_id) == 1); + params[0] = glue_obj_id; + } + break; } goto finish; @@ -8170,8 +7876,7 @@ fastpath_glBeginQueryEXT(GLenum target, GLuint id) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { // TODO : Begin - Context Switch _set_gl_error(GL_INVALID_OPERATION); goto finish; @@ -8186,7 +7891,7 @@ finish: } void -fastpath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) +fastpath_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) { int i; GLuint *objid_array = NULL; @@ -8195,8 +7900,7 @@ fastpath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -8209,15 +7913,16 @@ fastpath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (ids[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, ids[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_QUERY, ids[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, ids[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, + ids[i]) == 1); objid_array[real_n++] = real_objid; } @@ -8227,8 +7932,7 @@ fastpath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -8236,7 +7940,7 @@ finish: } void -fastpath_glGenQueriesEXT(GLsizei n, GLuint* ids) +fastpath_glGenQueriesEXT(GLsizei n, GLuint *ids) { int i; GLuint *objid_array = NULL; @@ -8245,8 +7949,7 @@ fastpath_glGenQueriesEXT(GLsizei n, GLuint* ids) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -8257,19 +7960,17 @@ fastpath_glGenQueriesEXT(GLsizei n, GLuint* ids) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenQueriesEXT(n, objid_array)) - { - for (i = 0; i < n; i++) - { - ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_QUERY, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenQueriesEXT(n, objid_array)) { + for (i = 0; i < n; i++) { + ids[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_QUERY, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -8286,8 +7987,7 @@ fastpath_glIsFramebufferOES(GLuint framebuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_FRAMEBUFFER, framebuffer, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -8311,8 +8011,7 @@ fastpath_glIsQueryEXT(GLuint id) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -8336,8 +8035,7 @@ fastpath_glIsRenderbufferOES(GLuint renderbuffer) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, renderbuffer, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -8358,14 +8056,15 @@ fastpath_glBlendEquationOES(GLenum mode) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - IF_GL_SUCCESS(_orig_fastpath_glBlendEquationOES(mode)) - { + IF_GL_SUCCESS(_orig_fastpath_glBlendEquationOES(mode)) { current_ctx->_blend_flag |= _BLEND_FLAG_BIT_gl_blend_equation_rgb | _BLEND_FLAG_BIT_gl_blend_equation_alpha; - _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint*) & (current_ctx->gl_blend_equation_rgb)); - _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint*) & (current_ctx->gl_blend_equation_alpha)); + _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_RGB, + (GLint *) & (current_ctx->gl_blend_equation_rgb)); + _orig_fastpath_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, + (GLint *) & (current_ctx->gl_blend_equation_alpha)); } goto finish; @@ -8382,10 +8081,8 @@ fastpath_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_blend_equation_rgb[0] != modeRGB) || - (current_ctx->gl_blend_equation_alpha[0] != modeAlpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glBlendEquationSeparateOES(modeRGB, modeAlpha)) - { + (current_ctx->gl_blend_equation_alpha[0] != modeAlpha)) { + IF_GL_SUCCESS(_orig_fastpath_glBlendEquationSeparateOES(modeRGB, modeAlpha)) { current_ctx->_blend_flag |= _BLEND_FLAG_BIT_gl_blend_equation_rgb | _BLEND_FLAG_BIT_gl_blend_equation_alpha; @@ -8401,7 +8098,8 @@ finish: } void -fastpath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +fastpath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha) { DEFINE_FASTPAH_GL_FUNC(); _COREGL_FASTPATH_FUNC_BEGIN(); @@ -8410,15 +8108,14 @@ fastpath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, G if ((current_ctx->gl_blend_src_rgb[0] != srcRGB) || (current_ctx->gl_blend_dst_rgb[0] != dstRGB) || (current_ctx->gl_blend_src_alpha[0] != srcAlpha) || - (current_ctx->gl_blend_dst_alpha[0] != dstAlpha)) - { - IF_GL_SUCCESS(_orig_fastpath_glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha)) - { + (current_ctx->gl_blend_dst_alpha[0] != dstAlpha)) { + IF_GL_SUCCESS(_orig_fastpath_glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, + dstAlpha)) { current_ctx->_blend_flag |= - _BLEND_FLAG_BIT_gl_blend_src_rgb | - _BLEND_FLAG_BIT_gl_blend_src_alpha | - _BLEND_FLAG_BIT_gl_blend_dst_rgb | - _BLEND_FLAG_BIT_gl_blend_dst_alpha; + _BLEND_FLAG_BIT_gl_blend_src_rgb | + _BLEND_FLAG_BIT_gl_blend_src_alpha | + _BLEND_FLAG_BIT_gl_blend_dst_rgb | + _BLEND_FLAG_BIT_gl_blend_dst_alpha; current_ctx->gl_blend_src_rgb[0] = srcRGB; current_ctx->gl_blend_dst_rgb[0] = dstRGB; @@ -8440,10 +8137,8 @@ fastpath_glPolygonOffsetxOES(GLfixed factor, GLfixed units) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_polygon_offset_factor[0] != factor) || - (current_ctx->gl_polygon_offset_units[0] != units)) - { - IF_GL_SUCCESS(_orig_fastpath_glPolygonOffsetxOES(factor, units)) - { + (current_ctx->gl_polygon_offset_units[0] != units)) { + IF_GL_SUCCESS(_orig_fastpath_glPolygonOffsetxOES(factor, units)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_polygon_offset_factor | _MISC_FLAG1_BIT_gl_polygon_offset_units; @@ -8465,10 +8160,8 @@ fastpath_glLineWidthxOES(GLfixed width) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_line_width, width) - { - IF_GL_SUCCESS(_orig_fastpath_glLineWidthxOES(width)) - { + CURR_STATE_COMPARE(gl_line_width, width) { + IF_GL_SUCCESS(_orig_fastpath_glLineWidthxOES(width)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_line_width; current_ctx->gl_line_width[0] = width; } @@ -8487,10 +8180,8 @@ fastpath_glSampleCoveragexOES(GLclampx value, GLboolean invert) INIT_FASTPATH_GL_FUNC(); if ((current_ctx->gl_sample_coverage_value[0] != value) || - (current_ctx->gl_sample_coverage_invert[0] != invert)) - { - IF_GL_SUCCESS(_orig_fastpath_glSampleCoveragexOES(value, invert)) - { + (current_ctx->gl_sample_coverage_invert[0] != invert)) { + IF_GL_SUCCESS(_orig_fastpath_glSampleCoveragexOES(value, invert)) { current_ctx->_misc_flag1 |= _MISC_FLAG1_BIT_gl_sample_coverage_value | _MISC_FLAG1_BIT_gl_sample_coverage_invert; @@ -8514,14 +8205,13 @@ fastpath_glQueryCounterEXT(GLuint id, GLenum target) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_QUERY, id, &real_obj) != 1) { // TODO : Begin - Context Switch _set_gl_error(GL_INVALID_OPERATION); goto finish; } - _orig_fastpath_glQueryCounterEXT(real_obj,target); + _orig_fastpath_glQueryCounterEXT(real_obj, target); goto finish; @@ -8530,7 +8220,7 @@ finish: } void -fastpath_glGenVertexArraysOES(GLsizei n, GLuint* arrays) +fastpath_glGenVertexArraysOES(GLsizei n, GLuint *arrays) { int i; GLuint *objid_array = NULL; @@ -8539,8 +8229,7 @@ fastpath_glGenVertexArraysOES(GLsizei n, GLuint* arrays) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -8551,19 +8240,17 @@ fastpath_glGenVertexArraysOES(GLsizei n, GLuint* arrays) objid_array = (GLuint *)calloc(1, sizeof(GLuint) * n); - IF_GL_SUCCESS(_orig_fastpath_glGenVertexArraysOES(n, objid_array)) - { - for (i = 0; i < n; i++) - { - arrays[i] = fastpath_ostate_create_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, objid_array[i]); + IF_GL_SUCCESS(_orig_fastpath_glGenVertexArraysOES(n, objid_array)) { + for (i = 0; i < n; i++) { + arrays[i] = fastpath_ostate_create_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_VERTEXARRAY, objid_array[i]); } } goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -8580,15 +8267,12 @@ fastpath_glBindVertexArrayOES(GLuint array) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) { _set_gl_error(GL_INVALID_OPERATION); goto finish; } - if (current_ctx->gl_vertex_array_binding[0] != real_obj) - { - IF_GL_SUCCESS(_orig_fastpath_glBindVertexArrayOES(real_obj)) - { + if (current_ctx->gl_vertex_array_binding[0] != real_obj) { + IF_GL_SUCCESS(_orig_fastpath_glBindVertexArrayOES(real_obj)) { current_ctx->_misc_flag3 |= _MISC_FLAG3_BIT_gl_vertex_array_binding; current_ctx->gl_vertex_array_binding[0] = real_obj; } @@ -8610,8 +8294,7 @@ fastpath_glIsVertexArrayOES(GLuint array) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) - { + if (GET_REAL_OBJ(GL_OBJECT_TYPE_VERTEXARRAY, array, &real_obj) != 1) { ret = GL_FALSE; goto finish; } @@ -8627,7 +8310,7 @@ finish: void -fastpath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) +fastpath_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) { int i; GLuint *objid_array = NULL; @@ -8636,8 +8319,7 @@ fastpath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - if (n < 0) - { + if (n < 0) { _set_gl_error(GL_INVALID_VALUE); goto finish; } @@ -8650,27 +8332,25 @@ fastpath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) { int real_n = 0; - for (i = 0; i < n; i++) - { + for (i = 0; i < n; i++) { int real_objid = _COREGL_INT_INIT_VALUE; if (arrays[i] == 0) continue; - real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]); + real_objid = fastpath_ostate_get_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]); if (real_objid == 0) continue; - AST(fastpath_ostate_remove_object(¤t_ctx->ostate, GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]) == 1); + AST(fastpath_ostate_remove_object(¤t_ctx->ostate, + GL_OBJECT_TYPE_VERTEXARRAY, arrays[i]) == 1); objid_array[real_n++] = real_objid; } - IF_GL_SUCCESS(_orig_fastpath_glDeleteVertexArraysOES(real_n, objid_array)) - { - for (i = 0; i < real_n; i++) - { + IF_GL_SUCCESS(_orig_fastpath_glDeleteVertexArraysOES(real_n, objid_array)) { + for (i = 0; i < real_n; i++) { General_Trace_List *current = NULL; current = current_ctx->ostate.shared->using_gctxs; - while (current != NULL) - { + while (current != NULL) { GLGlueContext *cur_gctx = (GLGlueContext *)current->value; if (cur_gctx->gl_vertex_array_binding[0] == objid_array[i]) @@ -8685,8 +8365,7 @@ fastpath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) goto finish; finish: - if (objid_array != NULL) - { + if (objid_array != NULL) { free(objid_array); objid_array = NULL; } @@ -8700,10 +8379,8 @@ fastpath_glClearDepthfOES(GLclampf depth) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_depth_clear_value, depth) - { - IF_GL_SUCCESS(_orig_fastpath_glClearDepthfOES(depth)) - { + CURR_STATE_COMPARE(gl_depth_clear_value, depth) { + IF_GL_SUCCESS(_orig_fastpath_glClearDepthfOES(depth)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_clear_value; current_ctx->gl_depth_clear_value[0] = depth; } @@ -8721,10 +8398,8 @@ fastpath_glClearDepthxOES(GLclampx depth) _COREGL_FASTPATH_FUNC_BEGIN(); INIT_FASTPATH_GL_FUNC(); - CURR_STATE_COMPARE(gl_depth_clear_value, depth) - { - IF_GL_SUCCESS(_orig_fastpath_glClearDepthxOES(depth)) - { + CURR_STATE_COMPARE(gl_depth_clear_value, depth) { + IF_GL_SUCCESS(_orig_fastpath_glClearDepthxOES(depth)) { current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_depth_clear_value; current_ctx->gl_depth_clear_value[0] = depth; } diff --git a/src/modules/fastpath/coregl_fastpath_state.h b/src/modules/fastpath/coregl_fastpath_state.h index 7126023..6ed7c15 100644 --- a/src/modules/fastpath/coregl_fastpath_state.h +++ b/src/modules/fastpath/coregl_fastpath_state.h @@ -26,223 +26,351 @@ } GLUE_STATE(GLuint, gl_num_draw_buffers, 1, 1, - _sym_glGetIntegerv(GL_MAX_DRAW_BUFFERS, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_MAX_DRAW_BUFFERS, (GLint *)value);) + _sym_glGetIntegerv(GL_MAX_DRAW_BUFFERS, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_MAX_DRAW_BUFFERS, (GLint *)value);) GLUE_STATE(GLuint, gl_num_tex_units, 1, 1, - _sym_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, (GLint *)value);) + _sym_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, (GLint *)value);) GLUE_STATE(GLuint, gl_num_vertex_attribs, 1, 1, - _sym_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, (GLint *)value);) + _sym_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, (GLint *)value);) GLUE_STATE(GLuint, gl_num_transform_feedback_separate_attribs, 1, 1, - _sym_glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, (GLint *)value);) + _sym_glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, (GLint *)value);) GLUE_STATE(GLuint, gl_num_uniform_buffer_bindings, 1, 1, - _sym_glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, (GLint *)value);) - -GLUE_STATE(GLuint, gl_array_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_ARRAY_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_copy_read_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_COPY_READ_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_copy_write_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_COPY_WRITE_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_element_array_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_pixel_pack_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_pixel_unpack_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_transform_feedback_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_uniform_buffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_UNIFORM_BUFFER_BINDING, (GLint *)value);) + _sym_glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, (GLint *)value);) + +GLUE_STATE(GLuint, gl_array_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_ARRAY_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_copy_read_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_COPY_READ_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_copy_write_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_COPY_WRITE_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_element_array_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_pixel_pack_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_pixel_unpack_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_transform_feedback_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_uniform_buffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_UNIFORM_BUFFER_BINDING, (GLint *)value);) _COREGL_START_API(COREGL_GLAPI_3) -GLUE_STATE(GLuint, gl_transform_feedback_buffer_binding_array, INITIAL_CTX->gl_num_transform_feedback_separate_attribs[0], MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, - _state_get_transform_feedback_buffer_bindings(value); /* DEFAULT NOT EFFECT */, - _state_get_transform_feedback_buffer_bindings(value);) - -GLUE_STATE(GLintptr, gl_transform_feedback_buffer_binding_array_offset, INITIAL_CTX->gl_num_transform_feedback_separate_attribs[0], MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, - _state_get_transform_feedback_buffer_bindings_offset(value); /* DEFAULT NOT EFFECT */, - _state_get_transform_feedback_buffer_bindings_offset(value);) - -GLUE_STATE(GLsizeiptr, gl_transform_feedback_buffer_binding_array_size, INITIAL_CTX->gl_num_transform_feedback_separate_attribs[0], MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, - _state_get_transform_feedback_buffer_bindings_size(value); /* DEFAULT NOT EFFECT */, - _state_get_transform_feedback_buffer_bindings_size(value);) - -GLUE_STATE(GLuint, gl_uniform_buffer_binding_array, INITIAL_CTX->gl_num_uniform_buffer_bindings[0], MAX_UNIFORM_BUFFER_BINDINGS, - _state_get_uniform_buffer_bindings(value); /* DEFAULT NOT EFFECT */, - _state_get_uniform_buffer_bindings(value);) - -GLUE_STATE(GLintptr, gl_uniform_buffer_binding_array_offset, INITIAL_CTX->gl_num_uniform_buffer_bindings[0], MAX_UNIFORM_BUFFER_BINDINGS, - _state_get_uniform_buffer_bindings_offset(value); /* DEFAULT NOT EFFECT */, - _state_get_uniform_buffer_bindings_offset(value);) - -GLUE_STATE(GLsizeiptr, gl_uniform_buffer_binding_array_size, INITIAL_CTX->gl_num_uniform_buffer_bindings[0], MAX_UNIFORM_BUFFER_BINDINGS, - _state_get_uniform_buffer_bindings_size(value); /* DEFAULT NOT EFFECT */, - _state_get_uniform_buffer_bindings_size(value);) +GLUE_STATE(GLuint, gl_transform_feedback_buffer_binding_array, + INITIAL_CTX->gl_num_transform_feedback_separate_attribs[0], + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, + _state_get_transform_feedback_buffer_bindings(value); /* DEFAULT NOT EFFECT */, + _state_get_transform_feedback_buffer_bindings(value);) + +GLUE_STATE(GLintptr, gl_transform_feedback_buffer_binding_array_offset, + INITIAL_CTX->gl_num_transform_feedback_separate_attribs[0], + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, + _state_get_transform_feedback_buffer_bindings_offset( + value); /* DEFAULT NOT EFFECT */, + _state_get_transform_feedback_buffer_bindings_offset(value);) + +GLUE_STATE(GLsizeiptr, gl_transform_feedback_buffer_binding_array_size, + INITIAL_CTX->gl_num_transform_feedback_separate_attribs[0], + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, + _state_get_transform_feedback_buffer_bindings_size( + value); /* DEFAULT NOT EFFECT */, + _state_get_transform_feedback_buffer_bindings_size(value);) + +GLUE_STATE(GLuint, gl_uniform_buffer_binding_array, + INITIAL_CTX->gl_num_uniform_buffer_bindings[0], MAX_UNIFORM_BUFFER_BINDINGS, + _state_get_uniform_buffer_bindings(value); /* DEFAULT NOT EFFECT */, + _state_get_uniform_buffer_bindings(value);) + +GLUE_STATE(GLintptr, gl_uniform_buffer_binding_array_offset, + INITIAL_CTX->gl_num_uniform_buffer_bindings[0], MAX_UNIFORM_BUFFER_BINDINGS, + _state_get_uniform_buffer_bindings_offset(value); /* DEFAULT NOT EFFECT */, + _state_get_uniform_buffer_bindings_offset(value);) + +GLUE_STATE(GLsizeiptr, gl_uniform_buffer_binding_array_size, + INITIAL_CTX->gl_num_uniform_buffer_bindings[0], MAX_UNIFORM_BUFFER_BINDINGS, + _state_get_uniform_buffer_bindings_size(value); /* DEFAULT NOT EFFECT */, + _state_get_uniform_buffer_bindings_size(value);) _COREGL_END_API(COREGL_GLAPI_3) -GLUE_STATE(GLuint, gl_framebuffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_framebuffer_binding_read, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING_ANGLE, (GLint *)value);) -GLUE_STATE(GLuint, gl_framebuffer_binding_draw, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING_ANGLE, (GLint *)value);) -GLUE_STATE(GLuint, gl_renderbuffer_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_RENDERBUFFER_BINDING, (GLint *)value);) - -GLUE_STATE(GLboolean, gl_blend, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_BLEND, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_cull_face, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_CULL_FACE, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_depth_test, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_DEPTH_TEST, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_dither, 1, 1, SET_1(GL_TRUE), _sym_glGetBooleanv(GL_DITHER, (GLboolean *)value);) - -GLUE_STATE(GLboolean, gl_polygon_offset_fill, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_POLYGON_OFFSET_FILL, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_sample_alpha_to_coverage, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_SAMPLE_ALPHA_TO_COVERAGE, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_sample_coverage, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_SAMPLE_COVERAGE, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_scissor_test, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_SCISSOR_TEST, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_stencil_test, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_STENCIL_TEST, (GLboolean *)value);) - -GLUE_STATE(GLboolean, gl_primitive_restart_fixed_index, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_PRIMITIVE_RESTART_FIXED_INDEX, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_rasterizer_discard, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_RASTERIZER_DISCARD, (GLboolean *)value);) +GLUE_STATE(GLuint, gl_framebuffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_framebuffer_binding_read, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING_ANGLE, (GLint *)value);) +GLUE_STATE(GLuint, gl_framebuffer_binding_draw, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING_ANGLE, (GLint *)value);) +GLUE_STATE(GLuint, gl_renderbuffer_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_RENDERBUFFER_BINDING, (GLint *)value);) + +GLUE_STATE(GLboolean, gl_blend, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_BLEND, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_cull_face, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_CULL_FACE, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_depth_test, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_DEPTH_TEST, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_dither, 1, 1, SET_1(GL_TRUE), + _sym_glGetBooleanv(GL_DITHER, (GLboolean *)value);) + +GLUE_STATE(GLboolean, gl_polygon_offset_fill, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_POLYGON_OFFSET_FILL, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_sample_alpha_to_coverage, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_SAMPLE_ALPHA_TO_COVERAGE, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_sample_coverage, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_SAMPLE_COVERAGE, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_scissor_test, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_SCISSOR_TEST, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_stencil_test, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_STENCIL_TEST, (GLboolean *)value);) + +GLUE_STATE(GLboolean, gl_primitive_restart_fixed_index, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_PRIMITIVE_RESTART_FIXED_INDEX, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_rasterizer_discard, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_RASTERIZER_DISCARD, (GLboolean *)value);) GLUE_STATE(GLint, gl_viewport, 4, 4, - _sym_glGetIntegerv(GL_VIEWPORT, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_VIEWPORT, (GLint *)value);) - -GLUE_STATE(GLuint, gl_current_program, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)value);) -GLUE_STATE(GLclampf, gl_color_clear_value, 4, 4, SET_4(0.0f, 0.0f, 0.0f, 0.0f), _sym_glGetFloatv(GL_COLOR_CLEAR_VALUE, (GLfloat *)value);) - -GLUE_STATE(GLboolean, gl_color_writemask, 4, 4, SET_4(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE), _sym_glGetBooleanv(GL_COLOR_WRITEMASK, (GLboolean *)value);) -GLUE_STATE(GLclampf, gl_depth_range, 2, 2, SET_2(0.0f, 1.0f), _sym_glGetFloatv(GL_DEPTH_RANGE, (GLfloat *)value);) -GLUE_STATE(GLclampf, gl_depth_clear_value, 1, 1, SET_1(1.0f), _sym_glGetFloatv(GL_DEPTH_CLEAR_VALUE, (GLfloat *)value);) -GLUE_STATE(GLenum, gl_depth_func, 1, 1, SET_1(GL_LESS), _sym_glGetIntegerv(GL_DEPTH_FUNC, (GLint *)value);) -GLUE_STATE(GLboolean, gl_depth_writemask, 1, 1, SET_1(GL_TRUE), _sym_glGetBooleanv(GL_DEPTH_WRITEMASK, (GLboolean *)value);) -GLUE_STATE(GLenum, gl_cull_face_mode, 1, 1, SET_1(GL_BACK), _sym_glGetIntegerv(GL_CULL_FACE_MODE, (GLint *)value);) - -GLUE_STATE(GLuint, gl_tex_2d_state, INITIAL_CTX->gl_num_tex_units[0], MAX_TEXTURE_UNITS, - SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), - _state_get_texture_states(GL_TEXTURE_BINDING_2D, (GLint *)value);) -GLUE_STATE(GLuint, gl_tex_3d_state, INITIAL_CTX->gl_num_tex_units[0], MAX_TEXTURE_UNITS, - SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), - _state_get_texture_states(GL_TEXTURE_BINDING_3D, (GLint *)value);) -GLUE_STATE(GLuint, gl_tex_2d_array_state, INITIAL_CTX->gl_num_tex_units[0], MAX_TEXTURE_UNITS, - SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), - _state_get_texture_states(GL_TEXTURE_BINDING_2D_ARRAY, (GLint *)value);) -GLUE_STATE(GLuint, gl_tex_cube_state, INITIAL_CTX->gl_num_tex_units[0], MAX_TEXTURE_UNITS, - SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), - _state_get_texture_states(GL_TEXTURE_BINDING_CUBE_MAP, (GLint *)value);) -GLUE_STATE(GLuint, gl_tex_external_oes_state, INITIAL_CTX->gl_num_tex_units[0], MAX_TEXTURE_UNITS, - SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), - _state_get_texture_states(GL_TEXTURE_EXTERNAL_OES, (GLint *)value);) - -GLUE_STATE(GLenum, gl_active_texture, 1, 1, SET_1(GL_TEXTURE0), _sym_glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint *)value)) -GLUE_STATE(GLenum, gl_generate_mipmap_hint, 1, 1, SET_1(GL_DONT_CARE), _sym_glGetIntegerv(GL_GENERATE_MIPMAP_HINT, (GLint *)value)) - -GLUE_STATE(GLclampf, gl_blend_color, 4, 4, SET_4(0.0f, 0.0f, 0.0f, 0.0f), _sym_glGetFloatv(GL_BLEND_COLOR, (GLfloat *)value);) -GLUE_STATE(GLenum, gl_blend_src_rgb, 1, 1, SET_1(GL_ONE), _sym_glGetIntegerv(GL_BLEND_SRC_RGB, (GLint *)value);) -GLUE_STATE(GLenum, gl_blend_src_alpha, 1, 1, SET_1(GL_ONE), _sym_glGetIntegerv(GL_BLEND_SRC_ALPHA, (GLint *)value);) -GLUE_STATE(GLenum, gl_blend_dst_rgb, 1, 1, SET_1(GL_ZERO), _sym_glGetIntegerv(GL_BLEND_DST_RGB, (GLint *)value);) -GLUE_STATE(GLenum, gl_blend_dst_alpha, 1, 1, SET_1(GL_ZERO), _sym_glGetIntegerv(GL_BLEND_DST_ALPHA, (GLint *)value);) -GLUE_STATE(GLenum, gl_blend_equation_rgb, 1, 1, SET_1(GL_FUNC_ADD), _sym_glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint *)value);) -GLUE_STATE(GLenum, gl_blend_equation_alpha, 1, 1, SET_1(GL_FUNC_ADD), _sym_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint *)value);) - - -GLUE_STATE(GLenum, gl_stencil_func, 1, 1, SET_1(GL_ALWAYS), _sym_glGetIntegerv(GL_STENCIL_FUNC, (GLint *)value);) -GLUE_STATE(GLint, gl_stencil_ref, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_STENCIL_REF, (GLint *)value);) + _sym_glGetIntegerv(GL_VIEWPORT, (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_VIEWPORT, (GLint *)value);) + +GLUE_STATE(GLuint, gl_current_program, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)value);) +GLUE_STATE(GLclampf, gl_color_clear_value, 4, 4, SET_4(0.0f, 0.0f, 0.0f, 0.0f), + _sym_glGetFloatv(GL_COLOR_CLEAR_VALUE, (GLfloat *)value);) + +GLUE_STATE(GLboolean, gl_color_writemask, 4, 4, SET_4(GL_TRUE, GL_TRUE, GL_TRUE, + GL_TRUE), _sym_glGetBooleanv(GL_COLOR_WRITEMASK, (GLboolean *)value);) +GLUE_STATE(GLclampf, gl_depth_range, 2, 2, SET_2(0.0f, 1.0f), + _sym_glGetFloatv(GL_DEPTH_RANGE, (GLfloat *)value);) +GLUE_STATE(GLclampf, gl_depth_clear_value, 1, 1, SET_1(1.0f), + _sym_glGetFloatv(GL_DEPTH_CLEAR_VALUE, (GLfloat *)value);) +GLUE_STATE(GLenum, gl_depth_func, 1, 1, SET_1(GL_LESS), + _sym_glGetIntegerv(GL_DEPTH_FUNC, (GLint *)value);) +GLUE_STATE(GLboolean, gl_depth_writemask, 1, 1, SET_1(GL_TRUE), + _sym_glGetBooleanv(GL_DEPTH_WRITEMASK, (GLboolean *)value);) +GLUE_STATE(GLenum, gl_cull_face_mode, 1, 1, SET_1(GL_BACK), + _sym_glGetIntegerv(GL_CULL_FACE_MODE, (GLint *)value);) + +GLUE_STATE(GLuint, gl_tex_2d_state, INITIAL_CTX->gl_num_tex_units[0], + MAX_TEXTURE_UNITS, + SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), + _state_get_texture_states(GL_TEXTURE_BINDING_2D, (GLint *)value);) +GLUE_STATE(GLuint, gl_tex_3d_state, INITIAL_CTX->gl_num_tex_units[0], + MAX_TEXTURE_UNITS, + SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), + _state_get_texture_states(GL_TEXTURE_BINDING_3D, (GLint *)value);) +GLUE_STATE(GLuint, gl_tex_2d_array_state, INITIAL_CTX->gl_num_tex_units[0], + MAX_TEXTURE_UNITS, + SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), + _state_get_texture_states(GL_TEXTURE_BINDING_2D_ARRAY, (GLint *)value);) +GLUE_STATE(GLuint, gl_tex_cube_state, INITIAL_CTX->gl_num_tex_units[0], + MAX_TEXTURE_UNITS, + SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), + _state_get_texture_states(GL_TEXTURE_BINDING_CUBE_MAP, (GLint *)value);) +GLUE_STATE(GLuint, gl_tex_external_oes_state, INITIAL_CTX->gl_num_tex_units[0], + MAX_TEXTURE_UNITS, + SET_N(INITIAL_CTX->gl_num_tex_units[0], 1, SET_1(0)), + _state_get_texture_states(GL_TEXTURE_EXTERNAL_OES, (GLint *)value);) + +GLUE_STATE(GLenum, gl_active_texture, 1, 1, SET_1(GL_TEXTURE0), + _sym_glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint *)value)) +GLUE_STATE(GLenum, gl_generate_mipmap_hint, 1, 1, SET_1(GL_DONT_CARE), + _sym_glGetIntegerv(GL_GENERATE_MIPMAP_HINT, (GLint *)value)) + +GLUE_STATE(GLclampf, gl_blend_color, 4, 4, SET_4(0.0f, 0.0f, 0.0f, 0.0f), + _sym_glGetFloatv(GL_BLEND_COLOR, (GLfloat *)value);) +GLUE_STATE(GLenum, gl_blend_src_rgb, 1, 1, SET_1(GL_ONE), + _sym_glGetIntegerv(GL_BLEND_SRC_RGB, (GLint *)value);) +GLUE_STATE(GLenum, gl_blend_src_alpha, 1, 1, SET_1(GL_ONE), + _sym_glGetIntegerv(GL_BLEND_SRC_ALPHA, (GLint *)value);) +GLUE_STATE(GLenum, gl_blend_dst_rgb, 1, 1, SET_1(GL_ZERO), + _sym_glGetIntegerv(GL_BLEND_DST_RGB, (GLint *)value);) +GLUE_STATE(GLenum, gl_blend_dst_alpha, 1, 1, SET_1(GL_ZERO), + _sym_glGetIntegerv(GL_BLEND_DST_ALPHA, (GLint *)value);) +GLUE_STATE(GLenum, gl_blend_equation_rgb, 1, 1, SET_1(GL_FUNC_ADD), + _sym_glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint *)value);) +GLUE_STATE(GLenum, gl_blend_equation_alpha, 1, 1, SET_1(GL_FUNC_ADD), + _sym_glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint *)value);) + + +GLUE_STATE(GLenum, gl_stencil_func, 1, 1, SET_1(GL_ALWAYS), + _sym_glGetIntegerv(GL_STENCIL_FUNC, (GLint *)value);) +GLUE_STATE(GLint, gl_stencil_ref, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_STENCIL_REF, (GLint *)value);) GLUE_STATE(GLuintmask, gl_stencil_value_mask, 1, 1, - _sym_glGetIntegerv(GL_STENCIL_VALUE_MASK, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_STENCIL_VALUE_MASK, (GLint *)value);) -GLUE_STATE(GLenum, gl_stencil_fail, 1, 1, SET_1(GL_KEEP), _sym_glGetIntegerv(GL_STENCIL_FAIL, (GLint *)value);) -GLUE_STATE(GLenum, gl_stencil_pass_depth_fail, 1, 1, SET_1(GL_KEEP), _sym_glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, (GLint *)value);) -GLUE_STATE(GLenum, gl_stencil_pass_depth_pass, 1, 1, SET_1(GL_KEEP), _sym_glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, (GLint *)value);) + _sym_glGetIntegerv(GL_STENCIL_VALUE_MASK, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_STENCIL_VALUE_MASK, (GLint *)value);) +GLUE_STATE(GLenum, gl_stencil_fail, 1, 1, SET_1(GL_KEEP), + _sym_glGetIntegerv(GL_STENCIL_FAIL, (GLint *)value);) +GLUE_STATE(GLenum, gl_stencil_pass_depth_fail, 1, 1, SET_1(GL_KEEP), + _sym_glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, (GLint *)value);) +GLUE_STATE(GLenum, gl_stencil_pass_depth_pass, 1, 1, SET_1(GL_KEEP), + _sym_glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, (GLint *)value);) GLUE_STATE(GLuintmask, gl_stencil_writemask, 1, 1, - _sym_glGetIntegerv(GL_STENCIL_WRITEMASK, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_STENCIL_WRITEMASK, (GLint *)value);) - -GLUE_STATE(GLenum, gl_stencil_back_func, 1, 1, SET_1(GL_ALWAYS), _sym_glGetIntegerv(GL_STENCIL_BACK_FUNC, (GLint *)value);) -GLUE_STATE(GLint, gl_stencil_back_ref, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_STENCIL_BACK_REF, (GLint *)value);) + _sym_glGetIntegerv(GL_STENCIL_WRITEMASK, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_STENCIL_WRITEMASK, (GLint *)value);) + +GLUE_STATE(GLenum, gl_stencil_back_func, 1, 1, SET_1(GL_ALWAYS), + _sym_glGetIntegerv(GL_STENCIL_BACK_FUNC, (GLint *)value);) +GLUE_STATE(GLint, gl_stencil_back_ref, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_STENCIL_BACK_REF, (GLint *)value);) GLUE_STATE(GLuintmask, gl_stencil_back_value_mask, 1, 1, - _sym_glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, (GLint *)value);) -GLUE_STATE(GLenum, gl_stencil_back_fail, 1, 1, SET_1(GL_KEEP), _sym_glGetIntegerv(GL_STENCIL_BACK_FAIL, (GLint *)value);) -GLUE_STATE(GLenum, gl_stencil_back_pass_depth_fail, 1, 1, SET_1(GL_KEEP), _sym_glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, (GLint *)value);) -GLUE_STATE(GLenum, gl_stencil_back_pass_depth_pass, 1, 1, SET_1(GL_KEEP), _sym_glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, (GLint *)value);) + _sym_glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, (GLint *)value);) +GLUE_STATE(GLenum, gl_stencil_back_fail, 1, 1, SET_1(GL_KEEP), + _sym_glGetIntegerv(GL_STENCIL_BACK_FAIL, (GLint *)value);) +GLUE_STATE(GLenum, gl_stencil_back_pass_depth_fail, 1, 1, SET_1(GL_KEEP), + _sym_glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, (GLint *)value);) +GLUE_STATE(GLenum, gl_stencil_back_pass_depth_pass, 1, 1, SET_1(GL_KEEP), + _sym_glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, (GLint *)value);) GLUE_STATE(GLuintmask, gl_stencil_back_writemask, 1, 1, - _sym_glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, (GLint *)value);) + _sym_glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, + (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, (GLint *)value);) -GLUE_STATE(GLint, gl_stencil_clear_value, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_STENCIL_CLEAR_VALUE, (GLint *)value);) +GLUE_STATE(GLint, gl_stencil_clear_value, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_STENCIL_CLEAR_VALUE, (GLint *)value);) // PIXEL FLAG 1 -GLUE_STATE(GLint, gl_pack_row_length, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PACK_ROW_LENGTH, (GLint *)value);) -GLUE_STATE(GLint, gl_pack_skip_rows, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PACK_SKIP_ROWS, (GLint *)value);) -GLUE_STATE(GLint, gl_pack_skip_pixels, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PACK_SKIP_PIXELS, (GLint *)value);) -GLUE_STATE(GLint, gl_pack_alignment, 1, 1, SET_1(4), _sym_glGetIntegerv(GL_PACK_ALIGNMENT, (GLint *)value);) +GLUE_STATE(GLint, gl_pack_row_length, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_PACK_ROW_LENGTH, (GLint *)value);) +GLUE_STATE(GLint, gl_pack_skip_rows, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_PACK_SKIP_ROWS, (GLint *)value);) +GLUE_STATE(GLint, gl_pack_skip_pixels, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_PACK_SKIP_PIXELS, (GLint *)value);) +GLUE_STATE(GLint, gl_pack_alignment, 1, 1, SET_1(4), + _sym_glGetIntegerv(GL_PACK_ALIGNMENT, (GLint *)value);) // PIXEL FLAG 2 -GLUE_STATE(GLint, gl_unpack_row_length, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_UNPACK_ROW_LENGTH, (GLint *)value);) -GLUE_STATE(GLint, gl_unpack_skip_rows, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_UNPACK_SKIP_ROWS, (GLint *)value);) -GLUE_STATE(GLint, gl_unpack_skip_pixels, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_UNPACK_SKIP_PIXELS, (GLint *)value);) -GLUE_STATE(GLint, gl_unpack_alignment, 1, 1, SET_1(4), _sym_glGetIntegerv(GL_UNPACK_ALIGNMENT, (GLint *)value);) -GLUE_STATE(GLint, gl_unpack_image_height, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, (GLint *)value);) -GLUE_STATE(GLint, gl_unpack_skip_images, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_UNPACK_SKIP_IMAGES, (GLint *)value);) +GLUE_STATE(GLint, gl_unpack_row_length, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_UNPACK_ROW_LENGTH, (GLint *)value);) +GLUE_STATE(GLint, gl_unpack_skip_rows, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_UNPACK_SKIP_ROWS, (GLint *)value);) +GLUE_STATE(GLint, gl_unpack_skip_pixels, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_UNPACK_SKIP_PIXELS, (GLint *)value);) +GLUE_STATE(GLint, gl_unpack_alignment, 1, 1, SET_1(4), + _sym_glGetIntegerv(GL_UNPACK_ALIGNMENT, (GLint *)value);) +GLUE_STATE(GLint, gl_unpack_image_height, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, (GLint *)value);) +GLUE_STATE(GLint, gl_unpack_skip_images, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_UNPACK_SKIP_IMAGES, (GLint *)value);) // MISC FLAG 1 -GLUE_STATE(GLenum, gl_front_face, 1, 1, SET_1(GL_CCW), _sym_glGetIntegerv(GL_FRONT_FACE, (GLint *)value);) -GLUE_STATE(GLfloat, gl_line_width, 1, 1, SET_1(1.0f), _sym_glGetFloatv(GL_LINE_WIDTH, (GLfloat *)value);) -GLUE_STATE(GLfloat, gl_polygon_offset_factor, 1, 1, SET_1(0.0f), _sym_glGetFloatv(GL_POLYGON_OFFSET_FACTOR, (GLfloat *)value);) -GLUE_STATE(GLfloat, gl_polygon_offset_units, 1, 1, SET_1(0.0f), _sym_glGetFloatv(GL_POLYGON_OFFSET_UNITS, (GLfloat *)value);) -GLUE_STATE(GLclampf, gl_sample_coverage_value, 1, 1, SET_1(1.0f), _sym_glGetFloatv(GL_SAMPLE_COVERAGE_VALUE, (GLfloat *)value);) -GLUE_STATE(GLboolean, gl_sample_coverage_invert, 1, 1, SET_1(GL_FALSE), _sym_glGetBooleanv(GL_SAMPLE_COVERAGE_INVERT, (GLboolean *)value);) -GLUE_STATE(GLenum, gl_fragment_shader_derivative_hint, 1, 1, SET_1(GL_DONT_CARE), _sym_glGetIntegerv(GL_FRAGMENT_SHADER_DERIVATIVE_HINT, (GLint *)value);) +GLUE_STATE(GLenum, gl_front_face, 1, 1, SET_1(GL_CCW), + _sym_glGetIntegerv(GL_FRONT_FACE, (GLint *)value);) +GLUE_STATE(GLfloat, gl_line_width, 1, 1, SET_1(1.0f), + _sym_glGetFloatv(GL_LINE_WIDTH, (GLfloat *)value);) +GLUE_STATE(GLfloat, gl_polygon_offset_factor, 1, 1, SET_1(0.0f), + _sym_glGetFloatv(GL_POLYGON_OFFSET_FACTOR, (GLfloat *)value);) +GLUE_STATE(GLfloat, gl_polygon_offset_units, 1, 1, SET_1(0.0f), + _sym_glGetFloatv(GL_POLYGON_OFFSET_UNITS, (GLfloat *)value);) +GLUE_STATE(GLclampf, gl_sample_coverage_value, 1, 1, SET_1(1.0f), + _sym_glGetFloatv(GL_SAMPLE_COVERAGE_VALUE, (GLfloat *)value);) +GLUE_STATE(GLboolean, gl_sample_coverage_invert, 1, 1, SET_1(GL_FALSE), + _sym_glGetBooleanv(GL_SAMPLE_COVERAGE_INVERT, (GLboolean *)value);) +GLUE_STATE(GLenum, gl_fragment_shader_derivative_hint, 1, 1, + SET_1(GL_DONT_CARE), _sym_glGetIntegerv(GL_FRAGMENT_SHADER_DERIVATIVE_HINT, + (GLint *)value);) // MISC FLAG 2 GLUE_STATE(GLint, gl_scissor_box, 4, 4, - _sym_glGetIntegerv(GL_SCISSOR_BOX, (GLint *)value); /* DEFAULT NOT EFFECT */, - _sym_glGetIntegerv(GL_SCISSOR_BOX, (GLint *)value);) - -GLUE_STATE(GLuint, gl_vertex_array_buf_id, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(0)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, (GLint *)value);)) -GLUE_STATE(GLint, gl_vertex_array_enabled, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, (GLint *)value);)) -GLUE_STATE(GLint, gl_vertex_array_size, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(4)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_SIZE, (GLint *)value);)) -GLUE_STATE(GLsizei, gl_vertex_array_stride, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_STRIDE, (GLint *)value);)) -GLUE_STATE(GLenum, gl_vertex_array_type, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FLOAT)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_TYPE, (GLint *)value);)) -GLUE_STATE(GLint, gl_vertex_array_normalized, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, (GLint *)value);)) -GLUE_STATE(GLint, gl_vertex_array_integer, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_INTEGER, (GLint *)value);)) -GLUE_STATE(GLuint, gl_vertex_array_divisor, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_DIVISOR, (GLint *)value);)) -GLUE_STATE(GLvoidptr, gl_vertex_array_pointer, INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(NULL)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribPointerv(i, GL_VERTEX_ATTRIB_ARRAY_POINTER, (GLvoidptr *)value);)) -GLUE_STATE(GLfloat, gl_vertex_attrib_value, 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, 1)), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, _sym_glGetVertexAttribfv(i, GL_CURRENT_VERTEX_ATTRIB, (GLfloat *)value);)) + _sym_glGetIntegerv(GL_SCISSOR_BOX, (GLint *)value); /* DEFAULT NOT EFFECT */, + _sym_glGetIntegerv(GL_SCISSOR_BOX, (GLint *)value);) + +GLUE_STATE(GLuint, gl_vertex_array_buf_id, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(0)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, (GLint *)value);)) +GLUE_STATE(GLint, gl_vertex_array_enabled, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_ENABLED, (GLint *)value);)) +GLUE_STATE(GLint, gl_vertex_array_size, INITIAL_CTX->gl_num_vertex_attribs[0], + MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(4)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_SIZE, (GLint *)value);)) +GLUE_STATE(GLsizei, gl_vertex_array_stride, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_STRIDE, (GLint *)value);)) +GLUE_STATE(GLenum, gl_vertex_array_type, INITIAL_CTX->gl_num_vertex_attribs[0], + MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FLOAT)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_TYPE, (GLint *)value);)) +GLUE_STATE(GLint, gl_vertex_array_normalized, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, (GLint *)value);)) +GLUE_STATE(GLint, gl_vertex_array_integer, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_INTEGER, (GLint *)value);)) +GLUE_STATE(GLuint, gl_vertex_array_divisor, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(GL_FALSE)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, _sym_glGetVertexAttribiv(i, + GL_VERTEX_ATTRIB_ARRAY_DIVISOR, (GLint *)value);)) +GLUE_STATE(GLvoidptr, gl_vertex_array_pointer, + INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, SET_1(NULL)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 1, + _sym_glGetVertexAttribPointerv(i, GL_VERTEX_ATTRIB_ARRAY_POINTER, + (GLvoidptr *)value);)) +GLUE_STATE(GLfloat, gl_vertex_attrib_value, + 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, 1)), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, _sym_glGetVertexAttribfv(i, + GL_CURRENT_VERTEX_ATTRIB, (GLfloat *)value);)) _COREGL_START_API(COREGL_GLAPI_3) -GLUE_STATE(GLint, gl_vertex_attrib_value_integer, 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_INT_FROM_FLOAT(1.0f))), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_INT_FROM_FLOAT(1.0f)))) -GLUE_STATE(GLuint, gl_vertex_attrib_value_unsigned_integer, 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_UINT_FROM_FLOAT(1.0f))), - SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, GET_INT_FROM_FLOAT(1.0f)))) +GLUE_STATE(GLint, gl_vertex_attrib_value_integer, + 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, + GET_INT_FROM_FLOAT(1.0f))), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, + GET_INT_FROM_FLOAT(1.0f)))) +GLUE_STATE(GLuint, gl_vertex_attrib_value_unsigned_integer, + 4 * INITIAL_CTX->gl_num_vertex_attribs[0], MAX_VERTEX_ATTRIBS, + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, + GET_UINT_FROM_FLOAT(1.0f))), + SET_N(INITIAL_CTX->gl_num_vertex_attribs[0], 4, SET_4(0, 0, 0, + GET_INT_FROM_FLOAT(1.0f)))) // MISC FLAG 3 -GLUE_STATE(GLenum, gl_read_buffer, 1, 1, SET_1(GL_BACK), _sym_glGetIntegerv(GL_READ_BUFFER, (GLint *)value);) +GLUE_STATE(GLenum, gl_read_buffer, 1, 1, SET_1(GL_BACK), + _sym_glGetIntegerv(GL_READ_BUFFER, (GLint *)value);) GLUE_STATE(GLenum, gl_draw_buffers, INITIAL_CTX->gl_num_draw_buffers[0], 16, - SET_1(GL_BACK); value++; SET_N(INITIAL_CTX->gl_num_draw_buffers[0] - 1, 1, SET_1(GL_NONE)), - _state_get_draw_buffers(value);) -GLUE_STATE(GLuint, gl_vertex_array_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_VERTEX_ARRAY_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_program_pipeline_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_PROGRAM_PIPELINE_BINDING, (GLint *)value);) -GLUE_STATE(GLuint, gl_transform_feedback_binding, 1, 1, SET_1(0), _sym_glGetIntegerv(GL_TRANSFORM_FEEDBACK_BINDING, (GLint *)value);) -GLUE_STATE(GLboolean, gl_transform_feedback_active, 1, 1, SET_1(0), _sym_glGetBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, (GLboolean *)value);) -GLUE_STATE(GLboolean, gl_transform_feedback_paused, 1, 1, SET_1(0), _sym_glGetBooleanv(GL_TRANSFORM_FEEDBACK_PAUSED, (GLboolean *)value);) + SET_1(GL_BACK); value++; + SET_N(INITIAL_CTX->gl_num_draw_buffers[0] - 1, 1, SET_1(GL_NONE)), + _state_get_draw_buffers(value);) +GLUE_STATE(GLuint, gl_vertex_array_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_VERTEX_ARRAY_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_program_pipeline_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_PROGRAM_PIPELINE_BINDING, (GLint *)value);) +GLUE_STATE(GLuint, gl_transform_feedback_binding, 1, 1, SET_1(0), + _sym_glGetIntegerv(GL_TRANSFORM_FEEDBACK_BINDING, (GLint *)value);) +GLUE_STATE(GLboolean, gl_transform_feedback_active, 1, 1, SET_1(0), + _sym_glGetBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, (GLboolean *)value);) +GLUE_STATE(GLboolean, gl_transform_feedback_paused, 1, 1, SET_1(0), + _sym_glGetBooleanv(GL_TRANSFORM_FEEDBACK_PAUSED, (GLboolean *)value);) _COREGL_END_API(COREGL_GLAPI_3) diff --git a/src/modules/tracepath/coregl_tracepath.c b/src/modules/tracepath/coregl_tracepath.c index 563088b..1ef736e 100644 --- a/src/modules/tracepath/coregl_tracepath.c +++ b/src/modules/tracepath/coregl_tracepath.c @@ -17,14 +17,12 @@ static int api_gl_version; #define TIMEVAL_INIT { 0, 0 } -struct _Trace_Data -{ +struct _Trace_Data { char name[MAX_TRACE_NAME_LENGTH]; struct _Trace_Data *next; }; -struct _Apicall_Data -{ +struct _Apicall_Data { struct _Trace_Data trace_data; int call_count; @@ -39,8 +37,7 @@ struct _Apicall_Data int traced; }; -struct _Memuse_Data -{ +struct _Memuse_Data { struct _Trace_Data trace_data; int memsize; @@ -48,8 +45,7 @@ struct _Memuse_Data int remove_count; }; -struct _Surface_Data -{ +struct _Surface_Data { struct _Trace_Data trace_data; GLDisplay display; @@ -64,8 +60,7 @@ struct _Surface_Data GLint tex_format; }; -typedef struct _GLGlueFakeContext -{ +typedef struct _GLGlueFakeContext { GLuint gl_num_draw_buffers[1]; GLuint gl_num_tex_units[1]; GLuint gl_num_vertex_attribs[1]; @@ -98,8 +93,7 @@ _state_get_texture_states(GLenum pname, GLint *params) _orig_tracepath_glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint *)&cur_active_tex); int i; - for (i = 0; i < initial_fake_ctx->gl_num_tex_units[0]; i++) - { + for (i = 0; i < initial_fake_ctx->gl_num_tex_units[0]; i++) { _orig_tracepath_glActiveTexture(GL_TEXTURE0 + i); _orig_tracepath_glGetIntegerv(pname, (GLint *)¶ms[i]); } @@ -112,8 +106,7 @@ _state_get_draw_buffers(GLenum *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_draw_buffers[0]; i++) - { + for (i = 0; i < initial_fake_ctx->gl_num_draw_buffers[0]; i++) { _orig_tracepath_glGetIntegerv(GL_DRAW_BUFFER0 + i, (GLint *)¶ms[i]); } } @@ -124,9 +117,10 @@ _state_get_transform_feedback_buffer_bindings(GLuint *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_transform_feedback_separate_attribs[0]; i++) - { - _orig_tracepath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_fake_ctx->gl_num_transform_feedback_separate_attribs[0]; + i++) { + _orig_tracepath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, i, + (GLint *)¶ms[i]); } } @@ -136,9 +130,10 @@ _state_get_transform_feedback_buffer_bindings_offset(GLintptr *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_transform_feedback_separate_attribs[0]; i++) - { - _orig_tracepath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_START, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_fake_ctx->gl_num_transform_feedback_separate_attribs[0]; + i++) { + _orig_tracepath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_START, i, + (GLint *)¶ms[i]); } } @@ -148,9 +143,10 @@ _state_get_transform_feedback_buffer_bindings_size(GLsizeiptr *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_transform_feedback_separate_attribs[0]; i++) - { - _orig_tracepath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_SIZE, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_fake_ctx->gl_num_transform_feedback_separate_attribs[0]; + i++) { + _orig_tracepath_glGetIntegeri_v(GL_TRANSFORM_FEEDBACK_BUFFER_SIZE, i, + (GLint *)¶ms[i]); } } @@ -160,8 +156,7 @@ _state_get_uniform_buffer_bindings(GLuint *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_uniform_buffer_bindings[0]; i++) - { + for (i = 0; i < initial_fake_ctx->gl_num_uniform_buffer_bindings[0]; i++) { ///////////////////////////////////////////////////////////////////////////////// // XXXX : AVOID SEGFAULT in ADRENO ((GLint *)params)[i] = 0; @@ -176,9 +171,9 @@ _state_get_uniform_buffer_bindings_offset(GLintptr *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_uniform_buffer_bindings[0]; i++) - { - _orig_tracepath_glGetIntegeri_v(GL_UNIFORM_BUFFER_START, i, (GLint *)¶ms[i]); + for (i = 0; i < initial_fake_ctx->gl_num_uniform_buffer_bindings[0]; i++) { + _orig_tracepath_glGetIntegeri_v(GL_UNIFORM_BUFFER_START, i, + (GLint *)¶ms[i]); } } @@ -188,8 +183,7 @@ _state_get_uniform_buffer_bindings_size(GLsizeiptr *params) AST(initial_fake_ctx != NULL); int i; - for (i = 0; i < initial_fake_ctx->gl_num_uniform_buffer_bindings[0]; i++) - { + for (i = 0; i < initial_fake_ctx->gl_num_uniform_buffer_bindings[0]; i++) { _orig_tracepath_glGetIntegeri_v(GL_UNIFORM_BUFFER_SIZE, i, (GLint *)¶ms[i]); } } @@ -200,8 +194,7 @@ init_modules_tracepath() { const char *output_file = NULL; output_file = get_env_setting("COREGL_LOG_FILE"); - if (strlen(output_file) > 0) - { + if (strlen(output_file) > 0) { trace_fp = fopen(output_file, "w"); } } @@ -217,17 +210,18 @@ init_modules_tracepath() #endif #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO trace_surface_flag = atoi(get_env_setting("COREGL_TRACE_SURFACE")); - trace_surface_sequence_sort_flag = atoi(get_env_setting("COREGL_TRACE_SURFACE_SEQUENCE_SORT")); - trace_surface_print_only_flag = atoi(get_env_setting("COREGL_TRACE_SURFACE_PRINT_ONLY")); + trace_surface_sequence_sort_flag = atoi( + get_env_setting("COREGL_TRACE_SURFACE_SEQUENCE_SORT")); + trace_surface_print_only_flag = atoi( + get_env_setting("COREGL_TRACE_SURFACE_PRINT_ONLY")); - { // COREGL_TRACE_SURFACE_FILTER_PERIOD=40~60 + { + // COREGL_TRACE_SURFACE_FILTER_PERIOD=40~60 char tmp[64 + 1] = { 0 }, *tmpp = NULL; strncpy(tmp, get_env_setting("COREGL_TRACE_SURFACE_FILTER_PERIOD"), 64); - for (tmpp = &tmp[0]; ; tmpp++) - { + for (tmpp = &tmp[0]; ; tmpp++) { if (*tmpp == 0x00) break; - if (*tmpp == '~') - { + if (*tmpp == '~') { *tmpp = 0x00; trace_surface_filter_period_begin = atoi(tmp); trace_surface_filter_period_end = atoi(tmpp + 1); @@ -236,56 +230,88 @@ init_modules_tracepath() } } - { // COREGL_TRACE_SURFACE_FILTER_TYPE=EGL|FBO + { + // COREGL_TRACE_SURFACE_FILTER_TYPE=EGL|FBO char tmp[64 + 1] = { 0 }; strncpy(tmp, get_env_setting("COREGL_TRACE_SURFACE_FILTER_TYPE"), 64); if (strcmp(tmp, "EGL") == 0) trace_surface_filter_type = 1; if (strcmp(tmp, "FBO") == 0) trace_surface_filter_type = 2; } - { // COREGL_TRACE_SURFACE_FILTER_HANDLE=0x3234 + { + // COREGL_TRACE_SURFACE_FILTER_HANDLE=0x3234 char tmp[64 + 1] = { 0 }, *tmpp = NULL; strncpy(tmp, get_env_setting("COREGL_TRACE_SURFACE_FILTER_HANDLE"), 64); - if (tmp[0] == '0' && tmp[1] == 'x') - { - for (tmpp = &tmp[2]; ; tmpp++) - { + if (tmp[0] == '0' && tmp[1] == 'x') { + for (tmpp = &tmp[2]; ; tmpp++) { if (*tmpp == 0x00) break; trace_surface_filter_handle *= 16; - switch (*tmpp) - { - case '1' : trace_surface_filter_handle += 1; break; - case '2' : trace_surface_filter_handle += 2; break; - case '3' : trace_surface_filter_handle += 3; break; - case '4' : trace_surface_filter_handle += 4; break; - case '5' : trace_surface_filter_handle += 5; break; - case '6' : trace_surface_filter_handle += 6; break; - case '7' : trace_surface_filter_handle += 7; break; - case '8' : trace_surface_filter_handle += 8; break; - case '9' : trace_surface_filter_handle += 9; break; - case 'A' : case 'a' : trace_surface_filter_handle += 10; break; - case 'B' : case 'b' : trace_surface_filter_handle += 11; break; - case 'C' : case 'c' : trace_surface_filter_handle += 12; break; - case 'D' : case 'd' : trace_surface_filter_handle += 13; break; - case 'E' : case 'e' : trace_surface_filter_handle += 14; break; - case 'F' : case 'f' : trace_surface_filter_handle += 15; break; + switch (*tmpp) { + case '1' : + trace_surface_filter_handle += 1; + break; + case '2' : + trace_surface_filter_handle += 2; + break; + case '3' : + trace_surface_filter_handle += 3; + break; + case '4' : + trace_surface_filter_handle += 4; + break; + case '5' : + trace_surface_filter_handle += 5; + break; + case '6' : + trace_surface_filter_handle += 6; + break; + case '7' : + trace_surface_filter_handle += 7; + break; + case '8' : + trace_surface_filter_handle += 8; + break; + case '9' : + trace_surface_filter_handle += 9; + break; + case 'A' : + case 'a' : + trace_surface_filter_handle += 10; + break; + case 'B' : + case 'b' : + trace_surface_filter_handle += 11; + break; + case 'C' : + case 'c' : + trace_surface_filter_handle += 12; + break; + case 'D' : + case 'd' : + trace_surface_filter_handle += 13; + break; + case 'E' : + case 'e' : + trace_surface_filter_handle += 14; + break; + case 'F' : + case 'f' : + trace_surface_filter_handle += 15; + break; } } - } - else - { + } else { trace_surface_filter_handle = atoi(tmp); } } - { // COREGL_TRACE_SURFACE_FILTER_SIZE=640x480 + { + // COREGL_TRACE_SURFACE_FILTER_SIZE=640x480 char tmp[64 + 1] = { 0 }, *tmpp = NULL; strncpy(tmp, get_env_setting("COREGL_TRACE_SURFACE_FILTER_SIZE"), 64); - for (tmpp = &tmp[0]; ; tmpp++) - { + for (tmpp = &tmp[0]; ; tmpp++) { if (*tmpp == 0x00) break; - if (*tmpp == 'x') - { + if (*tmpp == 'x') { *tmpp = 0x00; trace_surface_filter_size_w = atoi(tmp); trace_surface_filter_size_h = atoi(tmpp + 1); @@ -303,12 +329,10 @@ init_modules_tracepath() trace_state_flag = atoi(get_env_setting("COREGL_TRACE_STATE")); #endif - if (USE_TRACEPATH) - { + if (USE_TRACEPATH) { COREGL_LOG("[CoreGL] \E[40;32;1m \E[40;37;1m: "); - if (trace_api_flag == 1) - { + if (trace_api_flag == 1) { COREGL_LOG("\E[40;31;1m(API)\E[0m "); if (trace_api_all_flag == 1) COREGL_LOG("\E[40;31;1m(API-ALL)\E[0m "); if (trace_api_frame_flag == 1) COREGL_LOG("\E[40;31;1m(API-FRAME)\E[0m "); @@ -318,22 +342,30 @@ init_modules_tracepath() if (trace_ctx_force_flag == 1) COREGL_LOG("\E[40;33;1m(CONTEXT-FORCE)\E[0m "); } if (trace_state_flag == 1) COREGL_LOG("\E[40;36;1m(STATE)\E[0m "); - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { COREGL_LOG("\E[40;35;1m(MEM)\E[0m "); if (trace_mem_all_flag == 1) COREGL_LOG("\E[40;35;1m(MEM-ALL)\E[0m "); } if (trace_surface_flag == 1) { COREGL_LOG("\E[40;36;1m(SURFACE)\E[0m "); - if (trace_surface_sequence_sort_flag == 1) COREGL_LOG("\E[40;36;1m(SURFACE-SEQUENCE SORT)\E[0m "); - if (trace_surface_print_only_flag == 1) COREGL_LOG("\E[40;36;1m(PRINT ONLY)\E[0m "); - if (trace_surface_filter_period_begin != 0 || trace_surface_filter_period_end != 0) - COREGL_LOG("\E[40;36;1m(SURFACE-PERIOD:%d~%d)\E[0m ", trace_surface_filter_period_begin, trace_surface_filter_period_end); - if (trace_surface_filter_type == 1) COREGL_LOG("\E[40;36;1m(SURFACE-TYPE:EGL)\E[0m "); - if (trace_surface_filter_type == 2) COREGL_LOG("\E[40;36;1m(SURFACE-TYPE:FBO)\E[0m "); - if (trace_surface_filter_handle != 0) COREGL_LOG("\E[40;36;1m(SURFACE-HANDLE:0x%x(%d))\E[0m ", trace_surface_filter_handle, trace_surface_filter_handle); + if (trace_surface_sequence_sort_flag == 1) + COREGL_LOG("\E[40;36;1m(SURFACE-SEQUENCE SORT)\E[0m "); + if (trace_surface_print_only_flag == 1) + COREGL_LOG("\E[40;36;1m(PRINT ONLY)\E[0m "); + if (trace_surface_filter_period_begin != 0 || + trace_surface_filter_period_end != 0) + COREGL_LOG("\E[40;36;1m(SURFACE-PERIOD:%d~%d)\E[0m ", + trace_surface_filter_period_begin, trace_surface_filter_period_end); + if (trace_surface_filter_type == 1) + COREGL_LOG("\E[40;36;1m(SURFACE-TYPE:EGL)\E[0m "); + if (trace_surface_filter_type == 2) + COREGL_LOG("\E[40;36;1m(SURFACE-TYPE:FBO)\E[0m "); + if (trace_surface_filter_handle != 0) + COREGL_LOG("\E[40;36;1m(SURFACE-HANDLE:0x%x(%d))\E[0m ", + trace_surface_filter_handle, trace_surface_filter_handle); if (trace_surface_filter_size_w > 0 && trace_surface_filter_size_h > 0) - COREGL_LOG("\E[40;36;1m(SURFACE-SIZE:%dx%d)\E[0m ", trace_surface_filter_size_w, trace_surface_filter_size_h); + COREGL_LOG("\E[40;36;1m(SURFACE-SIZE:%dx%d)\E[0m ", trace_surface_filter_size_w, + trace_surface_filter_size_h); } COREGL_LOG("\E[40;37;1menabled\E[0m\n"); @@ -359,8 +391,7 @@ init_modules_tstate_tracepath(GLThreadState *tstate) void deinit_modules_tstate_tracepath(GLThreadState *tstate) { - if (tstate->module_data[MY_MODULE_ID] != NULL) - { + if (tstate->module_data[MY_MODULE_ID] != NULL) { free(tstate->module_data[MY_MODULE_ID]); tstate->module_data[MY_MODULE_ID] = NULL; } @@ -369,8 +400,7 @@ deinit_modules_tstate_tracepath(GLThreadState *tstate) void tracepath_apply_overrides() { - if (USE_TRACEPATH) - { + if (USE_TRACEPATH) { tracepath_apply_overrides_egl(1); tracepath_apply_overrides_gl(1); } @@ -415,18 +445,21 @@ tracepath_dump_context_states(int force_output) if (unlikely(trace_state_flag != 1)) return; - _sym_glGetIntegerv(GL_MAX_DRAW_BUFFERS, (GLint *)initial_fake_ctx->gl_num_draw_buffers); - _sym_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, (GLint *)initial_fake_ctx->gl_num_tex_units); - _sym_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, (GLint *)initial_fake_ctx->gl_num_vertex_attribs); - _sym_glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, (GLint *)initial_fake_ctx->gl_num_transform_feedback_separate_attribs); - _sym_glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, (GLint *)initial_fake_ctx->gl_num_uniform_buffer_bindings); - - if (!force_output) - { + _sym_glGetIntegerv(GL_MAX_DRAW_BUFFERS, + (GLint *)initial_fake_ctx->gl_num_draw_buffers); + _sym_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, + (GLint *)initial_fake_ctx->gl_num_tex_units); + _sym_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, + (GLint *)initial_fake_ctx->gl_num_vertex_attribs); + _sym_glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, + (GLint *)initial_fake_ctx->gl_num_transform_feedback_separate_attribs); + _sym_glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, + (GLint *)initial_fake_ctx->gl_num_uniform_buffer_bindings); + + if (!force_output) { struct timeval tv_now = { 0, 0 }; AST(gettimeofday(&tv_now, NULL) == 0); - if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) - { + if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) { goto finish; } tv_last = tv_now; @@ -434,7 +467,8 @@ tracepath_dump_context_states(int force_output) TRACE("\n"); TRACE("\E[0;40;34m===================================================================================================================\E[0m\n"); - TRACE("\E[40;32;1m State info \E[1;37;1m: (CURRENT BINDED CONTEXT)\E[0m\n", getpid()); + TRACE("\E[40;32;1m State info \E[1;37;1m: (CURRENT BINDED CONTEXT)\E[0m\n", + getpid()); TRACE("\E[0;40;34m===================================================================================================================\E[0m\n"); #define PRINTF_CHAR_GLenum "0x%8X" @@ -487,7 +521,8 @@ finish: static inline void -_add_timeval_period(struct timeval *tv_dst, struct timeval tv_now, struct timeval tv_old) +_add_timeval_period(struct timeval *tv_dst, struct timeval tv_now, + struct timeval tv_old) { tv_dst->tv_sec += tv_now.tv_sec - tv_old.tv_sec; tv_dst->tv_usec += 1000000 + (tv_now.tv_usec - tv_old.tv_usec); @@ -500,13 +535,10 @@ _add_timeval(struct timeval *tv_dst, struct timeval tv_src) { tv_dst->tv_sec += tv_src.tv_sec; tv_dst->tv_usec += tv_src.tv_usec; - if (tv_dst->tv_usec > 1000000) - { + if (tv_dst->tv_usec > 1000000) { tv_dst->tv_usec -= 1000000; tv_dst->tv_sec++; - } - else if (tv_dst->tv_usec < 0) - { + } else if (tv_dst->tv_usec < 0) { tv_dst->tv_usec += 1000000; tv_dst->tv_sec--; } @@ -515,7 +547,8 @@ _add_timeval(struct timeval *tv_dst, struct timeval tv_src) static inline double _get_timeval_period(struct timeval time_now, struct timeval time_old) { - return ((time_now.tv_sec - time_old.tv_sec) * 1000) + ((time_now.tv_usec - time_old.tv_usec) / 1000.0); + return ((time_now.tv_sec - time_old.tv_sec) * 1000) + (( + time_now.tv_usec - time_old.tv_usec) / 1000.0); } static inline double @@ -530,8 +563,7 @@ _generate_hash_short(const char *string) unsigned short hash = 0; int i; - for (i = 0; i < strlen(string); i++) - { + for (i = 0; i < strlen(string); i++) { hash = 253 * hash + string[i]; } return (hash ^ (hash >> 8)) % MAX_TRACE_TABLE_SIZE; @@ -551,31 +583,24 @@ _get_trace_data(Trace_Data **ftd_table, size_t td_size, const char *name) current = ftd_table[hash]; - while (current != NULL && current->next != NULL) - { + while (current != NULL && current->next != NULL) { if (strcmp(current->name, name) == 0) break; prev = current; current = current->next; } - if (current != NULL) - { + if (current != NULL) { ret = current; - } - else - { + } else { Trace_Data *newitm = NULL; newitm = (Trace_Data *)calloc(1, td_size); strcpy(newitm->name, name); newitm->next = NULL; - if (prev != NULL) - { + if (prev != NULL) { prev->next = newitm; - } - else - { + } else { ftd_table[hash] = newitm; } ret = newitm; @@ -592,16 +617,16 @@ tracepath_mem_trace_add(const char *desc, int alloc_size) { Memuse_Data *mtd = NULL; - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { AST(mutex_lock(&mtd_access_mutex) == 1); - if (mtd_table == NULL) - { - mtd_table = (Memuse_Data **)calloc(1, sizeof(Memuse_Data *) * MAX_TRACE_TABLE_SIZE); + if (mtd_table == NULL) { + mtd_table = (Memuse_Data **)calloc(1, + sizeof(Memuse_Data *) * MAX_TRACE_TABLE_SIZE); } - mtd = (Memuse_Data *)_get_trace_data((Trace_Data **)mtd_table, sizeof(Memuse_Data), desc); + mtd = (Memuse_Data *)_get_trace_data((Trace_Data **)mtd_table, + sizeof(Memuse_Data), desc); AST(mtd != NULL); @@ -625,16 +650,16 @@ tracepath_mem_trace_remove(const char *desc, int alloc_size) { Memuse_Data *mtd = NULL; - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { AST(mutex_lock(&mtd_access_mutex) == 1); - if (mtd_table == NULL) - { - mtd_table = (Memuse_Data **)calloc(1, sizeof(Memuse_Data *) * MAX_TRACE_TABLE_SIZE); + if (mtd_table == NULL) { + mtd_table = (Memuse_Data **)calloc(1, + sizeof(Memuse_Data *) * MAX_TRACE_TABLE_SIZE); } - mtd = (Memuse_Data *)_get_trace_data((Trace_Data **)mtd_table, sizeof(Memuse_Data), desc); + mtd = (Memuse_Data *)_get_trace_data((Trace_Data **)mtd_table, + sizeof(Memuse_Data), desc); AST(mtd != NULL); AST(mtd->memsize == alloc_size); @@ -650,36 +675,35 @@ tracepath_mem_trace_remove(const char *desc, int alloc_size) } void * -tracepath_api_trace_begin(const char *funcname, void *hint, int trace_total_time) +tracepath_api_trace_begin(const char *funcname, void *hint, + int trace_total_time) { Apicall_Data *ftd = NULL; struct timeval t = TIMEVAL_INIT; - if (trace_api_flag == 1) - { + if (trace_api_flag == 1) { AST(gettimeofday(&t, NULL) == 0); ftd = (Apicall_Data *)hint; - if (ftd == NULL) - { + if (ftd == NULL) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate == NULL) - { + if (tstate == NULL) { init_new_thread_state(); GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); } - if (tstate->ftd_table == NULL) - { - tstate->ftd_table = (Apicall_Data **)calloc(1, sizeof(Apicall_Data *) * MAX_TRACE_TABLE_SIZE); + if (tstate->ftd_table == NULL) { + tstate->ftd_table = (Apicall_Data **)calloc(1, + sizeof(Apicall_Data *) * MAX_TRACE_TABLE_SIZE); } - ftd = (Apicall_Data *)_get_trace_data((Trace_Data **)tstate->ftd_table, sizeof(Apicall_Data), funcname); + ftd = (Apicall_Data *)_get_trace_data((Trace_Data **)tstate->ftd_table, + sizeof(Apicall_Data), funcname); } AST(ftd != NULL); @@ -689,16 +713,13 @@ tracepath_api_trace_begin(const char *funcname, void *hint, int trace_total_time AST(gettimeofday(&ftd->last_time, NULL) == 0); - if (initial_time.tv_sec == 0) - { + if (initial_time.tv_sec == 0) { initial_time = ftd->last_time; last_initial_time = ftd->last_time; } - if (trace_total_time == 1) - { - if (last_trace_time.tv_sec != 0) - { + if (trace_total_time == 1) { + if (last_trace_time.tv_sec != 0) { _add_timeval_period(&other_elapsed_time, t, last_trace_time); last_trace_time.tv_sec = 0; } @@ -715,8 +736,7 @@ tracepath_api_trace_end(const char *funcname, void *hint, int trace_total_time) Apicall_Data *ftd = NULL; struct timeval t = TIMEVAL_INIT; - if (trace_api_flag == 1) - { + if (trace_api_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; struct timeval elapsed_time = TIMEVAL_INIT; @@ -724,12 +744,10 @@ tracepath_api_trace_end(const char *funcname, void *hint, int trace_total_time) ftd = (Apicall_Data *)hint; - if (ftd == NULL) - { + if (ftd == NULL) { GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate == NULL) - { + if (tstate == NULL) { init_new_thread_state(); GET_MY_TSTATE(tstate, get_current_thread_state()); @@ -739,7 +757,8 @@ tracepath_api_trace_end(const char *funcname, void *hint, int trace_total_time) AST(tstate != NULL); AST(tstate->ftd_table != NULL); - ftd = (Apicall_Data *)_get_trace_data((Trace_Data **)tstate->ftd_table, sizeof(Apicall_Data), funcname); + ftd = (Apicall_Data *)_get_trace_data((Trace_Data **)tstate->ftd_table, + sizeof(Apicall_Data), funcname); } AST(ftd != NULL); @@ -749,22 +768,19 @@ tracepath_api_trace_end(const char *funcname, void *hint, int trace_total_time) _add_timeval(&ftd->elapsed_time, elapsed_time); if (elapsed_time.tv_sec >= ftd->elapsed_time_max.tv_sec && - elapsed_time.tv_usec > ftd->elapsed_time_max.tv_usec) - { + elapsed_time.tv_usec > ftd->elapsed_time_max.tv_usec) { ftd->elapsed_time_max.tv_sec = elapsed_time.tv_sec; ftd->elapsed_time_max.tv_usec = elapsed_time.tv_usec; } ftd->last_time.tv_sec = 0; - if (trace_total_time == 1) - { + if (trace_total_time == 1) { _add_timeval(&ftd->total_elapsed_time, elapsed_time); AST(gettimeofday(&last_trace_time, NULL) == 0); - if (initial_time.tv_sec == 0) - { + if (initial_time.tv_sec == 0) { initial_time = t; last_initial_time = t; } @@ -796,17 +812,14 @@ tracepath_api_trace_output(int force_output) int i; - if (trace_api_flag != 1) - { + if (trace_api_flag != 1) { goto finish; } - if (!force_output) - { + if (!force_output) { struct timeval tv_now = TIMEVAL_INIT; AST(gettimeofday(&tv_now, NULL) == 0); - if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) - { + if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) { goto finish; } tv_last = tv_now; @@ -819,13 +832,13 @@ tracepath_api_trace_output(int force_output) last_initial_time = total_now; total_other_elapsed_time = _get_timeval(other_elapsed_time); - total_other_elapsed_time_period = _get_timeval_period(other_elapsed_time, traced_other_elapsed_time); + total_other_elapsed_time_period = _get_timeval_period(other_elapsed_time, + traced_other_elapsed_time); traced_other_elapsed_time = other_elapsed_time; tstate = get_current_thread_state(); - if (tstate == NULL) - { + if (tstate == NULL) { init_new_thread_state(); tstate = get_current_thread_state(); @@ -841,51 +854,53 @@ tracepath_api_trace_output(int force_output) { static Apicall_Data *trace_hint_swap = NULL; if (trace_hint_swap == NULL) - trace_hint_swap = (Apicall_Data *)_get_trace_data((Trace_Data **)ftd_table, sizeof(Apicall_Data), "tracepath_eglSwapBuffers"); + trace_hint_swap = (Apicall_Data *)_get_trace_data((Trace_Data **)ftd_table, + sizeof(Apicall_Data), "tracepath_eglSwapBuffers"); - if (trace_hint_swap != NULL && total_elapsed_time_period > 0) - { - swaps_per_sec = (trace_hint_swap->call_count - trace_hint_swap->last_call_count) / (total_elapsed_time_period / 1000); + if (trace_hint_swap != NULL && total_elapsed_time_period > 0) { + swaps_per_sec = (trace_hint_swap->call_count - + trace_hint_swap->last_call_count) / (total_elapsed_time_period / 1000); } } TRACE("\n"); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); - TRACE("\E[40;32;1m API call info \E[1;37;1m: Thread ID = 0x%x [Swaps per Second(P) = %7.2f]\E[0m\n", getpid(), tstate->thread_id, swaps_per_sec); + TRACE("\E[40;32;1m API call info \E[1;37;1m: Thread ID = 0x%x [Swaps per Second(P) = %7.2f]\E[0m\n", + getpid(), tstate->thread_id, swaps_per_sec); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); // highlighted - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (ftd_table[i] != NULL) - { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (ftd_table[i] != NULL) { Apicall_Data *current = ftd_table[i]; - while (current != NULL) - { + while (current != NULL) { double elapsed_time = _get_timeval(current->elapsed_time); double elapsed_time_per_call = elapsed_time / current->call_count; total_opengl_elapsed_time += _get_timeval(current->total_elapsed_time); - total_opengl_elapsed_time_period += _get_timeval(current->total_elapsed_time) - _get_timeval(current->last_total_elapsed_time); + total_opengl_elapsed_time_period += _get_timeval(current->total_elapsed_time) - + _get_timeval(current->last_total_elapsed_time); current->traced = 0; - if (current->call_count > current->last_call_count) - { - double elapsed_time_period = _get_timeval_period(current->elapsed_time, current->last_elapsed_time); + if (current->call_count > current->last_call_count) { + double elapsed_time_period = _get_timeval_period(current->elapsed_time, + current->last_elapsed_time); double elapsed_time_max = _get_timeval(current->elapsed_time_max); - double elapsed_time_per_call_period = elapsed_time_period / (current->call_count - current->last_call_count); + double elapsed_time_per_call_period = elapsed_time_period / + (current->call_count - current->last_call_count); char *fname = current->trace_data.name; if (!strncmp(fname, "tracepath_", 10)) fname = ¤t->trace_data.name[10]; - if (elapsed_time_per_call_period >= 0.01 || current->call_count - current->last_call_count > 1000) - { + if (elapsed_time_per_call_period >= 0.01 || + current->call_count - current->last_call_count > 1000) { TRACE("\E[40;37;1m %-39.39s : %10d call(s), %9.3f ms/API, %9.2f ms(MAX), %9.3f ms/API(P)\E[0m\n", - fname, current->call_count, elapsed_time_per_call, elapsed_time_max, elapsed_time_per_call_period); + fname, current->call_count, elapsed_time_per_call, elapsed_time_max, + elapsed_time_per_call_period); current->traced = 1; } } @@ -897,19 +912,14 @@ tracepath_api_trace_output(int force_output) { int fp_env = 0; fp_env = atoi(get_env_setting("COREGL_TRACE_API_ALL")); - if (fp_env == 1) - { + if (fp_env == 1) { // other - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (ftd_table[i] != NULL) - { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (ftd_table[i] != NULL) { Apicall_Data *current = ftd_table[i]; - while (current != NULL) - { - if (current->traced == 0 && current->call_count > 0) - { + while (current != NULL) { + if (current->traced == 0 && current->call_count > 0) { double elapsed_time = _get_timeval(current->elapsed_time); double elapsed_time_per_call = elapsed_time / current->call_count; double elapsed_time_max = _get_timeval(current->elapsed_time_max); @@ -930,8 +940,7 @@ tracepath_api_trace_output(int force_output) TRACE("\E[40;34m========================================================================================================================\E[0m\n"); - if (trace_api_frame_flag == 0) - { + if (trace_api_frame_flag == 0) { TRACE("\E[40;36;1m %-39.39s : %13.2f ms[%6.2f%%], %13.2f ms(P)[%6.2f%%]\E[0m\n", "TOTAL elapsed Time", total_elapsed_time, @@ -957,22 +966,22 @@ tracepath_api_trace_output(int force_output) TRACE("\E[40;36;1m %-39.39s : %13.2f ms[%6.2f%%], %13.2f ms(P)[%6.2f%%]\E[0m\n", "CoreGL API tracing overhead", total_elapsed_time - total_opengl_elapsed_time - total_other_elapsed_time, - (total_elapsed_time - total_opengl_elapsed_time - total_other_elapsed_time) * 100.0 / total_elapsed_time, - total_elapsed_time_period - total_opengl_elapsed_time_period - total_other_elapsed_time_period, - (total_elapsed_time_period - total_opengl_elapsed_time_period - total_other_elapsed_time_period) * 100.0 / total_elapsed_time_period); + (total_elapsed_time - total_opengl_elapsed_time - total_other_elapsed_time) * + 100.0 / total_elapsed_time, + total_elapsed_time_period - total_opengl_elapsed_time_period - + total_other_elapsed_time_period, + (total_elapsed_time_period - total_opengl_elapsed_time_period - + total_other_elapsed_time_period) * 100.0 / total_elapsed_time_period); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); } TRACE("\n"); - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (ftd_table[i] != NULL) - { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (ftd_table[i] != NULL) { Apicall_Data *current = ftd_table[i]; - while (current != NULL) - { + while (current != NULL) { current->last_call_count = current->call_count; current->last_elapsed_time = current->elapsed_time; current->last_total_elapsed_time = current->total_elapsed_time; @@ -998,15 +1007,13 @@ tracepath_api_trace_reset_frame() int i; - if (trace_api_flag != 1) - { + if (trace_api_flag != 1) { goto finish; } tstate = get_current_thread_state(); - if (tstate == NULL) - { + if (tstate == NULL) { init_new_thread_state(); tstate = get_current_thread_state(); @@ -1019,14 +1026,11 @@ tracepath_api_trace_reset_frame() ftd_table = tstate_tm->ftd_table; if (ftd_table == NULL) goto finish; - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (ftd_table[i] != NULL) - { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (ftd_table[i] != NULL) { Apicall_Data *current = ftd_table[i]; - while (current != NULL) - { + while (current != NULL) { current->call_count = 0; current->last_call_count = 0; current->elapsed_time.tv_sec = 0; @@ -1055,17 +1059,14 @@ tracepath_mem_trace_output(int force_output) int i; - if (trace_mem_flag != 1) - { + if (trace_mem_flag != 1) { goto finish; } - if (!force_output) - { + if (!force_output) { struct timeval tv_now = TIMEVAL_INIT; AST(gettimeofday(&tv_now, NULL) == 0); - if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) - { + if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) { goto finish; } tv_last = tv_now; @@ -1076,40 +1077,33 @@ tracepath_mem_trace_output(int force_output) TRACE("\E[40;32;1m Memory usage info \E[1;37;1m: \E[0m\n", getpid()); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); - if (mtd_table != NULL) - { - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (mtd_table[i] != NULL) - { + if (mtd_table != NULL) { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (mtd_table[i] != NULL) { Memuse_Data *current = mtd_table[i]; - while (current != NULL) - { + while (current != NULL) { int obj_count = current->alloc_count - current->remove_count; - if (obj_count > 0) - { + if (obj_count > 0) { TRACE("\E[40;37;1m %-46.46s : %12d byte(s)(E), %9d object(s) [%9d+/%9d-]\E[0m\n", - current->trace_data.name, current->memsize, obj_count, current->alloc_count, current->remove_count); + current->trace_data.name, current->memsize, obj_count, current->alloc_count, + current->remove_count); } current = (Memuse_Data *)current->trace_data.next; } } } - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (mtd_table[i] != NULL) - { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (mtd_table[i] != NULL) { Memuse_Data *current = mtd_table[i]; - while (current != NULL) - { + while (current != NULL) { int obj_count = current->alloc_count - current->remove_count; - if (obj_count == 0) - { + if (obj_count == 0) { TRACE(" %-46.46s : %12d byte(s)(E), %9d object(s) [%9d+/%9d-]\n", - current->trace_data.name, current->memsize, obj_count, current->alloc_count, current->remove_count); + current->trace_data.name, current->memsize, obj_count, current->alloc_count, + current->remove_count); } current = (Memuse_Data *)current->trace_data.next; } @@ -1133,48 +1127,49 @@ finish: void *png_lib_handle = NULL; png_structp (*dl_png_create_write_struct) (png_const_charp user_png_ver, - png_voidp error_ptr, - png_error_ptr error_fn, - png_error_ptr warn_fn); + png_voidp error_ptr, + png_error_ptr error_fn, + png_error_ptr warn_fn); void (*dl_png_destroy_write_struct) (png_structpp png_ptr_ptr, - png_infopp info_ptr_ptr); + png_infopp info_ptr_ptr); png_infop (*dl_png_create_info_struct) (png_structp png_ptr); void (*dl_png_init_io) (png_structp png_ptr, - png_FILE_p fp); + png_FILE_p fp); void (*dl_png_set_IHDR) (png_structp png_ptr, - png_infop info_ptr, - png_uint_32 width, - png_uint_32 height, - int bit_depth, - int color_type, - int interlace_method, - int compression_method, - int filter_method); + png_infop info_ptr, + png_uint_32 width, + png_uint_32 height, + int bit_depth, + int color_type, + int interlace_method, + int compression_method, + int filter_method); void (*dl_png_set_bKGD) (png_structp png_ptr, - png_infop info_ptr, - png_color_16p background); + png_infop info_ptr, + png_color_16p background); void (*dl_png_set_bgr) (png_structp png_ptr); void (*dl_png_write_info) (png_structp png_ptr, - png_infop info_ptr); + png_infop info_ptr); void (*dl_png_write_image) (png_structp png_ptr, - png_bytepp image); + png_bytepp image); void (*dl_png_write_end) (png_structp png_ptr, - png_infop info_ptr); + png_infop info_ptr); static void -_dump_surface(int force_output, int type, const char *position, Surface_Data *sdata) +_dump_surface(int force_output, int type, const char *position, + Surface_Data *sdata) { static int alldumpcount = 0; unsigned char *data = NULL; @@ -1186,8 +1181,7 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd png_byte **rows = NULL; GLenum ret_value = _COREGL_INT_INIT_VALUE; - if (!png_lib_handle) - { + if (!png_lib_handle) { png_lib_handle = dlopen("libpng16.so.16", RTLD_NOW); dl_png_create_write_struct = dlsym(png_lib_handle, "png_create_write_struct"); @@ -1216,19 +1210,21 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd dl_png_set_bgr == NULL || dl_png_write_info == NULL || dl_png_write_image == NULL || - dl_png_write_end == NULL) - { + dl_png_write_end == NULL) { COREGL_ERR("Can't trace surface : Failed to use libpng (recommend : 1.2.50-3.4)"); goto finish; } if (trace_surface_sequence_sort_flag == 1) - sprintf(name, "[%d (%06d)%p-%p] %s %04d (%s).png", getpid(), alldumpcount, sdata->display, sdata->context, sdata->trace_data.name, sdata->dump_count, position); + sprintf(name, "[%d (%06d)%p-%p] %s %04d (%s).png", getpid(), alldumpcount, + sdata->display, sdata->context, sdata->trace_data.name, sdata->dump_count, + position); else - sprintf(name, "[%d %p-%p] %s %04d (%s).png", getpid(), sdata->display, sdata->context, sdata->trace_data.name, sdata->dump_count, position); + sprintf(name, "[%d %p-%p] %s %04d (%s).png", getpid(), sdata->display, + sdata->context, sdata->trace_data.name, sdata->dump_count, position); - if (!strncmp(sdata->trace_data.name, "EGL", 3) && type != 2) - { // EGL + if (!strncmp(sdata->trace_data.name, "EGL", 3) && type != 2) { + // EGL if (trace_surface_filter_type != 0 && trace_surface_filter_type != 1) goto finish;; @@ -1237,13 +1233,20 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd EGLConfig eglconfig; GLint asize, rsize, gsize, bsize; - _orig_tracepath_eglQuerySurface(sdata->display, sdata->surface, EGL_WIDTH, &width); - _orig_tracepath_eglQuerySurface(sdata->display, sdata->surface, EGL_HEIGHT, &height); - _orig_tracepath_eglQuerySurface(sdata->display, sdata->surface, EGL_CONFIG_ID, (GLint *)&eglconfig); - _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_ALPHA_SIZE, &asize); - _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_RED_SIZE, &rsize); - _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_GREEN_SIZE, &gsize); - _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_BLUE_SIZE, &bsize); + _orig_tracepath_eglQuerySurface(sdata->display, sdata->surface, EGL_WIDTH, + &width); + _orig_tracepath_eglQuerySurface(sdata->display, sdata->surface, EGL_HEIGHT, + &height); + _orig_tracepath_eglQuerySurface(sdata->display, sdata->surface, EGL_CONFIG_ID, + (GLint *)&eglconfig); + _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_ALPHA_SIZE, + &asize); + _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_RED_SIZE, + &rsize); + _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_GREEN_SIZE, + &gsize); + _orig_tracepath_eglGetConfigAttrib(sdata->display, eglconfig, EGL_BLUE_SIZE, + &bsize); channel = 4; if (asize == 0) channel = 3; if (bsize == 0) channel = 2; @@ -1256,9 +1259,10 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd (trace_surface_filter_size_w != width || trace_surface_filter_size_h != height)) goto finish; - if ((trace_surface_filter_period_begin > 0 || trace_surface_filter_period_end > 0) && - (trace_surface_filter_period_begin > alldumpcount || trace_surface_filter_period_end < alldumpcount)) - { + if ((trace_surface_filter_period_begin > 0 || + trace_surface_filter_period_end > 0) && + (trace_surface_filter_period_begin > alldumpcount || + trace_surface_filter_period_end < alldumpcount)) { alldumpcount++; sdata->dump_count++; goto finish; @@ -1266,17 +1270,17 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd if (channel == 3) channel = 4; - TRACE("\E[40;31;1m[[TRACE SURFACE]] : '%s' is dumped (%dx%dx%d).\E[0m\n", name, width, height, channel); - if (trace_surface_print_only_flag == 1 && force_output == 0) - { + TRACE("\E[40;31;1m[[TRACE SURFACE]] : '%s' is dumped (%dx%dx%d).\E[0m\n", name, + width, height, channel); + if (trace_surface_print_only_flag == 1 && force_output == 0) { alldumpcount++; sdata->dump_count++; goto finish; } - data = (unsigned char *)calloc(1, width * height * channel * sizeof(unsigned char)); - if (data == NULL) - { + data = (unsigned char *)calloc(1, + width * height * channel * sizeof(unsigned char)); + if (data == NULL) { COREGL_ERR("Can't trace surface : Failed to allocate memory"); goto finish; } @@ -1285,17 +1289,22 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb); _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, 0); - switch (channel) - { - case 4: _orig_tracepath_glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); break; + switch (channel) { + case 4: + _orig_tracepath_glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, + data); + break; //case 3: _orig_tracepath_glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, data); break; - case 1: _orig_tracepath_glReadPixels(0, 0, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, data); break; + case 1: + _orig_tracepath_glReadPixels(0, 0, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, + data); + break; } _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, oldfb); } - if (!strncmp(sdata->trace_data.name, "FBO", 3) && type != 1) - { // FBO + if (!strncmp(sdata->trace_data.name, "FBO", 3) && type != 1) { + // FBO if (sdata->fbo == 0) goto finish; if (trace_surface_filter_type != 0 && @@ -1309,12 +1318,11 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb); _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, sdata->fbo); - if(driver_gl_version >=2) + if (driver_gl_version >= 2) ret_value = _orig_tracepath_glCheckFramebufferStatus(GL_FRAMEBUFFER); else ret_value = _orig_tracepath_glCheckFramebufferStatusOES(GL_FRAMEBUFFER); - if (ret_value == GL_FRAMEBUFFER_COMPLETE) - { + if (ret_value == GL_FRAMEBUFFER_COMPLETE) { _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, oldfb); width = sdata->tex_w; height = sdata->tex_h; @@ -1326,17 +1334,18 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd (trace_surface_filter_size_w != width || trace_surface_filter_size_h != height)) goto finish; - if ((trace_surface_filter_period_begin > 0 || trace_surface_filter_period_end > 0) && - (trace_surface_filter_period_begin > alldumpcount || trace_surface_filter_period_end < alldumpcount)) - { + if ((trace_surface_filter_period_begin > 0 || + trace_surface_filter_period_end > 0) && + (trace_surface_filter_period_begin > alldumpcount || + trace_surface_filter_period_end < alldumpcount)) { alldumpcount++; sdata->dump_count++; goto finish; } - TRACE("\E[40;31;1m[[TRACE SURFACE]] : '%s' is dumped (%dx%dx%d).\E[0m\n", name, width, height, channel); - if (trace_surface_print_only_flag == 1 && force_output == 0) - { + TRACE("\E[40;31;1m[[TRACE SURFACE]] : '%s' is dumped (%dx%dx%d).\E[0m\n", name, + width, height, channel); + if (trace_surface_print_only_flag == 1 && force_output == 0) { alldumpcount++; sdata->dump_count++; goto finish; @@ -1344,40 +1353,48 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd if (channel == 3) channel = 4; - data = (unsigned char *)calloc(1, width * height * channel * sizeof(unsigned char)); - if (data == NULL) - { + data = (unsigned char *)calloc(1, + width * height * channel * sizeof(unsigned char)); + if (data == NULL) { COREGL_ERR("Can't trace surface : Failed to allocate memory"); goto finish; } _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, sdata->fbo); int atttype = _COREGL_INT_INIT_VALUE; - if(driver_gl_version >=2) - _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); + if (driver_gl_version >= 2) + _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); else - _orig_tracepath_glGetFramebufferAttachmentParameterivOES(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); + _orig_tracepath_glGetFramebufferAttachmentParameterivOES(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); AST(atttype != sdata->tex); int attname = _COREGL_INT_INIT_VALUE; - if(driver_gl_version >=2) - _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); + if (driver_gl_version >= 2) + _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); else - _orig_tracepath_glGetFramebufferAttachmentParameterivOES(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); - switch (atttype) - { - case GL_TEXTURE: - AST(attname == sdata->tex); - break; - case GL_RENDERBUFFER: - AST(attname == sdata->rb); - break; + _orig_tracepath_glGetFramebufferAttachmentParameterivOES(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); + switch (atttype) { + case GL_TEXTURE: + AST(attname == sdata->tex); + break; + case GL_RENDERBUFFER: + AST(attname == sdata->rb); + break; } - switch (channel) - { - case 4: _orig_tracepath_glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); break; + switch (channel) { + case 4: + _orig_tracepath_glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, + data); + break; //case 3: _orig_tracepath_glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, data); break; - case 1: _orig_tracepath_glReadPixels(0, 0, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, data); break; + case 1: + _orig_tracepath_glReadPixels(0, 0, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, + data); + break; } } _orig_tracepath_glBindFramebuffer(GL_FRAMEBUFFER, oldfb); @@ -1390,48 +1407,48 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd unlink(name); write_fd = fopen(name, "wb"); - if (write_fd == NULL) - { + if (write_fd == NULL) { COREGL_ERR("Can't trace surface : Failed to create png file"); goto finish; } rows = (png_byte **)malloc(height * sizeof(png_byte *)); - if (rows == NULL) - { + if (rows == NULL) { COREGL_ERR("Can't trace surface : Failed to allocate memory"); goto finish; } - for (int i = 0; i < height; i++) - { + for (int i = 0; i < height; i++) { rows[i] = data + (height - i - 1) * (width * channel); } png = dl_png_create_write_struct(PNG_LIBPNG_VER_STRING, - NULL, - NULL, - NULL); - if (png == NULL) - { + NULL, + NULL, + NULL); + if (png == NULL) { COREGL_ERR("Can't trace surface : Failed to create write structure of png file"); goto finish; } info = dl_png_create_info_struct(png); - if (info == NULL) - { + if (info == NULL) { COREGL_ERR("Can't trace surface : Failed to create info structure of png file"); goto finish; } dl_png_init_io(png, write_fd); - switch (channel) - { - case 4: dl_png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); break; + switch (channel) { + case 4: + dl_png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_RGB_ALPHA, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + break; //case 3: dl_png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); break; - case 1: dl_png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); break; + case 1: + dl_png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_GRAY, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + break; } dl_png_write_info(png, info); @@ -1449,54 +1466,49 @@ _dump_surface(int force_output, int type, const char *position, Surface_Data *sd goto finish; finish: - if (data != NULL) - { + if (data != NULL) { free(data); data = NULL; } - if (write_fd != NULL) - { + if (write_fd != NULL) { fclose(write_fd); write_fd = NULL; } - if (rows != NULL) - { + if (rows != NULL) { free(rows); rows = NULL; } - if (png != NULL) - { - if (info != NULL) - { + if (png != NULL) { + if (info != NULL) { dl_png_destroy_write_struct(&png, &info); info = NULL; - } - else + } else dl_png_destroy_write_struct(&png, NULL); png = NULL; } } void -tracepath_surface_trace_add(const char *desc, GLDisplay dpy, GLContext ctx, GLSurface surf, GLint fbo, GLint tex, GLint rb, GLint tex_w, GLint tex_h, GLint tex_format, const char *dump) +tracepath_surface_trace_add(const char *desc, GLDisplay dpy, GLContext ctx, + GLSurface surf, GLint fbo, GLint tex, GLint rb, GLint tex_w, GLint tex_h, + GLint tex_format, const char *dump) { Surface_Data *std = NULL; - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { AST(mutex_lock(&std_access_mutex) == 1); - if (std_table == NULL) - { - std_table = (Surface_Data **)calloc(1, sizeof(Surface_Data *) * MAX_TRACE_TABLE_SIZE); + if (std_table == NULL) { + std_table = (Surface_Data **)calloc(1, + sizeof(Surface_Data *) * MAX_TRACE_TABLE_SIZE); } - std = (Surface_Data *)_get_trace_data((Trace_Data **)std_table, sizeof(Surface_Data), desc); + std = (Surface_Data *)_get_trace_data((Trace_Data **)std_table, + sizeof(Surface_Data), desc); AST(std != NULL); - if (dump != NULL) - { + if (dump != NULL) { _dump_surface(0, 0, dump, std); } @@ -1521,32 +1533,27 @@ tracepath_surface_trace(int force_output, int type, const char *position) { int i; - if (trace_surface_flag != 1) - { + if (trace_surface_flag != 1) { goto finish; } AST(mutex_lock(&std_access_mutex) == 1); - if (std_table != NULL) - { + if (std_table != NULL) { EGLDisplay olddpy = _orig_tracepath_eglGetCurrentDisplay(); EGLContext oldctx = _orig_tracepath_eglGetCurrentContext(); EGLSurface oldsurf_read = _orig_tracepath_eglGetCurrentSurface(EGL_READ); EGLSurface oldsurf_draw = _orig_tracepath_eglGetCurrentSurface(EGL_DRAW); - for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) - { - if (std_table[i] != NULL) - { + for (i = 0; i < MAX_TRACE_TABLE_SIZE; i++) { + if (std_table[i] != NULL) { Surface_Data *current = std_table[i]; - while (current != NULL) - { - if (current->surface != EGL_NO_SURFACE && current->display != EGL_NO_DISPLAY && current->context != EGL_NO_CONTEXT) - { - if (_orig_tracepath_eglMakeCurrent(current->display, current->surface, current->surface, current->context) == EGL_TRUE) - { + while (current != NULL) { + if (current->surface != EGL_NO_SURFACE && current->display != EGL_NO_DISPLAY && + current->context != EGL_NO_CONTEXT) { + if (_orig_tracepath_eglMakeCurrent(current->display, current->surface, + current->surface, current->context) == EGL_TRUE) { _dump_surface(force_output, type, position, current); } } @@ -1563,8 +1570,8 @@ tracepath_surface_trace(int force_output, int type, const char *position) goto finish; - finish: - return; +finish: + return; } diff --git a/src/modules/tracepath/coregl_tracepath.h b/src/modules/tracepath/coregl_tracepath.h index 4acedf4..78b8e5a 100644 --- a/src/modules/tracepath/coregl_tracepath.h +++ b/src/modules/tracepath/coregl_tracepath.h @@ -1,149 +1,154 @@ -#ifndef COREGL_TRACEPATH_H -#define COREGL_TRACEPATH_H - -#include "../coregl_module.h" - -#ifndef COREGL_USE_MODULE_TRACEPATH -#error "COREGL_USE_MODULE_TRACEPATH must defined!!!" -#endif - -#define MY_MODULE_ID COREGL_MODULE_TRACEPATH -#define MY_MODULE_TSTATE Tracepath_ThreadState - -#include "../../coregl_internal.h" -#include "../../coregl_export.h" - -#define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) extern RET_TYPE (*_orig_tracepath_##FUNC_NAME) PARAM_LIST; -# include "../../headers/sym.h" -#undef _COREGL_SYMBOL - -// Symbol definition for tracepath -#define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) extern RET_TYPE (tracepath_##FUNC_NAME) PARAM_LIST; -# include "../../headers/sym.h" -#undef _COREGL_SYMBOL - +#ifndef COREGL_TRACEPATH_H +#define COREGL_TRACEPATH_H + +#include "../coregl_module.h" + +#ifndef COREGL_USE_MODULE_TRACEPATH +#error "COREGL_USE_MODULE_TRACEPATH must defined!!!" +#endif + +#define MY_MODULE_ID COREGL_MODULE_TRACEPATH +#define MY_MODULE_TSTATE Tracepath_ThreadState + +#include "../../coregl_internal.h" +#include "../../coregl_export.h" + +#define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) extern RET_TYPE (*_orig_tracepath_##FUNC_NAME) PARAM_LIST; +# include "../../headers/sym.h" +#undef _COREGL_SYMBOL + +// Symbol definition for tracepath +#define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) extern RET_TYPE (tracepath_##FUNC_NAME) PARAM_LIST; +# include "../../headers/sym.h" +#undef _COREGL_SYMBOL + #define MAX_TRACE_NAME_LENGTH 256 #define MAX_TRACE_TABLE_SIZE 65536 - -#define COREGL_TRACEPATH_TRACE_ALL - -#ifdef COREGL_TRACEPATH_TRACE_ALL -#define COREGL_TRACEPATH_TRACE_CONTEXT_INFO // Context state & thread state & Glue-context info -#define COREGL_TRACEPATH_TRACE_STATE_INFO // Glue-context state info -#define COREGL_TRACEPATH_TRACE_APICALL_INFO // API call frequency & each frame call info -#define COREGL_TRACEPATH_TRACE_MEMUSE_INFO // Memory usage info -#define COREGL_TRACEPATH_TRACE_SURFACE_INFO // Surface dump info + +#define COREGL_TRACEPATH_TRACE_ALL + +#ifdef COREGL_TRACEPATH_TRACE_ALL +#define COREGL_TRACEPATH_TRACE_CONTEXT_INFO // Context state & thread state & Glue-context info +#define COREGL_TRACEPATH_TRACE_STATE_INFO // Glue-context state info +#define COREGL_TRACEPATH_TRACE_APICALL_INFO // API call frequency & each frame call info +#define COREGL_TRACEPATH_TRACE_MEMUSE_INFO // Memory usage info +#define COREGL_TRACEPATH_TRACE_SURFACE_INFO // Surface dump info #endif -#ifdef COREGL_TRACEPATH_TRACE_APICALL_INFO +#ifdef COREGL_TRACEPATH_TRACE_APICALL_INFO # define _COREGL_TRACE_API_BEGIN(api, hint, trace_total_time) \ - tracepath_api_trace_begin(api, hint, trace_total_time); + tracepath_api_trace_begin(api, hint, trace_total_time); # define _COREGL_TRACE_API_END(api, hint, trace_total_time) \ - tracepath_api_trace_end(api, hint, trace_total_time); + tracepath_api_trace_end(api, hint, trace_total_time); # define _COREGL_TRACE_API_OUTPUT(force_output) \ - tracepath_api_trace_output(force_output); -# define _COREGL_TRACE_API_RESET_FRAME() \ - tracepath_api_trace_reset_frame(); + tracepath_api_trace_output(force_output); +# define _COREGL_TRACE_API_RESET_FRAME() \ + tracepath_api_trace_reset_frame(); #else # define _COREGL_TRACE_API_BEGIN(api, hint, trace_total_time) NULL; # define _COREGL_TRACE_API_END(api, hint, trace_total_time) # define _COREGL_TRACE_API_OUTPUT(force_output) -# define _COREGL_TRACE_API_RESET_FRAME() +# define _COREGL_TRACE_API_RESET_FRAME() #endif - -#ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO -# define _COREGL_TRACE_MEM_ADD(desc, alloc_size) \ - tracepath_mem_trace_add(desc, alloc_size); -# define _COREGL_TRACE_MEM_REMOVE(desc, alloc_size) \ - tracepath_mem_trace_remove(desc, alloc_size); -# define _COREGL_TRACE_MEM_OUTPUT(force_output) \ - tracepath_mem_trace_output(force_output); + +#ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO +# define _COREGL_TRACE_MEM_ADD(desc, alloc_size) \ + tracepath_mem_trace_add(desc, alloc_size); +# define _COREGL_TRACE_MEM_REMOVE(desc, alloc_size) \ + tracepath_mem_trace_remove(desc, alloc_size); +# define _COREGL_TRACE_MEM_OUTPUT(force_output) \ + tracepath_mem_trace_output(force_output); #else -# define _COREGL_TRACE_MEM_ADD(desc, alloc_size) -# define _COREGL_TRACE_MEM_REMOVE(desc, alloc_size) -# define _COREGL_TRACE_MEM_OUTPUT(force_output) +# define _COREGL_TRACE_MEM_ADD(desc, alloc_size) +# define _COREGL_TRACE_MEM_REMOVE(desc, alloc_size) +# define _COREGL_TRACE_MEM_OUTPUT(force_output) #endif - -#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO -# define _COREGL_TRACE_SURFACE(force_output, type, position) \ - tracepath_surface_trace(force_output, type, position); + +#ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO +# define _COREGL_TRACE_SURFACE(force_output, type, position) \ + tracepath_surface_trace(force_output, type, position); #else -# define _COREGL_TRACE_SURFACE(force_output, type, position) +# define _COREGL_TRACE_SURFACE(force_output, type, position) #endif - -#define _COREGL_TRACEPATH_FUNC_BEGIN() \ + +#define _COREGL_TRACEPATH_FUNC_BEGIN() \ if (unlikely(trace_api_flag == 1)) \ _COREGL_TRACE_API_BEGIN(__func__, NULL, 1); -#define _COREGL_TRACEPATH_FUNC_END() \ +#define _COREGL_TRACEPATH_FUNC_END() \ if (unlikely(trace_api_flag == 1)) \ _COREGL_TRACE_API_END(__func__, NULL, 1); - + typedef struct _Trace_Data Trace_Data; -typedef struct _Apicall_Data Apicall_Data; -typedef struct _Memuse_Data Memuse_Data; -typedef struct _Surface_Data Surface_Data; - -#define MTD_GLBUF_HASH_ARRAY 10000 - -typedef struct _Glbuf_Data Glbuf_Data; -typedef struct _Sostate_Data -{ - int ref_count; - - Glbuf_Data *glbuf_tex[MTD_GLBUF_HASH_ARRAY]; - Glbuf_Data *glbuf_rb[MTD_GLBUF_HASH_ARRAY]; -} Sostate_Data; - -typedef struct _Ctx_Data -{ - GLDisplay dpy; - GLContext handle; - int ref_count; - int mc_count; - Sostate_Data *sostate; - - struct _Ctx_Data *next; -} Ctx_Data; - -extern Mutex ctx_access_mutex; - -extern Mutex access_mutex; -extern Memuse_Data **table; - -typedef struct _Tracepath_ThreadState -{ - Apicall_Data **ftd_table; - Ctx_Data *ctx; - - GLSurface *surf_draw; - GLSurface *surf_read; -} Tracepath_ThreadState; - -extern void init_modules_tracepath(); -extern void deinit_modules_tracepath(); -extern void init_modules_tstate_tracepath(GLThreadState *tstate); -extern void deinit_modules_tstate_tracepath(GLThreadState *tstate); - - -extern void tracepath_apply_overrides(); +typedef struct _Apicall_Data Apicall_Data; +typedef struct _Memuse_Data Memuse_Data; +typedef struct _Surface_Data Surface_Data; + +#define MTD_GLBUF_HASH_ARRAY 10000 + +typedef struct _Glbuf_Data Glbuf_Data; +typedef struct _Sostate_Data { + int ref_count; + + Glbuf_Data *glbuf_tex[MTD_GLBUF_HASH_ARRAY]; + Glbuf_Data *glbuf_rb[MTD_GLBUF_HASH_ARRAY]; +} Sostate_Data; + +typedef struct _Ctx_Data { + GLDisplay dpy; + GLContext handle; + int ref_count; + int mc_count; + Sostate_Data *sostate; + + struct _Ctx_Data *next; +} Ctx_Data; + +extern Mutex ctx_access_mutex; + +extern Mutex access_mutex; +extern Memuse_Data **table; + +typedef struct _Tracepath_ThreadState { + Apicall_Data **ftd_table; + Ctx_Data *ctx; + + GLSurface *surf_draw; + GLSurface *surf_read; +} Tracepath_ThreadState; + +extern void init_modules_tracepath(); +extern void deinit_modules_tracepath(); +extern void init_modules_tstate_tracepath(GLThreadState *tstate); +extern void deinit_modules_tstate_tracepath( + GLThreadState *tstate); + + +extern void tracepath_apply_overrides(); extern void tracepath_apply_overrides_egl(int enable); extern void tracepath_apply_overrides_gl(int enable); -extern void tracepath_dump_context_states(int force_output); - -extern void *tracepath_api_trace_begin(const char *name, void *hint, int trace_total_time); -extern void *tracepath_api_trace_end(const char *name, void *hint, int trace_total_time); -extern void tracepath_api_trace_output(int force_output); -extern void tracepath_api_trace_reset_frame(); - -extern void tracepath_mem_trace_add(const char *desc, int alloc_size); -extern void tracepath_mem_trace_remove(const char *desc, int alloc_size); -extern void tracepath_mem_trace_output(int force_output); - -extern void tracepath_surface_trace_add(const char *desc, GLDisplay dpy, GLContext ctx, GLSurface surf, GLint fbo, GLint tex, GLint rb, GLint tex_w, GLint tex_h, GLint tex_format, const char *dump); -extern void tracepath_surface_trace(int force_output, int type, const char *position); - -extern void tracepath_glbuf_clear(Glbuf_Data **glbuf); - -#endif // COREGL_TRACEPATH_H - +extern void tracepath_dump_context_states(int force_output); + +extern void *tracepath_api_trace_begin(const char *name, + void *hint, int trace_total_time); +extern void *tracepath_api_trace_end(const char *name, void *hint, + int trace_total_time); +extern void tracepath_api_trace_output(int force_output); +extern void tracepath_api_trace_reset_frame(); + +extern void tracepath_mem_trace_add(const char *desc, + int alloc_size); +extern void tracepath_mem_trace_remove(const char *desc, + int alloc_size); +extern void tracepath_mem_trace_output(int force_output); + +extern void tracepath_surface_trace_add(const char *desc, + GLDisplay dpy, GLContext ctx, GLSurface surf, GLint fbo, GLint tex, GLint rb, + GLint tex_w, GLint tex_h, GLint tex_format, const char *dump); +extern void tracepath_surface_trace(int force_output, int type, + const char *position); + +extern void tracepath_glbuf_clear(Glbuf_Data **glbuf); + +#endif // COREGL_TRACEPATH_H + diff --git a/src/modules/tracepath/coregl_tracepath_egl.c b/src/modules/tracepath/coregl_tracepath_egl.c index 98a8bf6..f1d90b9 100644 --- a/src/modules/tracepath/coregl_tracepath_egl.c +++ b/src/modules/tracepath/coregl_tracepath_egl.c @@ -16,10 +16,8 @@ _get_sostate(GLContext ctx) Sostate_Data *ret = NULL; Ctx_Data *current = ctx_data; - while (current != NULL) - { - if (current->handle == ctx) - { + while (current != NULL) { + if (current->handle == ctx) { current->sostate->ref_count++; ret = current->sostate; break; @@ -43,12 +41,10 @@ _dump_context_info(const char *ment, int force_output) AST(mutex_lock(&ctx_access_mutex) == 1); AST(mutex_lock(&general_trace_lists_access_mutex) == 1); - if (!force_output && !trace_ctx_force_flag) - { + if (!force_output && !trace_ctx_force_flag) { struct timeval tv_now = { 0, 0 }; AST(gettimeofday(&tv_now, NULL) == 0); - if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) - { + if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) { goto finish; } tv_last = tv_now; @@ -58,7 +54,8 @@ _dump_context_info(const char *ment, int force_output) TRACE("\n"); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); - TRACE("\E[40;32;1m Context info \E[1;37;1m: %s\E[0m\n", getpid(), ment); + TRACE("\E[40;32;1m Context info \E[1;37;1m: %s\E[0m\n", getpid(), + ment); TRACE("\E[40;34m========================================================================================================================\E[0m\n"); @@ -67,8 +64,7 @@ _dump_context_info(const char *ment, int force_output) General_Trace_List *current = NULL; current = thread_trace_list; - while (current != NULL) - { + while (current != NULL) { GLThreadState *cur_tstate = (GLThreadState *)current->value; MY_MODULE_TSTATE *cur_tstate_tm = NULL; @@ -81,13 +77,10 @@ _dump_context_info(const char *ment, int force_output) cur_tstate_tm->surf_draw, cur_tstate_tm->surf_read); - if (cur_tstate_tm->ctx != NULL) - { + if (cur_tstate_tm->ctx != NULL) { TRACE(" EGLCTX=[%12p]\E[0m\n", cur_tstate_tm->ctx->handle); - } - else - { + } else { TRACE(" (NOT BINDED TO THREAD)\E[0m\n"); } @@ -96,10 +89,8 @@ _dump_context_info(const char *ment, int force_output) Ctx_Data *current = NULL; current = ctx_data; - while (current != NULL) - { - if (cur_tstate_tm->ctx == current) - { + while (current != NULL) { + if (cur_tstate_tm->ctx == current) { TRACE(" -> EGLCTX [%12p] : EGLDPY=[%12p] \E[0m\n", current->handle, current->dpy, @@ -124,31 +115,27 @@ _dump_context_info(const char *ment, int force_output) Ctx_Data *current = NULL; current = ctx_data; - while (current != NULL) - { + while (current != NULL) { int isbinded = 0; General_Trace_List *current_t = NULL; current_t = thread_trace_list; - while (current_t != NULL) - { + while (current_t != NULL) { GLThreadState *cur_tstate = (GLThreadState *)current_t->value; MY_MODULE_TSTATE *cur_tstate_tm = NULL; GET_MY_TSTATE(cur_tstate_tm, cur_tstate); AST(cur_tstate_tm != NULL); - if (cur_tstate_tm->ctx == current) - { + if (cur_tstate_tm->ctx == current) { isbinded = 1; break; } current_t = current_t->next; } - if (isbinded == 0) - { + if (isbinded == 0) { TRACE(" EGLCTX [%12p] : EGLDPY=[%12p] \E[0m\n", current->handle, current->dpy, @@ -188,26 +175,22 @@ tracepath_add_context(GLContext ctx, GLDisplay dpy, GLContext share_ctx) current = ctx_data; - while (current != NULL) - { - if (current->handle == ctx) - { + while (current != NULL) { + if (current->handle == ctx) { data = current; break; } current = current->next; } - if (data == NULL) - { + if (data == NULL) { data = (Ctx_Data *)calloc(1, sizeof(Ctx_Data)); data->ref_count = 1; data->handle = ctx; data->dpy = dpy; data->sostate = _get_sostate(share_ctx); - if (data->sostate == NULL) - { + if (data->sostate == NULL) { data->sostate = (Sostate_Data *)calloc(1, sizeof(Sostate_Data)); data->sostate->ref_count = 1; } @@ -234,17 +217,14 @@ tracepath_get_context(GLContext ctx) current = ctx_data; - while (current != NULL) - { - if (current->handle == ctx) - { + while (current != NULL) { + if (current->handle == ctx) { data = current; break; } current = current->next; } - if (data == NULL) - { + if (data == NULL) { COREGL_WRN("Error making context [%p] current. (invalid EGL context)\n", ctx); goto finish; } @@ -266,19 +246,15 @@ tracepath_remove_context(GLContext ctx) current = ctx_data; - while (current != NULL) - { - if (current->handle == ctx) - { - if (--current->ref_count <= 0) - { + while (current != NULL) { + if (current->handle == ctx) { + if (--current->ref_count <= 0) { if (prev != NULL) prev->next = current->next; else ctx_data = current->next; - if (--current->sostate->ref_count <= 0) - { + if (--current->sostate->ref_count <= 0) { tracepath_glbuf_clear(current->sostate->glbuf_rb); tracepath_glbuf_clear(current->sostate->glbuf_tex); free(current->sostate); @@ -329,7 +305,7 @@ finish: } EGLBoolean -tracepath_eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) +tracepath_eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { EGLBoolean ret = EGL_FALSE; _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -356,7 +332,8 @@ finish: } EGLBoolean -tracepath_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) +tracepath_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, + EGLint *num_config) { EGLBoolean ret = EGL_FALSE; @@ -370,12 +347,14 @@ finish: } EGLBoolean -tracepath_eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) +tracepath_eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, + EGLConfig *configs, EGLint config_size, EGLint *num_config) { EGLBoolean ret = EGL_FALSE; _COREGL_TRACEPATH_FUNC_BEGIN(); - ret = _orig_tracepath_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config); + ret = _orig_tracepath_eglChooseConfig(dpy, attrib_list, configs, config_size, + num_config); goto finish; finish: @@ -384,7 +363,8 @@ finish: } EGLBoolean -tracepath_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) +tracepath_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, + EGLint *value) { EGLBoolean ret = EGL_FALSE; @@ -399,7 +379,8 @@ finish: EGLSurface -tracepath_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) +tracepath_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, const EGLint *attrib_list) { EGLSurface ret = EGL_NO_SURFACE; @@ -413,7 +394,8 @@ finish: } EGLSurface -tracepath_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) +tracepath_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list) { EGLSurface ret = EGL_NO_SURFACE; @@ -427,7 +409,8 @@ finish: } EGLSurface -tracepath_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) +tracepath_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, const EGLint *attrib_list) { EGLSurface ret = EGL_NO_SURFACE; @@ -452,17 +435,18 @@ tracepath_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - { - char name[256]; - sprintf(name, "EGLSURFACE_%p", surface); - tracepath_surface_trace_add(name, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL); - } + { + char name[256]; + sprintf(name, "EGLSURFACE_%p", surface); + tracepath_surface_trace_add(name, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL); + } #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO return ret; } EGLBoolean -tracepath_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) +tracepath_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, + EGLint *value) { EGLBoolean ret = EGL_FALSE; @@ -532,12 +516,14 @@ finish: } EGLSurface -tracepath_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) +tracepath_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, + EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) { EGLSurface ret = EGL_NO_SURFACE; _COREGL_TRACEPATH_FUNC_BEGIN(); - ret = _orig_tracepath_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); + ret = _orig_tracepath_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, + config, attrib_list); goto finish; finish: @@ -546,7 +532,8 @@ finish: } EGLBoolean -tracepath_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) +tracepath_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, + EGLint value) { EGLBoolean ret = EGL_FALSE; @@ -602,7 +589,8 @@ finish: } EGLContext -tracepath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) +tracepath_eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, const EGLint *attrib_list) { EGLContext ret = EGL_NO_CONTEXT; @@ -613,16 +601,13 @@ tracepath_eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_co finish: _COREGL_TRACEPATH_FUNC_END(); { - if (ret != EGL_NO_CONTEXT) - { + if (ret != EGL_NO_CONTEXT) { tracepath_add_context(ret, dpy, share_context); } } #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO - if (unlikely(trace_ctx_flag == 1)) - { - if (_orig_tracepath_eglCreateContext == _sym_eglCreateContext) - { + if (unlikely(trace_ctx_flag == 1)) { + if (_orig_tracepath_eglCreateContext == _sym_eglCreateContext) { char ment[256]; sprintf(ment, "eglCreateContext completed (EGLCTX=[%12p])", ret); _dump_context_info(ment, 1); @@ -649,10 +634,8 @@ finish: tracepath_remove_context(ctx); } #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO - if (unlikely(trace_ctx_flag == 1)) - { - if (_orig_tracepath_eglDestroyContext == _sym_eglDestroyContext) - { + if (unlikely(trace_ctx_flag == 1)) { + if (_orig_tracepath_eglDestroyContext == _sym_eglDestroyContext) { char ment[256]; sprintf(ment, "eglDestroyContext completed (EGLCTX=[%12p])", ctx); _dump_context_info(ment, 1); @@ -663,7 +646,8 @@ finish: } EGLBoolean -tracepath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) +tracepath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, + EGLContext ctx) { EGLBoolean ret = EGL_FALSE; @@ -677,8 +661,7 @@ finish: MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); - if (tstate == NULL) - { + if (tstate == NULL) { init_new_thread_state(); GET_MY_TSTATE(tstate, get_current_thread_state()); @@ -687,37 +670,32 @@ finish: Ctx_Data *oldctx = tstate->ctx; - if (ctx != EGL_NO_CONTEXT) - { + if (ctx != EGL_NO_CONTEXT) { tstate->ctx = tracepath_get_context(ctx); if (tstate->ctx != NULL) tstate->ctx->mc_count++; - } - else - { + } else { tstate->ctx = NULL; } if (oldctx != NULL) tracepath_remove_context(oldctx->handle); - tstate->surf_draw = draw; + tstate->surf_draw = draw; tstate->surf_read = read; } #ifdef COREGL_TRACEPATH_TRACE_STATE_INFO - if (unlikely(trace_state_flag == 1)) - { + if (unlikely(trace_state_flag == 1)) { if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent) tracepath_dump_context_states(0); } #endif // COREGL_TRACEPATH_TRACE_STATE_INFO #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO - if (unlikely(trace_ctx_flag == 1)) - { - if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent) - { + if (unlikely(trace_ctx_flag == 1)) { + if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent) { char ment[256]; - sprintf(ment, "eglMakeCurrent finished (EGLCTX=[%12p] Surf=[D:%12p R:%12p])", ctx, draw, read); + sprintf(ment, "eglMakeCurrent finished (EGLCTX=[%12p] Surf=[D:%12p R:%12p])", + ctx, draw, read); _dump_context_info(ment, 0); } } @@ -768,7 +746,8 @@ finish: } EGLBoolean -tracepath_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value) +tracepath_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, + EGLint *value) { EGLBoolean ret = EGL_FALSE; @@ -826,20 +805,14 @@ tracepath_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) finish: _COREGL_TRACEPATH_FUNC_END(); - if (unlikely(trace_api_frame_flag == 1)) - { - if (unlikely(trace_api_all_flag == 1)) - { + if (unlikely(trace_api_frame_flag == 1)) { + if (unlikely(trace_api_all_flag == 1)) { _COREGL_TRACE_API_OUTPUT(1); - } - else - { + } else { _COREGL_TRACE_API_OUTPUT(0); } _COREGL_TRACE_API_RESET_FRAME(); - } - else - { + } else { _COREGL_TRACE_API_OUTPUT(0); } _COREGL_TRACE_MEM_OUTPUT(0); @@ -847,7 +820,8 @@ finish: } EGLBoolean -tracepath_eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects) +tracepath_eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, + EGLint *rects, EGLint n_rects) { EGLBoolean ret = EGL_FALSE; @@ -860,20 +834,14 @@ tracepath_eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, EGLint finish: _COREGL_TRACEPATH_FUNC_END(); - if (unlikely(trace_api_frame_flag == 1)) - { - if (unlikely(trace_api_all_flag == 1)) - { + if (unlikely(trace_api_frame_flag == 1)) { + if (unlikely(trace_api_all_flag == 1)) { _COREGL_TRACE_API_OUTPUT(1); - } - else - { + } else { _COREGL_TRACE_API_OUTPUT(0); } _COREGL_TRACE_API_RESET_FRAME(); - } - else - { + } else { _COREGL_TRACE_API_OUTPUT(0); } _COREGL_TRACE_MEM_OUTPUT(0); @@ -881,7 +849,8 @@ finish: } EGLBoolean -tracepath_eglSwapBuffersRegionEXT(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects) +tracepath_eglSwapBuffersRegionEXT(EGLDisplay dpy, EGLSurface surface, + EGLint numRects, const EGLint *rects) { EGLBoolean ret = EGL_FALSE; @@ -894,20 +863,14 @@ tracepath_eglSwapBuffersRegionEXT(EGLDisplay dpy, EGLSurface surface, EGLint num finish: _COREGL_TRACEPATH_FUNC_END(); - if (unlikely(trace_api_frame_flag == 1)) - { - if (unlikely(trace_api_all_flag == 1)) - { + if (unlikely(trace_api_frame_flag == 1)) { + if (unlikely(trace_api_all_flag == 1)) { _COREGL_TRACE_API_OUTPUT(1); - } - else - { + } else { _COREGL_TRACE_API_OUTPUT(0); } _COREGL_TRACE_API_RESET_FRAME(); - } - else - { + } else { _COREGL_TRACE_API_OUTPUT(0); } _COREGL_TRACE_MEM_OUTPUT(0); @@ -915,7 +878,8 @@ finish: } EGLBoolean -tracepath_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) +tracepath_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target) { EGLBoolean ret = EGL_FALSE; @@ -929,7 +893,7 @@ finish: } _eng_fn -tracepath_eglGetProcAddress(const char* procname) +tracepath_eglGetProcAddress(const char *procname) { _eng_fn ret = NULL; @@ -961,9 +925,9 @@ tracepath_eglGetProcAddress(const char* procname) #undef _COREGL_EXT_SYMBOL_ALIAS ret = _orig_tracepath_eglGetProcAddress(procname); - if (ret != NULL) - { - COREGL_WRN("\E[40;31;1mTRACEPATH can't support '%s' (tracing for this function will be ignored)\E[0m\n", procname); + if (ret != NULL) { + COREGL_WRN("\E[40;31;1mTRACEPATH can't support '%s' (tracing for this function will be ignored)\E[0m\n", + procname); } goto finish; @@ -988,7 +952,8 @@ finish: } EGLImageKHR -tracepath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list) +tracepath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, + EGLClientBuffer buffer, const EGLint *attrib_list) { void *ret = NULL; @@ -1016,7 +981,8 @@ finish: } void * -tracepath_eglMapImageSEC(EGLDisplay dpy, EGLImageKHR image, EGLint device_type, EGLint access_option) +tracepath_eglMapImageSEC(EGLDisplay dpy, EGLImageKHR image, EGLint device_type, + EGLint access_option) { void *ret = NULL; @@ -1030,7 +996,8 @@ finish: } EGLBoolean -tracepath_eglUnmapImageSEC(EGLDisplay dpy, EGLImageKHR image, EGLint device_type) +tracepath_eglUnmapImageSEC(EGLDisplay dpy, EGLImageKHR image, + EGLint device_type) { EGLBoolean ret = EGL_FALSE; @@ -1044,7 +1011,8 @@ finish: } EGLBoolean -tracepath_eglGetImageAttribSEC(EGLDisplay dpy, EGLImageKHR image, EGLint attribute, EGLint *value) +tracepath_eglGetImageAttribSEC(EGLDisplay dpy, EGLImageKHR image, + EGLint attribute, EGLint *value) { EGLBoolean ret = EGL_FALSE; @@ -1058,7 +1026,8 @@ finish: } EGLBoolean -tracepath_eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list) +tracepath_eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, + const EGLint *attrib_list) { EGLBoolean ret = EGL_FALSE; @@ -1086,7 +1055,7 @@ finish: } EGLBoolean -tracepath_eglBindWaylandDisplayWL(EGLDisplay dpy, void* display) +tracepath_eglBindWaylandDisplayWL(EGLDisplay dpy, void *display) { EGLBoolean ret = EGL_FALSE; @@ -1101,7 +1070,7 @@ finish: } EGLBoolean -tracepath_eglUnbindWaylandDisplayWL(EGLDisplay dpy, void* display) +tracepath_eglUnbindWaylandDisplayWL(EGLDisplay dpy, void *display) { EGLBoolean ret = EGL_FALSE; @@ -1117,7 +1086,8 @@ finish: EGLBoolean -tracepath_eglQueryWaylandBufferWL(EGLDisplay dpy, void* buffer, EGLint attribute, EGLint *value) +tracepath_eglQueryWaylandBufferWL(EGLDisplay dpy, void *buffer, + EGLint attribute, EGLint *value) { EGLBoolean ret = EGL_FALSE; diff --git a/src/modules/tracepath/coregl_tracepath_gl.c b/src/modules/tracepath/coregl_tracepath_gl.c index cffb3c2..acde888 100644 --- a/src/modules/tracepath/coregl_tracepath_gl.c +++ b/src/modules/tracepath/coregl_tracepath_gl.c @@ -2,8 +2,7 @@ #include -struct _Glbuf_Data -{ +struct _Glbuf_Data { int obj_idx; int width; int height; @@ -17,14 +16,10 @@ static void __addhash_glbuf_object(Glbuf_Data **glbuf, Glbuf_Data *target) { Glbuf_Data *data = glbuf[target->obj_idx % MTD_GLBUF_HASH_ARRAY]; - if (data == NULL) - { + if (data == NULL) { glbuf[target->obj_idx % MTD_GLBUF_HASH_ARRAY] = target; - } - else - { - while (data->next != NULL) - { + } else { + while (data->next != NULL) { AST(data->obj_idx != target->obj_idx); data = data->next; } @@ -42,10 +37,8 @@ __removehash_glbuf_object(Glbuf_Data **glbuf, Glbuf_Data **target) { Glbuf_Data *data = glbuf[(*target)->obj_idx % MTD_GLBUF_HASH_ARRAY]; Glbuf_Data *prev = NULL; - while (data != NULL) - { - if (data->obj_idx == (*target)->obj_idx) - { + while (data != NULL) { + if (data->obj_idx == (*target)->obj_idx) { if (prev != NULL) prev->next = data->next; else @@ -68,8 +61,7 @@ static Glbuf_Data * __findhash_glbuf_object(Glbuf_Data **glbuf, int obj_idx) { Glbuf_Data *data = glbuf[obj_idx % MTD_GLBUF_HASH_ARRAY]; - while (data != NULL) - { + while (data != NULL) { if (data->obj_idx == obj_idx) break; data = data->next; @@ -85,12 +77,10 @@ tracepath_glbuf_clear(Glbuf_Data **glbuf) { int i; - for (i = 0; i < MTD_GLBUF_HASH_ARRAY; i++) - { + for (i = 0; i < MTD_GLBUF_HASH_ARRAY; i++) { Glbuf_Data *data = glbuf[i]; - while (data) - { + while (data) { Glbuf_Data *delitm = data; data = data->next; free(delitm); @@ -100,21 +90,20 @@ tracepath_glbuf_clear(Glbuf_Data **glbuf) } static void -_add_glbuf_object(Glbuf_Data **glbuf, int obj_idx, const char *obj_type, int width, int height, int bpp, const char *format) +_add_glbuf_object(Glbuf_Data **glbuf, int obj_idx, const char *obj_type, + int width, int height, int bpp, const char *format) { Glbuf_Data *data = __findhash_glbuf_object(glbuf, obj_idx); - if (data == NULL) - { + if (data == NULL) { data = (Glbuf_Data *)calloc(1, sizeof(Glbuf_Data)); data->obj_idx = obj_idx; __addhash_glbuf_object(glbuf, data); - } - else - { + } else { // Update { char ment[MAX_TRACE_NAME_LENGTH]; - sprintf(ment, "%s(%4dx%4d %s)", obj_type, data->width, data->height, data->format); + sprintf(ment, "%s(%4dx%4d %s)", obj_type, data->width, data->height, + data->format); _COREGL_TRACE_MEM_REMOVE(ment, data->width * data->height * data->bpp); } } @@ -126,7 +115,8 @@ _add_glbuf_object(Glbuf_Data **glbuf, int obj_idx, const char *obj_type, int wid { char ment[MAX_TRACE_NAME_LENGTH]; - sprintf(ment, "%s(%4dx%4d %s)", obj_type, data->width, data->height, data->format); + sprintf(ment, "%s(%4dx%4d %s)", obj_type, data->width, data->height, + data->format); _COREGL_TRACE_MEM_ADD(ment, data->width * data->height * data->bpp); } goto finish; @@ -139,15 +129,16 @@ static void _remove_glbuf_object(Glbuf_Data **glbuf, int obj_idx, const char *obj_type) { Glbuf_Data *data = __findhash_glbuf_object(glbuf, obj_idx); - if (data == NULL) - { - COREGL_WRN("\E[40;31;1mError deleting %s object %d. (is not created)\E[0m\n", obj_type, obj_idx); + if (data == NULL) { + COREGL_WRN("\E[40;31;1mError deleting %s object %d. (is not created)\E[0m\n", + obj_type, obj_idx); return; } { char ment[MAX_TRACE_NAME_LENGTH]; - sprintf(ment, "%s(%4dx%4d %s)", obj_type, data->width, data->height, data->format); + sprintf(ment, "%s(%4dx%4d %s)", obj_type, data->width, data->height, + data->format); _COREGL_TRACE_MEM_REMOVE(ment, data->width * data->height * data->bpp); } @@ -161,56 +152,58 @@ finish: #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO void -_surface_trace_set(int set, GLint fbname, GLenum attachment, MY_MODULE_TSTATE *tstate) +_surface_trace_set(int set, GLint fbname, GLenum attachment, + MY_MODULE_TSTATE *tstate) { int atttype = _COREGL_INT_INIT_VALUE; - _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); + _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, + attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &atttype); AST(atttype != _COREGL_INT_INIT_VALUE); int attname = _COREGL_INT_INIT_VALUE; - _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); + _orig_tracepath_glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, + attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &attname); AST(attname != _COREGL_INT_INIT_VALUE); - if (set == 1) - { - switch (atttype) + if (set == 1) { + switch (atttype) { + case GL_TEXTURE: + //COREGL_LOG("FBO DUMPING BEGIN = (TEX)0x%X\n", attname); { - case GL_TEXTURE: - //COREGL_LOG("FBO DUMPING BEGIN = (TEX)0x%X\n", attname); - { - char name[256]; - sprintf(name, "FBOTEX_0x%X", attname); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, fbname, attname, 0, -1, -1, -1, NULL); - } - break; - case GL_RENDERBUFFER: - //COREGL_LOG("FBO DUMPING BEGIN = (RB)0x%X\n", attname); - { - char name[256]; - sprintf(name, "FBORB_0x%X", attname); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, fbname, 0, attname, -1, -1, -1, NULL); - } - break; + char name[256]; + sprintf(name, "FBOTEX_0x%X", attname); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, fbname, attname, 0, -1, -1, -1, NULL); } - } - else - { - switch (atttype) + break; + case GL_RENDERBUFFER: + //COREGL_LOG("FBO DUMPING BEGIN = (RB)0x%X\n", attname); { - case GL_TEXTURE: - //COREGL_LOG("FBO DUMPING END = (TEX)0x%X\n", attname); - { - char name[256]; - sprintf(name, "FBOTEX_0x%X", attname); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, 0, attname, 0, -1, -1, -1, NULL); - } - break; - case GL_RENDERBUFFER: - //COREGL_LOG("FBO DUMPING END = (RB)0x%X\n", attname); - { - char name[256]; - sprintf(name, "FBORB_0x%X", attname); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, 0, 0, attname, -1, -1, -1, NULL); - } - break; + char name[256]; + sprintf(name, "FBORB_0x%X", attname); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, fbname, 0, attname, -1, -1, -1, NULL); + } + break; + } + } else { + switch (atttype) { + case GL_TEXTURE: + //COREGL_LOG("FBO DUMPING END = (TEX)0x%X\n", attname); + { + char name[256]; + sprintf(name, "FBOTEX_0x%X", attname); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, 0, attname, 0, -1, -1, -1, NULL); + } + break; + case GL_RENDERBUFFER: + //COREGL_LOG("FBO DUMPING END = (RB)0x%X\n", attname); + { + char name[256]; + sprintf(name, "FBORB_0x%X", attname); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, 0, 0, attname, -1, -1, -1, NULL); + } + break; } } } @@ -218,19 +211,16 @@ _surface_trace_set(int set, GLint fbname, GLenum attachment, MY_MODULE_TSTATE *t void tracepath_fbdump_update(GLint set) { - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { GLint fbname = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fbname); AST(fbname != _COREGL_INT_INIT_VALUE); - if (fbname != 0) - { + if (fbname != 0) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { _surface_trace_set(set, fbname, GL_COLOR_ATTACHMENT0, tstate); // _surface_trace_set(set, fbname, GL_DEPTH_ATTACHMENT, tstate); // _surface_trace_set(set, fbname, GL_STENCIL_ATTACHMENT, tstate); @@ -272,7 +262,7 @@ finish: } void -tracepath_glBindAttribLocation(GLuint program, GLuint index, const char* name) +tracepath_glBindAttribLocation(GLuint program, GLuint index, const char *name) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBindAttribLocation(program, index, name); @@ -301,12 +291,10 @@ tracepath_glBindFramebuffer(GLenum target, GLuint framebuffer) _COREGL_TRACEPATH_FUNC_BEGIN(); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (unlikely(trace_surface_flag == 1)) - { + if (unlikely(trace_surface_flag == 1)) { GLint oldfb; _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb); - if (oldfb != 0) - { + if (oldfb != 0) { _COREGL_TRACE_SURFACE(0, 2, "GLBINDFBO"); } @@ -317,8 +305,7 @@ tracepath_glBindFramebuffer(GLenum target, GLuint framebuffer) _orig_tracepath_glBindFramebuffer(target, framebuffer); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (unlikely(trace_surface_flag == 1)) - { + if (unlikely(trace_surface_flag == 1)) { tracepath_fbdump_update(1); } #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO @@ -346,7 +333,7 @@ tracepath_glBindTexture(GLenum target, GLuint texture) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _COREGL_TRACE_SURFACE(0, 1, "GLBINDTEXTURE"); + _COREGL_TRACE_SURFACE(0, 1, "GLBINDTEXTURE"); _orig_tracepath_glBindTexture(target, texture); goto finish; @@ -356,7 +343,8 @@ finish: } void -tracepath_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +tracepath_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBlendColor(red, green, blue, alpha); @@ -404,7 +392,8 @@ finish: } void -tracepath_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +tracepath_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); @@ -416,7 +405,8 @@ finish: } void -tracepath_glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) +tracepath_glBufferData(GLenum target, GLsizeiptr size, const void *data, + GLenum usage) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBufferData(target, size, data, usage); @@ -428,7 +418,8 @@ finish: } void -tracepath_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) +tracepath_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, + const void *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBufferSubData(target, offset, size, data); @@ -467,7 +458,8 @@ finish: } void -tracepath_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +tracepath_glClearColor(GLclampf red, GLclampf green, GLclampf blue, + GLclampf alpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glClearColor(red, green, blue, alpha); @@ -503,7 +495,8 @@ finish: } void -tracepath_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +tracepath_glColorMask(GLboolean red, GLboolean green, GLboolean blue, + GLboolean alpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glColorMask(red, green, blue, alpha); @@ -527,10 +520,13 @@ finish: } void -tracepath_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) +tracepath_glCompressedTexImage2D(GLenum target, GLint level, + GLenum internalformat, GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const void *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); + _orig_tracepath_glCompressedTexImage2D(target, level, internalformat, width, + height, border, imageSize, data); goto finish; @@ -539,10 +535,13 @@ finish: } void -tracepath_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) +tracepath_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, + const void *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); + _orig_tracepath_glCompressedTexSubImage2D(target, level, xoffset, yoffset, + width, height, format, imageSize, data); goto finish; @@ -551,10 +550,12 @@ finish: } void -tracepath_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +tracepath_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + _orig_tracepath_glCopyTexImage2D(target, level, internalformat, x, y, width, + height, border); goto finish; @@ -563,10 +564,12 @@ finish: } void -tracepath_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +tracepath_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + _orig_tracepath_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, + width, height); goto finish; @@ -616,7 +619,7 @@ finish: } void -tracepath_glDeleteBuffers(GLsizei n, const GLuint* buffers) +tracepath_glDeleteBuffers(GLsizei n, const GLuint *buffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteBuffers(n, buffers); @@ -628,7 +631,7 @@ finish: } void -tracepath_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) +tracepath_glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -661,7 +664,7 @@ finish: } void -tracepath_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) +tracepath_glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -680,18 +683,16 @@ tracepath_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { - for (int i = 0; i < n; i++) - { + if (tstate->ctx != NULL) { + for (int i = 0; i < n; i++) { if (renderbuffers[i] == 0) continue; - _remove_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], "Renderbuffer"); + _remove_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], + "Renderbuffer"); } } } @@ -711,7 +712,7 @@ finish: } void -tracepath_glDeleteTextures(GLsizei n, const GLuint* textures) +tracepath_glDeleteTextures(GLsizei n, const GLuint *textures) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -730,16 +731,13 @@ tracepath_glDeleteTextures(GLsizei n, const GLuint* textures) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { - for (int i = 0; i < n; i++) - { + if (tstate->ctx != NULL) { + for (int i = 0; i < n; i++) { if (textures[i] == 0) continue; _remove_glbuf_object(tstate->ctx->sostate->glbuf_tex, textures[i], "Texture"); } @@ -831,28 +829,30 @@ tracepath_glDrawArrays(GLenum mode, GLint first, GLsizei count) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { GLint fbname = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fbname); AST(fbname != _COREGL_INT_INIT_VALUE); - if (fbname == 0) - { + if (fbname == 0) { char name[256]; EGLint btype; - _orig_tracepath_eglQuerySurface(_orig_tracepath_eglGetCurrentDisplay(), _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), EGL_RENDER_BUFFER, &btype); + _orig_tracepath_eglQuerySurface(_orig_tracepath_eglGetCurrentDisplay(), + _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), EGL_RENDER_BUFFER, &btype); if (btype == EGL_SINGLE_BUFFER) sprintf(name, "EGLPIXMAP_%p", _orig_tracepath_eglGetCurrentSurface(EGL_DRAW)); else sprintf(name, "EGLWINDOW_%p", _orig_tracepath_eglGetCurrentSurface(EGL_DRAW)); - tracepath_surface_trace_add(name, _orig_tracepath_eglGetCurrentDisplay(), _orig_tracepath_eglGetCurrentContext(), _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), 0, 0, 0, 0, 0, 0, NULL); + tracepath_surface_trace_add(name, _orig_tracepath_eglGetCurrentDisplay(), + _orig_tracepath_eglGetCurrentContext(), + _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), 0, 0, 0, 0, 0, 0, NULL); } - } + } #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO } void -tracepath_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) +tracepath_glDrawElements(GLenum mode, GLsizei count, GLenum type, + const void *indices) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDrawElements(mode, count, type, indices); @@ -862,23 +862,24 @@ tracepath_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* in finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { GLint fbname = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fbname); AST(fbname != _COREGL_INT_INIT_VALUE); - if (fbname == 0) - { + if (fbname == 0) { char name[256]; EGLint btype; - _orig_tracepath_eglQuerySurface(_orig_tracepath_eglGetCurrentDisplay(), _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), EGL_RENDER_BUFFER, &btype); + _orig_tracepath_eglQuerySurface(_orig_tracepath_eglGetCurrentDisplay(), + _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), EGL_RENDER_BUFFER, &btype); if (btype == EGL_SINGLE_BUFFER) sprintf(name, "EGLPIXMAP_%p", _orig_tracepath_eglGetCurrentSurface(EGL_DRAW)); else sprintf(name, "EGLWINDOW_%p", _orig_tracepath_eglGetCurrentSurface(EGL_DRAW)); - tracepath_surface_trace_add(name, _orig_tracepath_eglGetCurrentDisplay(), _orig_tracepath_eglGetCurrentContext(), _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), 0, 0, 0, 0, 0, 0, NULL); + tracepath_surface_trace_add(name, _orig_tracepath_eglGetCurrentDisplay(), + _orig_tracepath_eglGetCurrentContext(), + _orig_tracepath_eglGetCurrentSurface(EGL_DRAW), 0, 0, 0, 0, 0, 0, NULL); } - } + } #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO } @@ -939,7 +940,8 @@ finish: } void -tracepath_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +tracepath_glFramebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -947,7 +949,8 @@ tracepath_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum ren tracepath_fbdump_update(0); #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO - _orig_tracepath_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + _orig_tracepath_glFramebufferRenderbuffer(target, attachment, + renderbuffertarget, renderbuffer); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO tracepath_fbdump_update(1); @@ -960,7 +963,8 @@ finish: } void -tracepath_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +tracepath_glFramebufferTexture2D(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -968,7 +972,8 @@ tracepath_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textar tracepath_fbdump_update(0); #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO - _orig_tracepath_glFramebufferTexture2D(target, attachment, textarget, texture, level); + _orig_tracepath_glFramebufferTexture2D(target, attachment, textarget, texture, + level); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO tracepath_fbdump_update(1); @@ -993,7 +998,7 @@ finish: } void -tracepath_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) +tracepath_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetVertexAttribfv(index, pname, params); @@ -1006,7 +1011,7 @@ finish: } void -tracepath_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) +tracepath_glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetVertexAttribiv(index, pname, params); @@ -1019,7 +1024,7 @@ finish: } void -tracepath_glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) +tracepath_glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetVertexAttribPointerv(index, pname, pointer); @@ -1045,7 +1050,7 @@ finish: } void -tracepath_glGenBuffers(GLsizei n, GLuint* buffers) +tracepath_glGenBuffers(GLsizei n, GLuint *buffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenBuffers(n, buffers); @@ -1069,7 +1074,7 @@ finish: } void -tracepath_glGenFramebuffers(GLsizei n, GLuint* framebuffers) +tracepath_glGenFramebuffers(GLsizei n, GLuint *framebuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenFramebuffers(n, framebuffers); @@ -1081,7 +1086,7 @@ finish: } void -tracepath_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) +tracepath_glGenRenderbuffers(GLsizei n, GLuint *renderbuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenRenderbuffers(n, renderbuffers); @@ -1091,18 +1096,16 @@ tracepath_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { - for (int i = 0; i < n; i++) - { + if (tstate->ctx != NULL) { + for (int i = 0; i < n; i++) { if (renderbuffers[i] == 0) continue; - _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], "Renderbuffer", 0, 0, 0, "Unknown"); + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], + "Renderbuffer", 0, 0, 0, "Unknown"); } } } @@ -1110,7 +1113,7 @@ finish: } void -tracepath_glGenTextures(GLsizei n, GLuint* textures) +tracepath_glGenTextures(GLsizei n, GLuint *textures) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenTextures(n, textures); @@ -1120,18 +1123,16 @@ tracepath_glGenTextures(GLsizei n, GLuint* textures) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { - for (int i = 0; i < n; i++) - { + if (tstate->ctx != NULL) { + for (int i = 0; i < n; i++) { if (textures[i] == 0) continue; - _add_glbuf_object(tstate->ctx->sostate->glbuf_tex, textures[i], "Texture", 0, 0, 0, "Unknown"); + _add_glbuf_object(tstate->ctx->sostate->glbuf_tex, textures[i], "Texture", 0, 0, + 0, "Unknown"); } } } @@ -1139,10 +1140,12 @@ finish: } void -tracepath_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +tracepath_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetActiveAttrib(program, index, bufsize, length, size, type, name); + _orig_tracepath_glGetActiveAttrib(program, index, bufsize, length, size, type, + name); goto finish; @@ -1151,10 +1154,12 @@ finish: } void -tracepath_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +tracepath_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetActiveUniform(program, index, bufsize, length, size, type, name); + _orig_tracepath_glGetActiveUniform(program, index, bufsize, length, size, type, + name); goto finish; @@ -1163,7 +1168,8 @@ finish: } void -tracepath_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +tracepath_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, + GLuint *shaders) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetAttachedShaders(program, maxcount, count, shaders); @@ -1175,7 +1181,7 @@ finish: } int -tracepath_glGetAttribLocation(GLuint program, const char* name) +tracepath_glGetAttribLocation(GLuint program, const char *name) { int ret = _COREGL_INT_INIT_VALUE; _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -1189,7 +1195,7 @@ finish: } void -tracepath_glGetBooleanv(GLenum pname, GLboolean* params) +tracepath_glGetBooleanv(GLenum pname, GLboolean *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetBooleanv(pname, params); @@ -1201,7 +1207,7 @@ finish: } void -tracepath_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) +tracepath_glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetBufferParameteriv(target, pname, params); @@ -1227,7 +1233,7 @@ finish: } void -tracepath_glGetFloatv(GLenum pname, GLfloat* params) +tracepath_glGetFloatv(GLenum pname, GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetFloatv(pname, params); @@ -1239,10 +1245,12 @@ finish: } void -tracepath_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) +tracepath_glGetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); + _orig_tracepath_glGetFramebufferAttachmentParameteriv(target, attachment, pname, + params); goto finish; @@ -1251,7 +1259,7 @@ finish: } void -tracepath_glGetIntegerv(GLenum pname, GLint* params) +tracepath_glGetIntegerv(GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetIntegerv(pname, params); @@ -1263,7 +1271,7 @@ finish: } void -tracepath_glGetProgramiv(GLuint program, GLenum pname, GLint* params) +tracepath_glGetProgramiv(GLuint program, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetProgramiv(program, pname, params); @@ -1275,7 +1283,8 @@ finish: } void -tracepath_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) +tracepath_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, + char *infolog) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetProgramInfoLog(program, bufsize, length, infolog); @@ -1287,7 +1296,8 @@ finish: } void -tracepath_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) +tracepath_glGetRenderbufferParameteriv(GLenum target, GLenum pname, + GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetRenderbufferParameteriv(target, pname, params); @@ -1299,7 +1309,7 @@ finish: } void -tracepath_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) +tracepath_glGetShaderiv(GLuint shader, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetShaderiv(shader, pname, params); @@ -1311,7 +1321,8 @@ finish: } void -tracepath_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) +tracepath_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, + char *infolog) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetShaderInfoLog(shader, bufsize, length, infolog); @@ -1323,10 +1334,12 @@ finish: } void -tracepath_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +tracepath_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, + GLint *range, GLint *precision) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); + _orig_tracepath_glGetShaderPrecisionFormat(shadertype, precisiontype, range, + precision); goto finish; @@ -1335,7 +1348,8 @@ finish: } void -tracepath_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) +tracepath_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, + char *source) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetShaderSource(shader, bufsize, length, source); @@ -1362,7 +1376,7 @@ finish: } void -tracepath_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) +tracepath_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetTexParameterfv(target, pname, params); @@ -1374,7 +1388,7 @@ finish: } void -tracepath_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) +tracepath_glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetTexParameteriv(target, pname, params); @@ -1386,7 +1400,7 @@ finish: } void -tracepath_glGetUniformfv(GLuint program, GLint location, GLfloat* params) +tracepath_glGetUniformfv(GLuint program, GLint location, GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetUniformfv(program, location, params); @@ -1398,7 +1412,7 @@ finish: } void -tracepath_glGetUniformiv(GLuint program, GLint location, GLint* params) +tracepath_glGetUniformiv(GLuint program, GLint location, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetUniformiv(program, location, params); @@ -1409,7 +1423,7 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } int -tracepath_glGetUniformLocation(GLuint program, const char* name) +tracepath_glGetUniformLocation(GLuint program, const char *name) { int ret = _COREGL_INT_INIT_VALUE; @@ -1573,7 +1587,8 @@ finish: } void -tracepath_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) +tracepath_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, void *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glReadPixels(x, y, width, height, format, type, pixels); @@ -1597,7 +1612,8 @@ finish: } void -tracepath_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +tracepath_glRenderbufferStorage(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -1608,14 +1624,12 @@ tracepath_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei wi finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); @@ -1623,65 +1637,116 @@ finish: // Detect byte per pixel int bpp = 0; char formatment[80]; - switch (internalformat) - { - case GL_ALPHA: sprintf(formatment, "ALPHA"); bpp = 1; break; - case GL_LUMINANCE: sprintf(formatment, "LUMINANCE"); bpp = 1; break; - case GL_LUMINANCE_ALPHA: sprintf(formatment, "LUMINANCE_ALPHA"); bpp = 1; break; - case GL_RGB: sprintf(formatment, "RGB"); bpp = 2; break; - case GL_RGBA: sprintf(formatment, "RGBA"); bpp = 4; break; - case 0x80E1: sprintf(formatment, "BGRA_EXT"); bpp = 4; break; - case 0x84F9: sprintf(formatment, "DEPTH_STENCIL_OES"); bpp = 4; break; - case GL_DEPTH_COMPONENT : sprintf(formatment, "DEPTH_COMPONENT"); bpp = 1; break; - case 0x81A5: sprintf(formatment, "DEPTH_COMPONENT16_ARB"); bpp = 2; break; - case 0x81A6: sprintf(formatment, "DEPTH_COMPONENT24_ARB"); bpp = 3; break; - case 0x81A7: sprintf(formatment, "DEPTH_COMPONENT32_ARB"); bpp = 4; break; - case 0x8D46 : sprintf(formatment, "STENCIL_INDEX1_OES"); bpp = 1; break; - case 0x8D47 : sprintf(formatment, "STENCIL_INDEX4_OES"); bpp = 1; break; - case 0x8D48 : sprintf(formatment, "STENCIL_INDEX8_OES"); bpp = 1; break; - default: sprintf(formatment, "0x%X", internalformat); bpp = 0; break; + switch (internalformat) { + case GL_ALPHA: + sprintf(formatment, "ALPHA"); + bpp = 1; + break; + case GL_LUMINANCE: + sprintf(formatment, "LUMINANCE"); + bpp = 1; + break; + case GL_LUMINANCE_ALPHA: + sprintf(formatment, "LUMINANCE_ALPHA"); + bpp = 1; + break; + case GL_RGB: + sprintf(formatment, "RGB"); + bpp = 2; + break; + case GL_RGBA: + sprintf(formatment, "RGBA"); + bpp = 4; + break; + case 0x80E1: + sprintf(formatment, "BGRA_EXT"); + bpp = 4; + break; + case 0x84F9: + sprintf(formatment, "DEPTH_STENCIL_OES"); + bpp = 4; + break; + case GL_DEPTH_COMPONENT : + sprintf(formatment, "DEPTH_COMPONENT"); + bpp = 1; + break; + case 0x81A5: + sprintf(formatment, "DEPTH_COMPONENT16_ARB"); + bpp = 2; + break; + case 0x81A6: + sprintf(formatment, "DEPTH_COMPONENT24_ARB"); + bpp = 3; + break; + case 0x81A7: + sprintf(formatment, "DEPTH_COMPONENT32_ARB"); + bpp = 4; + break; + case 0x8D46 : + sprintf(formatment, "STENCIL_INDEX1_OES"); + bpp = 1; + break; + case 0x8D47 : + sprintf(formatment, "STENCIL_INDEX4_OES"); + bpp = 1; + break; + case 0x8D48 : + sprintf(formatment, "STENCIL_INDEX8_OES"); + bpp = 1; + break; + default: + sprintf(formatment, "0x%X", internalformat); + bpp = 0; + break; } - _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", width, height, bpp, formatment); + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", width, + height, bpp, formatment); } } #endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); { int channel = 0; - switch (internalformat) - { - case GL_ALPHA: - case GL_LUMINANCE: - case GL_DEPTH_COMPONENT : - case 0x81A5: - case 0x81A6: - case 0x81A7: - case 0x8D46 : - case 0x8D47 : - case 0x8D48 : channel = 1; break; - case GL_LUMINANCE_ALPHA: - case 0x84F9: channel = 2; break; - case GL_RGB: channel = 3; break; - case GL_RGBA: - case 0x80E1: channel = 4; break; + switch (internalformat) { + case GL_ALPHA: + case GL_LUMINANCE: + case GL_DEPTH_COMPONENT : + case 0x81A5: + case 0x81A6: + case 0x81A7: + case 0x8D46 : + case 0x8D47 : + case 0x8D48 : + channel = 1; + break; + case GL_LUMINANCE_ALPHA: + case 0x84F9: + channel = 2; + break; + case GL_RGB: + channel = 3; + break; + case GL_RGBA: + case 0x80E1: + channel = 4; + break; } char name[256]; sprintf(name, "FBORB_%d", objidx); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, -1, 0, objidx, width, height, channel, NULL); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, -1, 0, objidx, width, height, channel, NULL); } } } @@ -1713,7 +1778,8 @@ finish: } void -tracepath_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +tracepath_glShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, + const void *binary, GLsizei length) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glShaderBinary(n, shaders, binaryformat, binary, length); @@ -1725,7 +1791,8 @@ finish: } void -tracepath_glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) +tracepath_glShaderSource(GLuint shader, GLsizei count, const char **string, + const GLint *length) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glShaderSource(shader, count, string, length); @@ -1749,7 +1816,8 @@ finish: } void -tracepath_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) +tracepath_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, + GLuint mask) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glStencilFuncSeparate(face, func, ref, mask); @@ -1797,7 +1865,8 @@ finish: } void -tracepath_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +tracepath_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, + GLenum zpass) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glStencilOpSeparate(face, fail, zfail, zpass); @@ -1809,24 +1878,25 @@ finish: } void -tracepath_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) +tracepath_glTexImage2D(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, + const void *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); + _orig_tracepath_glTexImage2D(target, level, internalformat, width, height, + border, format, type, pixels); goto finish; finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_TEXTURE_BINDING_2D, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); @@ -1834,65 +1904,116 @@ finish: // Detect byte per pixel int bpp = 0; char formatment[80]; - switch (internalformat) - { - case GL_ALPHA: sprintf(formatment, "ALPHA"); bpp = 1; break; - case GL_LUMINANCE: sprintf(formatment, "LUMINANCE"); bpp = 1; break; - case GL_LUMINANCE_ALPHA: sprintf(formatment, "LUMINANCE_ALPHA"); bpp = 1; break; - case GL_RGB: sprintf(formatment, "RGB"); bpp = 2; break; - case GL_RGBA: sprintf(formatment, "RGBA"); bpp = 4; break; - case 0x80E1: sprintf(formatment, "BGRA_EXT"); bpp = 4; break; - case 0x84F9: sprintf(formatment, "DEPTH_STENCIL_OES"); bpp = 4; break; - case GL_DEPTH_COMPONENT : sprintf(formatment, "DEPTH_COMPONENT"); bpp = 1; break; - case 0x81A5: sprintf(formatment, "DEPTH_COMPONENT16_ARB"); bpp = 2; break; - case 0x81A6: sprintf(formatment, "DEPTH_COMPONENT24_ARB"); bpp = 3; break; - case 0x81A7: sprintf(formatment, "DEPTH_COMPONENT32_ARB"); bpp = 4; break; - case 0x8D46 : sprintf(formatment, "STENCIL_INDEX1_OES"); bpp = 1; break; - case 0x8D47 : sprintf(formatment, "STENCIL_INDEX4_OES"); bpp = 1; break; - case 0x8D48 : sprintf(formatment, "STENCIL_INDEX8_OES"); bpp = 1; break; - default: sprintf(formatment, "0x%X", internalformat); bpp = 0; break; + switch (internalformat) { + case GL_ALPHA: + sprintf(formatment, "ALPHA"); + bpp = 1; + break; + case GL_LUMINANCE: + sprintf(formatment, "LUMINANCE"); + bpp = 1; + break; + case GL_LUMINANCE_ALPHA: + sprintf(formatment, "LUMINANCE_ALPHA"); + bpp = 1; + break; + case GL_RGB: + sprintf(formatment, "RGB"); + bpp = 2; + break; + case GL_RGBA: + sprintf(formatment, "RGBA"); + bpp = 4; + break; + case 0x80E1: + sprintf(formatment, "BGRA_EXT"); + bpp = 4; + break; + case 0x84F9: + sprintf(formatment, "DEPTH_STENCIL_OES"); + bpp = 4; + break; + case GL_DEPTH_COMPONENT : + sprintf(formatment, "DEPTH_COMPONENT"); + bpp = 1; + break; + case 0x81A5: + sprintf(formatment, "DEPTH_COMPONENT16_ARB"); + bpp = 2; + break; + case 0x81A6: + sprintf(formatment, "DEPTH_COMPONENT24_ARB"); + bpp = 3; + break; + case 0x81A7: + sprintf(formatment, "DEPTH_COMPONENT32_ARB"); + bpp = 4; + break; + case 0x8D46 : + sprintf(formatment, "STENCIL_INDEX1_OES"); + bpp = 1; + break; + case 0x8D47 : + sprintf(formatment, "STENCIL_INDEX4_OES"); + bpp = 1; + break; + case 0x8D48 : + sprintf(formatment, "STENCIL_INDEX8_OES"); + bpp = 1; + break; + default: + sprintf(formatment, "0x%X", internalformat); + bpp = 0; + break; } - _add_glbuf_object(tstate->ctx->sostate->glbuf_tex, objidx, "Texture", width, height, bpp, formatment); + _add_glbuf_object(tstate->ctx->sostate->glbuf_tex, objidx, "Texture", width, + height, bpp, formatment); } } #endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_TEXTURE_BINDING_2D, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); { int channel = 0; - switch (internalformat) - { - case GL_ALPHA: - case GL_LUMINANCE: - case GL_DEPTH_COMPONENT : - case 0x81A5: - case 0x81A6: - case 0x81A7: - case 0x8D46 : - case 0x8D47 : - case 0x8D48 : channel = 1; break; - case GL_LUMINANCE_ALPHA: - case 0x84F9: channel = 2; break; - case GL_RGB: channel = 3; break; - case GL_RGBA: - case 0x80E1: channel = 4; break; + switch (internalformat) { + case GL_ALPHA: + case GL_LUMINANCE: + case GL_DEPTH_COMPONENT : + case 0x81A5: + case 0x81A6: + case 0x81A7: + case 0x8D46 : + case 0x8D47 : + case 0x8D48 : + channel = 1; + break; + case GL_LUMINANCE_ALPHA: + case 0x84F9: + channel = 2; + break; + case GL_RGB: + channel = 3; + break; + case GL_RGBA: + case 0x80E1: + channel = 4; + break; } char name[256]; sprintf(name, "FBOTEX_0x%X", objidx); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, -1, objidx, 0, width, height, channel, NULL); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, -1, objidx, 0, width, height, channel, NULL); } } } @@ -1912,7 +2033,7 @@ finish: } void -tracepath_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) +tracepath_glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glTexParameterfv(target, pname, params); @@ -1936,7 +2057,7 @@ finish: } void -tracepath_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) +tracepath_glTexParameteriv(GLenum target, GLenum pname, const GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glTexParameteriv(target, pname, params); @@ -1948,10 +2069,13 @@ finish: } void -tracepath_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) +tracepath_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, + const void *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + _orig_tracepath_glTexSubImage2D(target, level, xoffset, yoffset, width, height, + format, type, pixels); goto finish; @@ -1972,7 +2096,7 @@ finish: } void -tracepath_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) +tracepath_glUniform1fv(GLint location, GLsizei count, const GLfloat *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform1fv(location, count, v); @@ -1996,7 +2120,7 @@ finish: } void -tracepath_glUniform1iv(GLint location, GLsizei count, const GLint* v) +tracepath_glUniform1iv(GLint location, GLsizei count, const GLint *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform1iv(location, count, v); @@ -2020,7 +2144,7 @@ finish: } void -tracepath_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) +tracepath_glUniform2fv(GLint location, GLsizei count, const GLfloat *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform2fv(location, count, v); @@ -2044,7 +2168,7 @@ finish: } void -tracepath_glUniform2iv(GLint location, GLsizei count, const GLint* v) +tracepath_glUniform2iv(GLint location, GLsizei count, const GLint *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform2iv(location, count, v); @@ -2068,7 +2192,7 @@ finish: } void -tracepath_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) +tracepath_glUniform3fv(GLint location, GLsizei count, const GLfloat *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform3fv(location, count, v); @@ -2092,7 +2216,7 @@ finish: } void -tracepath_glUniform3iv(GLint location, GLsizei count, const GLint* v) +tracepath_glUniform3iv(GLint location, GLsizei count, const GLint *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform3iv(location, count, v); @@ -2104,7 +2228,8 @@ finish: } void -tracepath_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +tracepath_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, + GLfloat w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform4f(location, x, y, z, w); @@ -2116,7 +2241,7 @@ finish: } void -tracepath_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) +tracepath_glUniform4fv(GLint location, GLsizei count, const GLfloat *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform4fv(location, count, v); @@ -2140,7 +2265,7 @@ finish: } void -tracepath_glUniform4iv(GLint location, GLsizei count, const GLint* v) +tracepath_glUniform4iv(GLint location, GLsizei count, const GLint *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform4iv(location, count, v); @@ -2152,7 +2277,8 @@ finish: } void -tracepath_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix2fv(location, count, transpose, value); @@ -2164,7 +2290,8 @@ finish: } void -tracepath_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix3fv(location, count, transpose, value); @@ -2176,7 +2303,8 @@ finish: } void -tracepath_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix4fv(location, count, transpose, value); @@ -2224,7 +2352,7 @@ finish: } void -tracepath_glVertexAttrib1fv(GLuint index, const GLfloat* values) +tracepath_glVertexAttrib1fv(GLuint index, const GLfloat *values) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttrib1fv(index, values); @@ -2248,7 +2376,7 @@ finish: } void -tracepath_glVertexAttrib2fv(GLuint index, const GLfloat* values) +tracepath_glVertexAttrib2fv(GLuint index, const GLfloat *values) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttrib2fv(index, values); @@ -2272,7 +2400,7 @@ finish: } void -tracepath_glVertexAttrib3fv(GLuint index, const GLfloat* values) +tracepath_glVertexAttrib3fv(GLuint index, const GLfloat *values) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttrib3fv(index, values); @@ -2284,7 +2412,8 @@ finish: } void -tracepath_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +tracepath_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, + GLfloat w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttrib4f(index, x, y, z, w); @@ -2296,7 +2425,7 @@ finish: } void -tracepath_glVertexAttrib4fv(GLuint index, const GLfloat* values) +tracepath_glVertexAttrib4fv(GLuint index, const GLfloat *values) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttrib4fv(index, values); @@ -2308,10 +2437,12 @@ finish: } void -tracepath_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) +tracepath_glVertexAttribPointer(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, const void *pointer) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glVertexAttribPointer(index, size, type, normalized, stride, pointer); + _orig_tracepath_glVertexAttribPointer(index, size, type, normalized, stride, + pointer); goto finish; @@ -2346,7 +2477,8 @@ finish: } void -tracepath_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) +tracepath_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, const GLvoid *indices) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDrawRangeElements(mode, start, end, count, type, indices); @@ -2358,10 +2490,13 @@ finish: } void -tracepath_glTexImage3D(GLenum target, GLint level, GLint GLinternalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) +tracepath_glTexImage3D(GLenum target, GLint level, GLint GLinternalFormat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, + GLenum type, const GLvoid *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexImage3D(target, level, GLinternalFormat, width, height, depth, border, format, type, pixels); + _orig_tracepath_glTexImage3D(target, level, GLinternalFormat, width, height, + depth, border, format, type, pixels); goto finish; @@ -2370,10 +2505,13 @@ finish: } void -tracepath_glTexImage3DOES(GLenum target, GLint level, GLenum GLinternalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) +tracepath_glTexImage3DOES(GLenum target, GLint level, GLenum GLinternalFormat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, + GLenum type, const void *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexImage3DOES(target, level, GLinternalFormat, width, height, depth, border, format, type, pixels); + _orig_tracepath_glTexImage3DOES(target, level, GLinternalFormat, width, height, + depth, border, format, type, pixels); goto finish; @@ -2382,10 +2520,13 @@ finish: } void -tracepath_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) +tracepath_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const GLvoid *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + _orig_tracepath_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, + height, depth, format, type, pixels); goto finish; @@ -2394,10 +2535,13 @@ finish: } void -tracepath_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) +tracepath_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLenum type, const GLvoid *pixels) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + _orig_tracepath_glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, + width, height, depth, format, type, pixels); goto finish; @@ -2406,10 +2550,12 @@ finish: } void -tracepath_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +tracepath_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + _orig_tracepath_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, + y, width, height); goto finish; @@ -2418,10 +2564,12 @@ finish: } void -tracepath_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +tracepath_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); + _orig_tracepath_glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, + x, y, width, height); goto finish; @@ -2430,10 +2578,13 @@ finish: } void -tracepath_glCompressedTexImage3D(GLenum target, GLint level, GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) +tracepath_glCompressedTexImage3D(GLenum target, GLint level, + GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const GLvoid *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCompressedTexImage3D(target, level, GLinternalformat, width, height, depth, border, imageSize, data); + _orig_tracepath_glCompressedTexImage3D(target, level, GLinternalformat, width, + height, depth, border, imageSize, data); goto finish; @@ -2442,10 +2593,13 @@ finish: } void -tracepath_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) +tracepath_glCompressedTexImage3DOES(GLenum target, GLint level, + GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, + GLint border, GLsizei imageSize, const GLvoid *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCompressedTexImage3DOES(target, level, GLinternalformat, width, height, depth, border, imageSize, data); + _orig_tracepath_glCompressedTexImage3DOES(target, level, GLinternalformat, + width, height, depth, border, imageSize, data); goto finish; @@ -2454,10 +2608,13 @@ finish: } void -tracepath_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) +tracepath_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, const GLvoid *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + _orig_tracepath_glCompressedTexSubImage3D(target, level, xoffset, yoffset, + zoffset, width, height, depth, format, imageSize, data); goto finish; @@ -2466,10 +2623,13 @@ finish: } void -tracepath_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) +tracepath_glCompressedTexSubImage3DOES(GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + _orig_tracepath_glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, + zoffset, width, height, depth, format, imageSize, data); goto finish; @@ -2478,7 +2638,7 @@ finish: } void -tracepath_glGenQueries(GLsizei n, GLuint* ids) +tracepath_glGenQueries(GLsizei n, GLuint *ids) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenQueries(n, ids); @@ -2490,7 +2650,7 @@ finish: } void -tracepath_glDeleteQueries(GLsizei n, const GLuint* ids) +tracepath_glDeleteQueries(GLsizei n, const GLuint *ids) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteQueries(n, ids); @@ -2541,7 +2701,7 @@ finish: } void -tracepath_glGetQueryiv(GLenum target, GLenum pname, GLint* params) +tracepath_glGetQueryiv(GLenum target, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetQueryiv(target, pname, params); @@ -2553,7 +2713,7 @@ finish: } void -tracepath_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) +tracepath_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetQueryObjectuiv(id, pname, params); @@ -2580,7 +2740,7 @@ finish: } void -tracepath_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) +tracepath_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetBufferPointerv(target, pname, params); @@ -2592,7 +2752,7 @@ finish: } void -tracepath_glDrawBuffers(GLsizei n, const GLenum* bufs) +tracepath_glDrawBuffers(GLsizei n, const GLenum *bufs) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDrawBuffers(n, bufs); @@ -2604,7 +2764,8 @@ finish: } void -tracepath_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix2x3fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix2x3fv(location, count, transpose, value); @@ -2616,7 +2777,8 @@ finish: } void -tracepath_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix3x2fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix3x2fv(location, count, transpose, value); @@ -2628,7 +2790,8 @@ finish: } void -tracepath_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix2x4fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix2x4fv(location, count, transpose, value); @@ -2640,7 +2803,8 @@ finish: } void -tracepath_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix4x2fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix4x2fv(location, count, transpose, value); @@ -2652,7 +2816,8 @@ finish: } void -tracepath_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix3x4fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix3x4fv(location, count, transpose, value); @@ -2664,7 +2829,8 @@ finish: } void -tracepath_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +tracepath_glUniformMatrix4x3fv(GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniformMatrix4x3fv(location, count, transpose, value); @@ -2676,10 +2842,13 @@ finish: } void -tracepath_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) +tracepath_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + _orig_tracepath_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, + dstX1, dstY1, mask, filter); goto finish; @@ -2688,24 +2857,24 @@ finish: } void -tracepath_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) +tracepath_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + _orig_tracepath_glRenderbufferStorageMultisample(target, samples, + internalformat, width, height); goto finish; finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); @@ -2713,65 +2882,116 @@ finish: // Detect byte per pixel int bpp = 0; char formatment[80]; - switch (internalformat) - { - case GL_ALPHA: sprintf(formatment, "ALPHA"); bpp = 1; break; - case GL_LUMINANCE: sprintf(formatment, "LUMINANCE"); bpp = 1; break; - case GL_LUMINANCE_ALPHA: sprintf(formatment, "LUMINANCE_ALPHA"); bpp = 1; break; - case GL_RGB: sprintf(formatment, "RGB"); bpp = 2; break; - case GL_RGBA: sprintf(formatment, "RGBA"); bpp = 4; break; - case 0x80E1: sprintf(formatment, "BGRA_EXT"); bpp = 4; break; - case 0x84F9: sprintf(formatment, "DEPTH_STENCIL_OES"); bpp = 4; break; - case GL_DEPTH_COMPONENT : sprintf(formatment, "DEPTH_COMPONENT"); bpp = 1; break; - case 0x81A5: sprintf(formatment, "DEPTH_COMPONENT16_ARB"); bpp = 2; break; - case 0x81A6: sprintf(formatment, "DEPTH_COMPONENT24_ARB"); bpp = 3; break; - case 0x81A7: sprintf(formatment, "DEPTH_COMPONENT32_ARB"); bpp = 4; break; - case 0x8D46 : sprintf(formatment, "STENCIL_INDEX1_OES"); bpp = 1; break; - case 0x8D47 : sprintf(formatment, "STENCIL_INDEX4_OES"); bpp = 1; break; - case 0x8D48 : sprintf(formatment, "STENCIL_INDEX8_OES"); bpp = 1; break; - default: sprintf(formatment, "0x%X", internalformat); bpp = 0; break; + switch (internalformat) { + case GL_ALPHA: + sprintf(formatment, "ALPHA"); + bpp = 1; + break; + case GL_LUMINANCE: + sprintf(formatment, "LUMINANCE"); + bpp = 1; + break; + case GL_LUMINANCE_ALPHA: + sprintf(formatment, "LUMINANCE_ALPHA"); + bpp = 1; + break; + case GL_RGB: + sprintf(formatment, "RGB"); + bpp = 2; + break; + case GL_RGBA: + sprintf(formatment, "RGBA"); + bpp = 4; + break; + case 0x80E1: + sprintf(formatment, "BGRA_EXT"); + bpp = 4; + break; + case 0x84F9: + sprintf(formatment, "DEPTH_STENCIL_OES"); + bpp = 4; + break; + case GL_DEPTH_COMPONENT : + sprintf(formatment, "DEPTH_COMPONENT"); + bpp = 1; + break; + case 0x81A5: + sprintf(formatment, "DEPTH_COMPONENT16_ARB"); + bpp = 2; + break; + case 0x81A6: + sprintf(formatment, "DEPTH_COMPONENT24_ARB"); + bpp = 3; + break; + case 0x81A7: + sprintf(formatment, "DEPTH_COMPONENT32_ARB"); + bpp = 4; + break; + case 0x8D46 : + sprintf(formatment, "STENCIL_INDEX1_OES"); + bpp = 1; + break; + case 0x8D47 : + sprintf(formatment, "STENCIL_INDEX4_OES"); + bpp = 1; + break; + case 0x8D48 : + sprintf(formatment, "STENCIL_INDEX8_OES"); + bpp = 1; + break; + default: + sprintf(formatment, "0x%X", internalformat); + bpp = 0; + break; } - _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", width, height, bpp, formatment); + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", width, + height, bpp, formatment); } } #endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); { int channel = 0; - switch (internalformat) - { - case GL_ALPHA: - case GL_LUMINANCE: - case GL_DEPTH_COMPONENT : - case 0x81A5: - case 0x81A6: - case 0x81A7: - case 0x8D46 : - case 0x8D47 : - case 0x8D48 : channel = 1; break; - case GL_LUMINANCE_ALPHA: - case 0x84F9: channel = 2; break; - case GL_RGB: channel = 3; break; - case GL_RGBA: - case 0x80E1: channel = 4; break; + switch (internalformat) { + case GL_ALPHA: + case GL_LUMINANCE: + case GL_DEPTH_COMPONENT : + case 0x81A5: + case 0x81A6: + case 0x81A7: + case 0x8D46 : + case 0x8D47 : + case 0x8D48 : + channel = 1; + break; + case GL_LUMINANCE_ALPHA: + case 0x84F9: + channel = 2; + break; + case GL_RGB: + channel = 3; + break; + case GL_RGBA: + case 0x80E1: + channel = 4; + break; } char name[256]; sprintf(name, "FBORB_0x%X", objidx); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, -1, 0, objidx, width, height, channel, NULL); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, -1, 0, objidx, width, height, channel, NULL); } } } @@ -2779,24 +2999,24 @@ finish: } void -tracepath_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) +tracepath_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); + _orig_tracepath_glRenderbufferStorageMultisampleEXT(target, samples, + internalformat, width, height); goto finish; finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); @@ -2804,65 +3024,116 @@ finish: // Detect byte per pixel int bpp = 0; char formatment[80]; - switch (internalformat) - { - case GL_ALPHA: sprintf(formatment, "ALPHA"); bpp = 1; break; - case GL_LUMINANCE: sprintf(formatment, "LUMINANCE"); bpp = 1; break; - case GL_LUMINANCE_ALPHA: sprintf(formatment, "LUMINANCE_ALPHA"); bpp = 1; break; - case GL_RGB: sprintf(formatment, "RGB"); bpp = 2; break; - case GL_RGBA: sprintf(formatment, "RGBA"); bpp = 4; break; - case 0x80E1: sprintf(formatment, "BGRA_EXT"); bpp = 4; break; - case 0x84F9: sprintf(formatment, "DEPTH_STENCIL_OES"); bpp = 4; break; - case GL_DEPTH_COMPONENT : sprintf(formatment, "DEPTH_COMPONENT"); bpp = 1; break; - case 0x81A5: sprintf(formatment, "DEPTH_COMPONENT16_ARB"); bpp = 2; break; - case 0x81A6: sprintf(formatment, "DEPTH_COMPONENT24_ARB"); bpp = 3; break; - case 0x81A7: sprintf(formatment, "DEPTH_COMPONENT32_ARB"); bpp = 4; break; - case 0x8D46 : sprintf(formatment, "STENCIL_INDEX1_OES"); bpp = 1; break; - case 0x8D47 : sprintf(formatment, "STENCIL_INDEX4_OES"); bpp = 1; break; - case 0x8D48 : sprintf(formatment, "STENCIL_INDEX8_OES"); bpp = 1; break; - default: sprintf(formatment, "0x%X", internalformat); bpp = 0; break; + switch (internalformat) { + case GL_ALPHA: + sprintf(formatment, "ALPHA"); + bpp = 1; + break; + case GL_LUMINANCE: + sprintf(formatment, "LUMINANCE"); + bpp = 1; + break; + case GL_LUMINANCE_ALPHA: + sprintf(formatment, "LUMINANCE_ALPHA"); + bpp = 1; + break; + case GL_RGB: + sprintf(formatment, "RGB"); + bpp = 2; + break; + case GL_RGBA: + sprintf(formatment, "RGBA"); + bpp = 4; + break; + case 0x80E1: + sprintf(formatment, "BGRA_EXT"); + bpp = 4; + break; + case 0x84F9: + sprintf(formatment, "DEPTH_STENCIL_OES"); + bpp = 4; + break; + case GL_DEPTH_COMPONENT : + sprintf(formatment, "DEPTH_COMPONENT"); + bpp = 1; + break; + case 0x81A5: + sprintf(formatment, "DEPTH_COMPONENT16_ARB"); + bpp = 2; + break; + case 0x81A6: + sprintf(formatment, "DEPTH_COMPONENT24_ARB"); + bpp = 3; + break; + case 0x81A7: + sprintf(formatment, "DEPTH_COMPONENT32_ARB"); + bpp = 4; + break; + case 0x8D46 : + sprintf(formatment, "STENCIL_INDEX1_OES"); + bpp = 1; + break; + case 0x8D47 : + sprintf(formatment, "STENCIL_INDEX4_OES"); + bpp = 1; + break; + case 0x8D48 : + sprintf(formatment, "STENCIL_INDEX8_OES"); + bpp = 1; + break; + default: + sprintf(formatment, "0x%X", internalformat); + bpp = 0; + break; } - _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", width, height, bpp, formatment); + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", width, + height, bpp, formatment); } } #endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (trace_surface_flag == 1) - { + if (trace_surface_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); { int channel = 0; - switch (internalformat) - { - case GL_ALPHA: - case GL_LUMINANCE: - case GL_DEPTH_COMPONENT : - case 0x81A5: - case 0x81A6: - case 0x81A7: - case 0x8D46 : - case 0x8D47 : - case 0x8D48 : channel = 1; break; - case GL_LUMINANCE_ALPHA: - case 0x84F9: channel = 2; break; - case GL_RGB: channel = 3; break; - case GL_RGBA: - case 0x80E1: channel = 4; break; + switch (internalformat) { + case GL_ALPHA: + case GL_LUMINANCE: + case GL_DEPTH_COMPONENT : + case 0x81A5: + case 0x81A6: + case 0x81A7: + case 0x8D46 : + case 0x8D47 : + case 0x8D48 : + channel = 1; + break; + case GL_LUMINANCE_ALPHA: + case 0x84F9: + channel = 2; + break; + case GL_RGB: + channel = 3; + break; + case GL_RGBA: + case 0x80E1: + channel = 4; + break; } char name[256]; sprintf(name, "FBORB_0x%X", objidx); - tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, tstate->surf_draw, -1, 0, objidx, width, height, channel, NULL); + tracepath_surface_trace_add(name, tstate->ctx->dpy, tstate->ctx->handle, + tstate->surf_draw, -1, 0, objidx, width, height, channel, NULL); } } } @@ -2870,7 +3141,8 @@ finish: } void -tracepath_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) +tracepath_glFramebufferTextureLayer(GLenum target, GLenum attachment, + GLuint texture, GLint level, GLint layer) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -2878,7 +3150,8 @@ tracepath_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint tex tracepath_fbdump_update(0); #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO - _orig_tracepath_glFramebufferTextureLayer(target, attachment, texture, level, layer); + _orig_tracepath_glFramebufferTextureLayer(target, attachment, texture, level, + layer); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO tracepath_fbdump_update(1); @@ -2890,10 +3163,11 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -GLvoid* -tracepath_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) +GLvoid * +tracepath_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access) { - GLvoid* ret = NULL; + GLvoid *ret = NULL; _COREGL_TRACEPATH_FUNC_BEGIN(); ret = _orig_tracepath_glMapBufferRange(target, offset, length, access); @@ -2906,7 +3180,8 @@ finish: } void -tracepath_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) +tracepath_glFlushMappedBufferRange(GLenum target, GLintptr offset, + GLsizeiptr length) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glFlushMappedBufferRange(target, offset, length); @@ -2930,7 +3205,7 @@ finish: } void -tracepath_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) +tracepath_glDeleteVertexArrays(GLsizei n, const GLuint *arrays) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteVertexArrays(n, arrays); @@ -2942,7 +3217,7 @@ finish: } void -tracepath_glGenVertexArrays(GLsizei n, GLuint* arrays) +tracepath_glGenVertexArrays(GLsizei n, GLuint *arrays) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenVertexArrays(n, arrays); @@ -2969,7 +3244,7 @@ finish: } void -tracepath_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) +tracepath_glGetIntegeri_v(GLenum target, GLuint index, GLint *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetIntegeri_v(target, index, data); @@ -3005,7 +3280,8 @@ finish: } void -tracepath_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) +tracepath_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, + GLintptr offset, GLsizeiptr size) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBindBufferRange(target, index, buffer, offset, size); @@ -3029,10 +3305,12 @@ finish: } void -tracepath_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) +tracepath_glTransformFeedbackVaryings(GLuint program, GLsizei count, + const GLchar *const *varyings, GLenum bufferMode) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTransformFeedbackVaryings(program, count, varyings, bufferMode); + _orig_tracepath_glTransformFeedbackVaryings(program, count, varyings, + bufferMode); goto finish; @@ -3041,10 +3319,12 @@ finish: } void -tracepath_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) +tracepath_glGetTransformFeedbackVarying(GLuint program, GLuint index, + GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); + _orig_tracepath_glGetTransformFeedbackVarying(program, index, bufSize, length, + size, type, name); goto finish; @@ -3053,7 +3333,8 @@ finish: } void -tracepath_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) +tracepath_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttribIPointer(index, size, type, stride, pointer); @@ -3065,7 +3346,7 @@ finish: } void -tracepath_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) +tracepath_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetVertexAttribIiv(index, pname, params); @@ -3077,7 +3358,7 @@ finish: } void -tracepath_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) +tracepath_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetVertexAttribIuiv(index, pname, params); @@ -3101,7 +3382,8 @@ finish: } void -tracepath_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) +tracepath_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, + GLuint w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttribI4ui(index, x, y, z, w); @@ -3113,7 +3395,7 @@ finish: } void -tracepath_glVertexAttribI4iv(GLuint index, const GLint* v) +tracepath_glVertexAttribI4iv(GLuint index, const GLint *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttribI4iv(index, v); @@ -3125,7 +3407,7 @@ finish: } void -tracepath_glVertexAttribI4uiv(GLuint index, const GLuint* v) +tracepath_glVertexAttribI4uiv(GLuint index, const GLuint *v) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttribI4uiv(index, v); @@ -3137,7 +3419,7 @@ finish: } void -tracepath_glGetUniformuiv(GLuint program, GLint location, GLuint* params) +tracepath_glGetUniformuiv(GLuint program, GLint location, GLuint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetUniformuiv(program, location, params); @@ -3200,7 +3482,8 @@ finish: } void -tracepath_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +tracepath_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, + GLuint v3) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform4ui(location, v0, v1, v2, v3); @@ -3212,7 +3495,7 @@ finish: } void -tracepath_glUniform1uiv(GLint location, GLsizei count, const GLuint* value) +tracepath_glUniform1uiv(GLint location, GLsizei count, const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform1uiv(location, count, value); @@ -3224,7 +3507,7 @@ finish: } void -tracepath_glUniform2uiv(GLint location, GLsizei count, const GLuint* value) +tracepath_glUniform2uiv(GLint location, GLsizei count, const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform2uiv(location, count, value); @@ -3236,7 +3519,7 @@ finish: } void -tracepath_glUniform3uiv(GLint location, GLsizei count, const GLuint* value) +tracepath_glUniform3uiv(GLint location, GLsizei count, const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform3uiv(location, count, value); @@ -3248,7 +3531,7 @@ finish: } void -tracepath_glUniform4uiv(GLint location, GLsizei count, const GLuint* value) +tracepath_glUniform4uiv(GLint location, GLsizei count, const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUniform4uiv(location, count, value); @@ -3260,7 +3543,7 @@ finish: } void -tracepath_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) +tracepath_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glClearBufferiv(buffer, drawbuffer, value); @@ -3272,7 +3555,7 @@ finish: } void -tracepath_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) +tracepath_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glClearBufferuiv(buffer, drawbuffer, value); @@ -3284,7 +3567,7 @@ finish: } void -tracepath_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) +tracepath_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glClearBufferfv(buffer, drawbuffer, value); @@ -3296,7 +3579,8 @@ finish: } void -tracepath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +tracepath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, + GLint stencil) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glClearBufferfi(buffer, drawbuffer, depth, stencil); @@ -3307,10 +3591,10 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -const GLubyte* +const GLubyte * tracepath_glGetStringi(GLenum name, GLuint index) { - const GLubyte* ret = NULL; + const GLubyte *ret = NULL; _COREGL_TRACEPATH_FUNC_BEGIN(); ret = _orig_tracepath_glGetStringi(name, index); @@ -3323,10 +3607,12 @@ finish: } void -tracepath_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) +tracepath_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, + GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + _orig_tracepath_glCopyBufferSubData(readTarget, writeTarget, readOffset, + writeOffset, size); goto finish; @@ -3335,10 +3621,12 @@ finish: } void -tracepath_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) +tracepath_glGetUniformIndices(GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); + _orig_tracepath_glGetUniformIndices(program, uniformCount, uniformNames, + uniformIndices); goto finish; @@ -3347,10 +3635,12 @@ finish: } void -tracepath_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) +tracepath_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); + _orig_tracepath_glGetActiveUniformsiv(program, uniformCount, uniformIndices, + pname, params); goto finish; @@ -3359,7 +3649,7 @@ finish: } GLuint -tracepath_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) +tracepath_glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) { GLuint ret = _COREGL_INT_INIT_VALUE; @@ -3374,10 +3664,12 @@ finish: } void -tracepath_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) +tracepath_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, + GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); + _orig_tracepath_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, + params); goto finish; @@ -3386,10 +3678,12 @@ finish: } void -tracepath_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) +tracepath_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); + _orig_tracepath_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, + length, uniformBlockName); goto finish; @@ -3398,10 +3692,12 @@ finish: } void -tracepath_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) +tracepath_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); + _orig_tracepath_glUniformBlockBinding(program, uniformBlockIndex, + uniformBlockBinding); goto finish; @@ -3410,7 +3706,8 @@ finish: } void -tracepath_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) +tracepath_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, + GLsizei instanceCount) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDrawArraysInstanced(mode, first, count, instanceCount); @@ -3422,10 +3719,12 @@ finish: } void -tracepath_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) +tracepath_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei instanceCount) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glDrawElementsInstanced(mode, count, type, indices, instanceCount); + _orig_tracepath_glDrawElementsInstanced(mode, count, type, indices, + instanceCount); goto finish; @@ -3503,7 +3802,7 @@ finish: } void -tracepath_glGetInteger64v(GLenum pname, GLint64* params) +tracepath_glGetInteger64v(GLenum pname, GLint64 *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetInteger64v(pname, params); @@ -3515,7 +3814,8 @@ finish: } void -tracepath_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) +tracepath_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, + GLsizei *length, GLint *values) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetSynciv(sync, pname, bufSize, length, values); @@ -3527,7 +3827,7 @@ finish: } void -tracepath_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) +tracepath_glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetInteger64i_v(target, index, data); @@ -3539,7 +3839,7 @@ finish: } void -tracepath_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) +tracepath_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetBufferParameteri64v(target, pname, params); @@ -3551,7 +3851,7 @@ finish: } void -tracepath_glGenSamplers(GLsizei n, GLuint* samplers) +tracepath_glGenSamplers(GLsizei n, GLuint *samplers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenSamplers(n, samplers); @@ -3563,7 +3863,7 @@ finish: } void -tracepath_glDeleteSamplers(GLsizei n, const GLuint* samplers) +tracepath_glDeleteSamplers(GLsizei n, const GLuint *samplers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteSamplers(n, samplers); @@ -3614,7 +3914,7 @@ finish: } void -tracepath_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) +tracepath_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glSamplerParameteriv(sampler, pname, param); @@ -3638,7 +3938,8 @@ finish: } void -tracepath_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) +tracepath_glSamplerParameterfv(GLuint sampler, GLenum pname, + const GLfloat *param) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glSamplerParameterfv(sampler, pname, param); @@ -3650,7 +3951,7 @@ finish: } void -tracepath_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) +tracepath_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetSamplerParameteriv(sampler, pname, params); @@ -3662,7 +3963,7 @@ finish: } void -tracepath_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) +tracepath_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetSamplerParameterfv(sampler, pname, params); @@ -3698,7 +3999,7 @@ finish: } void -tracepath_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) +tracepath_glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteTransformFeedbacks(n, ids); @@ -3710,7 +4011,7 @@ finish: } void -tracepath_glGenTransformFeedbacks(GLsizei n, GLuint* ids) +tracepath_glGenTransformFeedbacks(GLsizei n, GLuint *ids) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenTransformFeedbacks(n, ids); @@ -3761,10 +4062,12 @@ finish: } void -tracepath_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) +tracepath_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, GLvoid *binary) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetProgramBinary(program, bufSize, length, binaryFormat, binary); + _orig_tracepath_glGetProgramBinary(program, bufSize, length, binaryFormat, + binary); goto finish; @@ -3773,10 +4076,12 @@ finish: } void -tracepath_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) +tracepath_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, + GLsizei *length, GLenum *binaryFormat, GLvoid *binary) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary); + _orig_tracepath_glGetProgramBinaryOES(program, bufSize, length, binaryFormat, + binary); goto finish; @@ -3785,7 +4090,8 @@ finish: } void -tracepath_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) +tracepath_glProgramBinary(GLuint program, GLenum binaryFormat, + const GLvoid *binary, GLsizei length) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramBinary(program, binaryFormat, binary, length); @@ -3797,7 +4103,8 @@ finish: } void -tracepath_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) +tracepath_glProgramBinaryOES(GLuint program, GLenum binaryFormat, + const GLvoid *binary, GLsizei length) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramBinaryOES(program, binaryFormat, binary, length); @@ -3821,7 +4128,8 @@ finish: } void -tracepath_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) +tracepath_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, + const GLenum *attachments) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glInvalidateFramebuffer(target, numAttachments, attachments); @@ -3833,7 +4141,8 @@ finish: } void -tracepath_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum* attachments) +tracepath_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, + const GLenum *attachments) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDiscardFramebufferEXT(target, numAttachments, attachments); @@ -3845,10 +4154,12 @@ finish: } void -tracepath_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) +tracepath_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); + _orig_tracepath_glInvalidateSubFramebuffer(target, numAttachments, attachments, + x, y, width, height); goto finish; @@ -3857,7 +4168,8 @@ finish: } void -tracepath_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +tracepath_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glTexStorage2D(target, levels, internalformat, width, height); @@ -3869,10 +4181,12 @@ finish: } void -tracepath_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) +tracepath_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexStorage3D(target, levels, internalformat, width, height, depth); + _orig_tracepath_glTexStorage3D(target, levels, internalformat, width, height, + depth); goto finish; @@ -3881,10 +4195,12 @@ finish: } void -tracepath_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) +tracepath_glGetInternalformativ(GLenum target, GLenum internalformat, + GLenum pname, GLsizei bufSize, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetInternalformativ(target, internalformat, pname, bufSize, params); + _orig_tracepath_glGetInternalformativ(target, internalformat, pname, bufSize, + params); goto finish; @@ -3905,26 +4221,26 @@ tracepath_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_TEXTURE_BINDING_2D, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); - _add_glbuf_object(tstate->ctx->sostate->glbuf_tex, objidx, "Texture", 0, 0, 0, "Unknown"); + _add_glbuf_object(tstate->ctx->sostate->glbuf_tex, objidx, "Texture", 0, 0, 0, + "Unknown"); } } #endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO } void -tracepath_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) +tracepath_glEGLImageTargetRenderbufferStorageOES(GLenum target, + GLeglImageOES image) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glEGLImageTargetRenderbufferStorageOES(target, image); @@ -3933,26 +4249,26 @@ tracepath_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES im finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { + if (tstate->ctx != NULL) { int objidx = _COREGL_INT_INIT_VALUE; _orig_tracepath_glGetIntegerv(GL_RENDERBUFFER_BINDING, &objidx); AST(objidx != _COREGL_INT_INIT_VALUE); - _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", 0, 0, 0, "Unknown"); + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, objidx, "Renderbuffer", 0, 0, + 0, "Unknown"); } } #endif // COREGL_TRACEPATH_TRACE_MEMUSE_INFO } void -tracepath_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) +tracepath_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, + GLuint program) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glUseProgramStagesEXT(pipeline, stages, program); @@ -3976,7 +4292,8 @@ finish: } GLuint -tracepath_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const char **strings) +tracepath_glCreateShaderProgramvEXT(GLenum type, GLsizei count, + const char **strings) { GLuint ret = _COREGL_INT_INIT_VALUE; @@ -3987,7 +4304,7 @@ tracepath_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const char **str finish: _COREGL_TRACEPATH_FUNC_END(); - return ret; + return ret; } void @@ -4038,7 +4355,7 @@ tracepath_glIsProgramPipelineEXT(GLuint pipeline) finish: _COREGL_TRACEPATH_FUNC_END(); - return ret; + return ret; } void @@ -4054,7 +4371,8 @@ finish: } void -tracepath_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) +tracepath_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, + GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetProgramPipelineivEXT(pipeline, pname, params); @@ -4078,7 +4396,8 @@ finish: } void -tracepath_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) +tracepath_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, + GLint y) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2iEXT(program, location, x, y); @@ -4090,7 +4409,8 @@ finish: } void -tracepath_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) +tracepath_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, + GLint y, GLint z) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3iEXT(program, location, x, y, z); @@ -4102,7 +4422,8 @@ finish: } void -tracepath_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +tracepath_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, + GLint y, GLint z, GLint w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4iEXT(program, location, x, y, z, w); @@ -4126,7 +4447,8 @@ finish: } void -tracepath_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) +tracepath_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, + GLfloat y) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2fEXT(program, location, x, y); @@ -4138,7 +4460,8 @@ finish: } void -tracepath_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +tracepath_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3fEXT(program, location, x, y, z); @@ -4150,7 +4473,8 @@ finish: } void -tracepath_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +tracepath_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z, GLfloat w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4fEXT(program, location, x, y, z, w); @@ -4162,7 +4486,8 @@ finish: } void -tracepath_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform1ivEXT(program, location, count, value); @@ -4174,7 +4499,8 @@ finish: } void -tracepath_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2ivEXT(program, location, count, value); @@ -4186,7 +4512,8 @@ finish: } void -tracepath_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3ivEXT(program, location, count, value); @@ -4198,7 +4525,8 @@ finish: } void -tracepath_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4ivEXT(program, location, count, value); @@ -4210,7 +4538,8 @@ finish: } void -tracepath_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform1fvEXT(program, location, count, value); @@ -4222,7 +4551,8 @@ finish: } void -tracepath_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2fvEXT(program, location, count, value); @@ -4234,7 +4564,8 @@ finish: } void -tracepath_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3fvEXT(program, location, count, value); @@ -4246,7 +4577,8 @@ finish: } void -tracepath_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4fvEXT(program, location, count, value); @@ -4258,10 +4590,12 @@ finish: } void -tracepath_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix2fvEXT(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix2fvEXT(program, location, count, + transpose, value); goto finish; @@ -4270,10 +4604,12 @@ finish: } void -tracepath_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix3fvEXT(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix3fvEXT(program, location, count, + transpose, value); goto finish; @@ -4282,10 +4618,12 @@ finish: } void -tracepath_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix4fvEXT(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix4fvEXT(program, location, count, + transpose, value); goto finish; @@ -4306,10 +4644,12 @@ finish: } void -tracepath_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, char *infoLog) +tracepath_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, + GLsizei *length, char *infoLog) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog); + _orig_tracepath_glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, + infoLog); goto finish; @@ -4319,7 +4659,8 @@ finish: void -tracepath_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) +tracepath_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, GLsizei samples) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -4327,7 +4668,8 @@ tracepath_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, tracepath_fbdump_update(0); #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO - _orig_tracepath_glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); + _orig_tracepath_glFramebufferTexture2DMultisampleEXT(target, attachment, + textarget, texture, level, samples); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO tracepath_fbdump_update(1); @@ -4340,10 +4682,12 @@ finish: } void -tracepath_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) +tracepath_glFramebufferTexture3DOES(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level, GLint zoffset) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); + _orig_tracepath_glFramebufferTexture3DOES(target, attachment, textarget, + texture, level, zoffset); goto finish; @@ -4458,7 +4802,7 @@ finish: void -tracepath_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params) +tracepath_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid **params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetBufferPointervOES(target, pname, params); @@ -4482,7 +4826,7 @@ tracepath_glMapBufferOES(GLenum target, GLenum access) finish: _COREGL_TRACEPATH_FUNC_END(); - return ret; + return ret; } @@ -4498,12 +4842,13 @@ tracepath_glUnmapBufferOES(GLenum target) finish: _COREGL_TRACEPATH_FUNC_END(); - return ret; + return ret; } /* GLES3.1 API */ void -tracepath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +tracepath_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); @@ -4515,7 +4860,8 @@ finish: } GLuint -tracepath_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +tracepath_glCreateShaderProgramv(GLenum type, GLsizei count, + const GLchar *const *strings) { GLboolean ret = GL_FALSE; _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -4525,7 +4871,7 @@ tracepath_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *con finish: _COREGL_TRACEPATH_FUNC_END(); - return ret; + return ret; } void @@ -4604,7 +4950,8 @@ finish: } void -tracepath_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) +tracepath_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, + GLuint num_groups_z) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); @@ -4640,7 +4987,8 @@ finish: } void -tracepath_glDrawElementsIndirect(GLenum mode, GLenum type, GLvoid const *indirect) +tracepath_glDrawElementsIndirect(GLenum mode, GLenum type, + GLvoid const *indirect) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDrawElementsIndirect(mode, type, indirect); @@ -4664,7 +5012,8 @@ finish: } void -tracepath_glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint * params) +tracepath_glGetFramebufferParameteriv( GLenum target, GLenum pname, + GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetFramebufferParameteriv(target, pname, params); @@ -4676,10 +5025,12 @@ finish: } void -tracepath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +tracepath_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, + GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetProgramInterfaceiv(program, programInterface, pname, params); + _orig_tracepath_glGetProgramInterfaceiv(program, programInterface, pname, + params); goto finish; @@ -4688,11 +5039,13 @@ finish: } GLuint -tracepath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +tracepath_glGetProgramResourceIndex( GLuint program, GLenum programInterface, + const char *name) { GLuint ret = GL_INVALID_INDEX; _COREGL_TRACEPATH_FUNC_BEGIN(); - ret = _orig_tracepath_glGetProgramResourceIndex(program, programInterface, name); + ret = _orig_tracepath_glGetProgramResourceIndex(program, programInterface, + name); goto finish; @@ -4702,11 +5055,13 @@ finish: } void -tracepath_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +tracepath_glGetProgramResourceName(GLuint program, GLenum programInterface, + GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); + _orig_tracepath_glGetProgramResourceName(program, programInterface, index, + bufSize, length, name); goto finish; @@ -4715,11 +5070,14 @@ finish: } void -tracepath_glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +tracepath_glGetProgramResourceiv( GLuint program, GLenum programInterface, + GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, + GLsizei *length, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); + _orig_tracepath_glGetProgramResourceiv(program, programInterface, index, + propCount, props, bufSize, length, params); goto finish; @@ -4728,12 +5086,14 @@ finish: } GLint -tracepath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +tracepath_glGetProgramResourceLocation(GLuint program, GLenum programInterface, + GLchar const *name) { GLuint ret = -1; _COREGL_TRACEPATH_FUNC_BEGIN(); - ret = _orig_tracepath_glGetProgramResourceLocation(program, programInterface, name); + ret = _orig_tracepath_glGetProgramResourceLocation(program, programInterface, + name); goto finish; @@ -4767,7 +5127,8 @@ finish: } void -tracepath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform1iv(program, location, count, value); @@ -4779,7 +5140,8 @@ finish: } void -tracepath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2iv(program, location, count, value); @@ -4791,7 +5153,8 @@ finish: } void -tracepath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3iv(program, location, count, value); @@ -4803,7 +5166,8 @@ finish: } void -tracepath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +tracepath_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4iv(program, location, count, value); @@ -4815,7 +5179,8 @@ finish: } void -tracepath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform1fv(program, location, count, value); @@ -4827,7 +5192,8 @@ finish: } void -tracepath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2fv(program, location, count, value); @@ -4839,7 +5205,8 @@ finish: } void -tracepath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3fv(program, location, count, value); @@ -4851,7 +5218,8 @@ finish: } void -tracepath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +tracepath_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4fv(program, location, count, value); @@ -4863,10 +5231,12 @@ finish: } void -tracepath_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix2fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix2fv(program, location, count, transpose, + value); goto finish; @@ -4875,10 +5245,12 @@ finish: } void -tracepath_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix3fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix3fv(program, location, count, transpose, + value); goto finish; @@ -4887,10 +5259,12 @@ finish: } void -tracepath_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix4fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix4fv(program, location, count, transpose, + value); goto finish; @@ -4923,7 +5297,8 @@ finish: } void -tracepath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) +tracepath_glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, + GLint z) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3i(program, location, x, y, z); @@ -4935,7 +5310,8 @@ finish: } void -tracepath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +tracepath_glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, + GLint z, GLint w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4i(program, location, x, y, z, w); @@ -4959,7 +5335,8 @@ finish: } void -tracepath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) +tracepath_glProgramUniform2f(GLuint program, GLint location, GLfloat x, + GLfloat y) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2f(program, location, x, y); @@ -4971,7 +5348,8 @@ finish: } void -tracepath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +tracepath_glProgramUniform3f(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3f(program, location, x, y, z); @@ -4983,7 +5361,8 @@ finish: } void -tracepath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +tracepath_glProgramUniform4f(GLuint program, GLint location, GLfloat x, + GLfloat y, GLfloat z, GLfloat w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4f(program, location, x, y, z, w); @@ -5007,7 +5386,8 @@ finish: } void -tracepath_glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) +tracepath_glProgramUniform2ui(GLuint program, GLint location, GLuint x, + GLuint y) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2ui(program, location, x, y); @@ -5019,7 +5399,8 @@ finish: } void -tracepath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +tracepath_glProgramUniform3ui(GLuint program, GLint location, GLuint x, + GLuint y, GLuint z) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3ui(program, location, x, y, z); @@ -5031,7 +5412,8 @@ finish: } void -tracepath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +tracepath_glProgramUniform4ui(GLuint program, GLint location, GLuint x, + GLuint y, GLuint z, GLuint w) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4ui(program, location, x, y, z, w); @@ -5043,7 +5425,8 @@ finish: } void -tracepath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +tracepath_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform1uiv(program, location, count, value); @@ -5055,7 +5438,8 @@ finish: } void -tracepath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +tracepath_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform2uiv(program, location, count, value); @@ -5067,7 +5451,8 @@ finish: } void -tracepath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +tracepath_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform3uiv(program, location, count, value); @@ -5079,7 +5464,8 @@ finish: } void -tracepath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +tracepath_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glProgramUniform4uiv(program, location, count, value); @@ -5091,10 +5477,12 @@ finish: } void -tracepath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix2x3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix2x3fv(program, location, count, transpose, + value); goto finish; @@ -5103,10 +5491,12 @@ finish: } void -tracepath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix3x2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix3x2fv(program, location, count, transpose, + value); goto finish; @@ -5115,10 +5505,12 @@ finish: } void -tracepath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix4x2fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix4x2fv(program, location, count, transpose, + value); goto finish; @@ -5127,10 +5519,12 @@ finish: } void -tracepath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix2x4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix2x4fv(program, location, count, transpose, + value); goto finish; @@ -5139,10 +5533,12 @@ finish: } void -tracepath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix3x4fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix3x4fv(program, location, count, transpose, + value); goto finish; @@ -5151,10 +5547,12 @@ finish: } void -tracepath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +tracepath_glProgramUniformMatrix4x3fv(GLuint program, GLint location, + GLsizei count, GLboolean transpose, const GLfloat *value) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); + _orig_tracepath_glProgramUniformMatrix4x3fv(program, location, count, transpose, + value); goto finish; @@ -5163,11 +5561,13 @@ finish: } void -tracepath_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +tracepath_glBindImageTexture(GLuint unit, GLuint texture, GLint level, + GLboolean layered, GLint layer, GLenum access, GLenum format) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glBindImageTexture(unit, texture, level, layered, layer, access, format); + _orig_tracepath_glBindImageTexture(unit, texture, level, layered, layer, access, + format); goto finish; @@ -5211,10 +5611,13 @@ finish: } void -tracepath_glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +tracepath_glTexStorage2DMultisample (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); + _orig_tracepath_glTexStorage2DMultisample (target, samples, internalformat, + width, height, fixedsamplelocations); goto finish; @@ -5247,7 +5650,8 @@ finish: } void -tracepath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +tracepath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, + GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetTexLevelParameteriv (target, level, pname, params); @@ -5259,7 +5663,8 @@ finish: } void -tracepath_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +tracepath_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, + GLfloat *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetTexLevelParameterfv (target, level, pname, params); @@ -5271,7 +5676,8 @@ finish: } void -tracepath_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +tracepath_glBindVertexBuffer (GLuint bindingindex, GLuint buffer, + GLintptr offset, GLsizei stride) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBindVertexBuffer (bindingindex, buffer, offset, stride); @@ -5283,10 +5689,12 @@ finish: } -void tracepath_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +void tracepath_glVertexAttribFormat (GLuint attribindex, GLint size, + GLenum type, GLboolean normalized, GLuint relativeoffset) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); + _orig_tracepath_glVertexAttribFormat (attribindex, size, type, normalized, + relativeoffset); goto finish; @@ -5294,7 +5702,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +void tracepath_glVertexAttribIFormat (GLuint attribindex, GLint size, + GLenum type, GLuint relativeoffset) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glVertexAttribIFormat (attribindex, size, type, relativeoffset); @@ -5332,12 +5741,10 @@ tracepath_glBindFramebufferOES(GLenum target, GLuint framebuffer) _COREGL_TRACEPATH_FUNC_BEGIN(); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (unlikely(trace_surface_flag == 1)) - { + if (unlikely(trace_surface_flag == 1)) { GLint oldfb; _orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb); - if (oldfb != 0) - { + if (oldfb != 0) { _COREGL_TRACE_SURFACE(0, 2, "GLBINDFBO"); } @@ -5348,8 +5755,7 @@ tracepath_glBindFramebufferOES(GLenum target, GLuint framebuffer) _orig_tracepath_glBindFramebufferOES(target, framebuffer); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO - if (unlikely(trace_surface_flag == 1)) - { + if (unlikely(trace_surface_flag == 1)) { tracepath_fbdump_update(1); } #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO @@ -5373,7 +5779,7 @@ finish: } void -tracepath_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) +tracepath_glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -5394,7 +5800,7 @@ finish: } void -tracepath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) +tracepath_glDeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -5413,18 +5819,16 @@ tracepath_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { - for (int i = 0; i < n; i++) - { + if (tstate->ctx != NULL) { + for (int i = 0; i < n; i++) { if (renderbuffers[i] == 0) continue; - _remove_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], "Renderbuffer"); + _remove_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], + "Renderbuffer"); } } } @@ -5456,7 +5860,8 @@ finish: } void -tracepath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +tracepath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -5464,7 +5869,8 @@ tracepath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum tracepath_fbdump_update(0); #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO - _orig_tracepath_glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); + _orig_tracepath_glFramebufferRenderbufferOES(target, attachment, + renderbuffertarget, renderbuffer); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO tracepath_fbdump_update(1); @@ -5477,7 +5883,8 @@ finish: } void -tracepath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +tracepath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level) { _COREGL_TRACEPATH_FUNC_BEGIN(); @@ -5485,7 +5892,8 @@ tracepath_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum tex tracepath_fbdump_update(0); #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO - _orig_tracepath_glFramebufferTexture2DOES(target, attachment, textarget, texture, level); + _orig_tracepath_glFramebufferTexture2DOES(target, attachment, textarget, + texture, level); #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO tracepath_fbdump_update(1); @@ -5498,7 +5906,7 @@ finish: } void -tracepath_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) +tracepath_glGenFramebuffersOES(GLsizei n, GLuint *framebuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenFramebuffersOES(n, framebuffers); @@ -5510,7 +5918,7 @@ finish: } void -tracepath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) +tracepath_glGenRenderbuffersOES(GLsizei n, GLuint *renderbuffers) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenRenderbuffersOES(n, renderbuffers); @@ -5520,18 +5928,16 @@ tracepath_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) finish: _COREGL_TRACEPATH_FUNC_END(); #ifdef COREGL_TRACEPATH_TRACE_MEMUSE_INFO - if (trace_mem_flag == 1) - { + if (trace_mem_flag == 1) { MY_MODULE_TSTATE *tstate = NULL; GET_MY_TSTATE(tstate, get_current_thread_state()); AST(tstate != NULL); - if (tstate->ctx != NULL) - { - for (int i = 0; i < n; i++) - { + if (tstate->ctx != NULL) { + for (int i = 0; i < n; i++) { if (renderbuffers[i] == 0) continue; - _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], "Renderbuffer", 0, 0, 0, "Unknown"); + _add_glbuf_object(tstate->ctx->sostate->glbuf_rb, renderbuffers[i], + "Renderbuffer", 0, 0, 0, "Unknown"); } } } @@ -5539,10 +5945,12 @@ finish: } void -tracepath_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) +tracepath_glGetFramebufferAttachmentParameterivOES(GLenum target, + GLenum attachment, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params); + _orig_tracepath_glGetFramebufferAttachmentParameterivOES(target, attachment, + pname, params); goto finish; @@ -5587,7 +5995,7 @@ finish: } void -tracepath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) +tracepath_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetQueryObjectuivEXT(id, pname, params); @@ -5599,7 +6007,7 @@ finish: } void -tracepath_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) +tracepath_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetQueryivEXT(target, pname, params); @@ -5624,7 +6032,7 @@ finish: void -tracepath_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) +tracepath_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteQueriesEXT(n, ids); @@ -5636,7 +6044,7 @@ finish: } void -tracepath_glGenQueriesEXT(GLsizei n, GLuint* ids) +tracepath_glGenQueriesEXT(GLsizei n, GLuint *ids) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenQueriesEXT(n, ids); @@ -5747,7 +6155,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +void tracepath_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha); @@ -5769,11 +6178,12 @@ GLenum tracepath_glCheckFramebufferStatusOES(GLenum target) finish: _COREGL_TRACEPATH_FUNC_END(); - return ret; + return ret; } -void tracepath_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +void tracepath_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, + GLclampx alpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glClearColorxOES(red, green, blue, alpha); @@ -5829,7 +6239,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +void tracepath_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, + GLfixed alpha) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glColor4xOES(red, green, blue, alpha); @@ -5840,7 +6251,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glDebugMessageCallback(GLDEBUGPROCKHR callback, void const *userParam) +void tracepath_glDebugMessageCallback(GLDEBUGPROCKHR callback, + void const *userParam) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDebugMessageCallback(callback, userParam); @@ -5851,7 +6263,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf) +void tracepath_glDebugMessageInsert(GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, GLchar const *buf) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDebugMessageInsert(source, type, id, severity, length, buf); @@ -5862,10 +6275,12 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled) +void tracepath_glDebugMessageControl(GLenum source, GLenum type, + GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glDebugMessageControl(source, type, severity, count, ids, enabled); + _orig_tracepath_glDebugMessageControl(source, type, severity, count, ids, + enabled); goto finish; @@ -5895,7 +6310,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +void tracepath_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, + GLfixed top, GLfixed zNear, GLfixed zFar) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glFrustumxOES(left, right, bottom, top, zNear, zFar); @@ -5906,7 +6322,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +void tracepath_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, + GLfloat top, GLfloat zNear, GLfloat zFar) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glFrustumfOES(left, right, bottom, top, zNear, zFar); @@ -5950,11 +6367,14 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -GLuint tracepath_glGetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) +GLuint tracepath_glGetDebugMessageLog(GLuint count, GLsizei bufsize, + GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog) { GLuint ret = GL_INVALID_INDEX; _COREGL_TRACEPATH_FUNC_BEGIN(); - ret = _orig_tracepath_glGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog); + ret = _orig_tracepath_glGetDebugMessageLog(count, bufsize, sources, types, ids, + severities, lengths, messageLog); goto finish; finish: @@ -5995,7 +6415,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +void tracepath_glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, + GLsizei *length, GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetObjectLabel(identifier, name, bufSize, length, label); @@ -6006,7 +6427,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glGetObjectPtrLabel(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) +void tracepath_glGetObjectPtrLabel(void const *ptr, GLsizei bufSize, + GLsizei *length, GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetObjectPtrLabel(ptr, bufSize, length, label); @@ -6028,7 +6450,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params) +void tracepath_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, + GLint *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetRenderbufferParameterivOES(target, pname, params); @@ -6050,7 +6473,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) +void tracepath_glGetTexParameterxvOES(GLenum target, GLenum pname, + GLfixed *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetTexParameterxvOES(target, pname, params); @@ -6173,7 +6597,8 @@ finish: } void -tracepath_glMultiTexCoord4bOES (GLenum target, GLbyte s, GLbyte t, GLbyte r, GLbyte q) +tracepath_glMultiTexCoord4bOES (GLenum target, GLbyte s, GLbyte t, GLbyte r, + GLbyte q) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glMultiTexCoord4bOES (target, s, t, r, q); @@ -6185,7 +6610,8 @@ finish: } void -tracepath_glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +tracepath_glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, + GLfixed q) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glMultiTexCoord4xOES (target, s, t, r, q); @@ -6209,7 +6635,8 @@ finish: } void -tracepath_glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label) +tracepath_glObjectLabel (GLenum identifier, GLuint name, GLsizei length, + const GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glObjectLabel (identifier, name, length, label); @@ -6220,7 +6647,8 @@ finish: } void -tracepath_glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label) +tracepath_glObjectPtrLabel (const void *ptr, GLsizei length, + const GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glObjectPtrLabel (ptr, length, label); @@ -6232,7 +6660,8 @@ finish: } void -tracepath_glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +tracepath_glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, + GLfloat zNear, GLfloat zFar) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glOrthofOES (left, right, bottom, top, zNear, zFar); @@ -6244,7 +6673,8 @@ finish: } void -tracepath_glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +tracepath_glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, + GLfixed zNear, GLfixed zFar) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glOrthoxOES (left, right, bottom, top, zNear, zFar); @@ -6316,7 +6746,8 @@ finish: } void -tracepath_glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message) +tracepath_glPushDebugGroup (GLenum source, GLuint id, GLsizei length, + const GLchar *message) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glPushDebugGroup (source, id, length, message); @@ -6340,10 +6771,12 @@ finish: } void -tracepath_glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +tracepath_glRenderbufferStorageOES (GLenum target, GLenum internalformat, + GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glRenderbufferStorageOES (target, internalformat, width, height); + _orig_tracepath_glRenderbufferStorageOES (target, internalformat, width, + height); goto finish; @@ -6424,7 +6857,8 @@ finish: } void -tracepath_glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params) +tracepath_glTexParameterxvOES (GLenum target, GLenum pname, + const GLfixed *params) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glTexParameterxvOES (target, pname, params); @@ -6436,10 +6870,12 @@ finish: } void -tracepath_glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +tracepath_glTexStorage2DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexStorage2DEXT (target, levels, internalformat, width, height); + _orig_tracepath_glTexStorage2DEXT (target, levels, internalformat, width, + height); goto finish; @@ -6448,10 +6884,12 @@ finish: } void -tracepath_glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) +tracepath_glTexStorage3DEXT (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexStorage3DEXT (target, levels, internalformat, width, height, depth); + _orig_tracepath_glTexStorage3DEXT (target, levels, internalformat, width, + height, depth); goto finish; @@ -6460,10 +6898,13 @@ finish: } void -tracepath_glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) +tracepath_glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glTexStorage3DMultisampleOES (target, samples, internalformat, width, height, depth, fixedsamplelocations); + _orig_tracepath_glTexStorage3DMultisampleOES (target, samples, internalformat, + width, height, depth, fixedsamplelocations); goto finish; @@ -6496,7 +6937,7 @@ finish: } void -tracepath_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) +tracepath_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDeleteVertexArraysOES(n, arrays); @@ -6508,7 +6949,7 @@ finish: } void -tracepath_glGenVertexArraysOES(GLsizei n, GLuint* arrays) +tracepath_glGenVertexArraysOES(GLsizei n, GLuint *arrays) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGenVertexArraysOES(n, arrays); @@ -6534,7 +6975,8 @@ finish: return ret; } -void tracepath_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, void const *userParam) +void tracepath_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, + void const *userParam) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glDebugMessageCallbackKHR(callback, userParam); @@ -6546,10 +6988,12 @@ finish: } -void tracepath_glDebugMessageControlKHR(GLenum source, GLenum type, GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled) +void tracepath_glDebugMessageControlKHR(GLenum source, GLenum type, + GLenum severity, GLsizei count, GLuint const *ids, GLboolean enabled) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glDebugMessageControlKHR(source, type, severity, count, ids, enabled); + _orig_tracepath_glDebugMessageControlKHR(source, type, severity, count, ids, + enabled); goto finish; @@ -6557,10 +7001,12 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, GLchar const *buf) +void tracepath_glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, GLchar const *buf) { _COREGL_TRACEPATH_FUNC_BEGIN(); - _orig_tracepath_glDebugMessageInsertKHR(source, type, id, severity, length, buf); + _orig_tracepath_glDebugMessageInsertKHR(source, type, id, severity, length, + buf); goto finish; @@ -6568,11 +7014,14 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -GLuint tracepath_glGetDebugMessageLogKHR(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog) +GLuint tracepath_glGetDebugMessageLogKHR(GLuint count, GLsizei bufsize, + GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, + GLsizei *lengths, GLchar *messageLog) { GLuint ret = GL_INVALID_INDEX; _COREGL_TRACEPATH_FUNC_BEGIN(); - ret = _orig_tracepath_glGetDebugMessageLogKHR(count, bufsize, sources, types, ids, severities, lengths, messageLog); + ret = _orig_tracepath_glGetDebugMessageLogKHR(count, bufsize, sources, types, + ids, severities, lengths, messageLog); goto finish; finish: @@ -6580,7 +7029,8 @@ finish: return ret; } -void tracepath_glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label) +void tracepath_glGetObjectLabelKHR(GLenum identifier, GLuint name, + GLsizei bufSize, GLsizei *length, GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetObjectLabelKHR(identifier, name, bufSize, length, label); @@ -6591,7 +7041,8 @@ finish: _COREGL_TRACEPATH_FUNC_END(); } -void tracepath_glGetObjectPtrLabelKHR(void const *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) +void tracepath_glGetObjectPtrLabelKHR(void const *ptr, GLsizei bufSize, + GLsizei *length, GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glGetObjectPtrLabelKHR(ptr, bufSize, length, label); @@ -6615,7 +7066,8 @@ finish: } void -tracepath_glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label) +tracepath_glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, + const GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glObjectLabelKHR (identifier, name, length, label); @@ -6626,7 +7078,8 @@ finish: } void -tracepath_glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label) +tracepath_glObjectPtrLabelKHR (const void *ptr, GLsizei length, + const GLchar *label) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glObjectPtrLabelKHR (ptr, length, label); @@ -6650,7 +7103,8 @@ finish: } void -tracepath_glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message) +tracepath_glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, + const GLchar *message) { _COREGL_TRACEPATH_FUNC_BEGIN(); _orig_tracepath_glPushDebugGroupKHR (source, id, length, message); diff --git a/src/modules/tracepath/png.h b/src/modules/tracepath/png.h index 3560969..94e8a57 100644 --- a/src/modules/tracepath/png.h +++ b/src/modules/tracepath/png.h @@ -618,7 +618,7 @@ extern "C" { */ #ifdef PNG_USE_GLOBAL_ARRAYS PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18]; - /* Need room for 99.99.99beta99z */ +/* Need room for 99.99.99beta99z */ #else #define png_libpng_ver png_get_header_ver(NULL) #endif @@ -643,66 +643,61 @@ PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7]; * exact size) is not important, although the size of the fields need to * be png_byte or png_uint_16 (as defined below). */ -typedef struct png_color_struct -{ - png_byte red; - png_byte green; - png_byte blue; +typedef struct png_color_struct { + png_byte red; + png_byte green; + png_byte blue; } png_color; -typedef png_color FAR * png_colorp; -typedef png_color FAR * FAR * png_colorpp; - -typedef struct png_color_16_struct -{ - png_byte index; /* used for palette files */ - png_uint_16 red; /* for use in red green blue files */ - png_uint_16 green; - png_uint_16 blue; - png_uint_16 gray; /* for use in grayscale files */ +typedef png_color FAR *png_colorp; +typedef png_color FAR *FAR *png_colorpp; + +typedef struct png_color_16_struct { + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ } png_color_16; -typedef png_color_16 FAR * png_color_16p; -typedef png_color_16 FAR * FAR * png_color_16pp; - -typedef struct png_color_8_struct -{ - png_byte red; /* for use in red green blue files */ - png_byte green; - png_byte blue; - png_byte gray; /* for use in grayscale files */ - png_byte alpha; /* for alpha channel files */ +typedef png_color_16 FAR *png_color_16p; +typedef png_color_16 FAR *FAR *png_color_16pp; + +typedef struct png_color_8_struct { + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ } png_color_8; -typedef png_color_8 FAR * png_color_8p; -typedef png_color_8 FAR * FAR * png_color_8pp; +typedef png_color_8 FAR *png_color_8p; +typedef png_color_8 FAR *FAR *png_color_8pp; /* * The following two structures are used for the in-core representation * of sPLT chunks. */ -typedef struct png_sPLT_entry_struct -{ - png_uint_16 red; - png_uint_16 green; - png_uint_16 blue; - png_uint_16 alpha; - png_uint_16 frequency; +typedef struct png_sPLT_entry_struct { + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; } png_sPLT_entry; -typedef png_sPLT_entry FAR * png_sPLT_entryp; -typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp; +typedef png_sPLT_entry FAR *png_sPLT_entryp; +typedef png_sPLT_entry FAR *FAR *png_sPLT_entrypp; /* When the depth of the sPLT palette is 8 bits, the color and alpha samples * occupy the LSB of their respective members, and the MSB of each member * is zero-filled. The frequency member always occupies the full 16 bits. */ -typedef struct png_sPLT_struct -{ - png_charp name; /* palette name */ - png_byte depth; /* depth of palette samples */ - png_sPLT_entryp entries; /* palette entries */ - png_int_32 nentries; /* number of palette entries */ +typedef struct png_sPLT_struct { + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ } png_sPLT_t; -typedef png_sPLT_t FAR * png_sPLT_tp; -typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; +typedef png_sPLT_t FAR *png_sPLT_tp; +typedef png_sPLT_t FAR *FAR *png_sPLT_tpp; #ifdef PNG_TEXT_SUPPORTED /* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, @@ -713,27 +708,26 @@ typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; * regular zero-terminated C strings (possibly empty), never NULL pointers, * so they can be safely used in printf() and other string-handling functions. */ -typedef struct png_text_struct -{ - int compression; /* compression value: +typedef struct png_text_struct { + int compression; /* compression value: -1: tEXt, none 0: zTXt, deflate 1: iTXt, none 2: iTXt, deflate */ - png_charp key; /* keyword, 1-79 character description of "text" */ - png_charp text; /* comment, may be an empty string (ie "") + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") or a NULL pointer */ - png_size_t text_length; /* length of the text string */ + png_size_t text_length; /* length of the text string */ #ifdef PNG_iTXt_SUPPORTED - png_size_t itxt_length; /* length of the itxt string */ - png_charp lang; /* language code, 0-79 characters + png_size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters or a NULL pointer */ - png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more chars or a NULL pointer */ #endif } png_text; -typedef png_text FAR * png_textp; -typedef png_text FAR * FAR * png_textpp; +typedef png_text FAR *png_textp; +typedef png_text FAR *FAR *png_textpp; #endif /* Supported compression types for text in PNG files (tEXt, and zTXt). @@ -753,17 +747,16 @@ typedef png_text FAR * FAR * png_textpp; * as I know. If you know of a portable way, send it to me. As a side * note - PNG has always been Year 2000 compliant! */ -typedef struct png_time_struct -{ - png_uint_16 year; /* full year, as in, 1995 */ - png_byte month; /* month of year, 1 - 12 */ - png_byte day; /* day of month, 1 - 31 */ - png_byte hour; /* hour of day, 0 - 23 */ - png_byte minute; /* minute of hour, 0 - 59 */ - png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +typedef struct png_time_struct { + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ } png_time; -typedef png_time FAR * png_timep; -typedef png_time FAR * FAR * png_timepp; +typedef png_time FAR *png_timep; +typedef png_time FAR *FAR *png_timepp; #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) @@ -773,18 +766,17 @@ typedef png_time FAR * FAR * png_timepp; * know about their semantics. */ #define PNG_CHUNK_NAME_LENGTH 5 -typedef struct png_unknown_chunk_t -{ - png_byte name[PNG_CHUNK_NAME_LENGTH]; - png_byte *data; - png_size_t size; - - /* libpng-using applications should NOT directly modify this byte. */ - png_byte location; /* mode of operation at read time */ +typedef struct png_unknown_chunk_t { + png_byte name[PNG_CHUNK_NAME_LENGTH]; + png_byte *data; + png_size_t size; + + /* libpng-using applications should NOT directly modify this byte. */ + png_byte location; /* mode of operation at read time */ } png_unknown_chunk; -typedef png_unknown_chunk FAR * png_unknown_chunkp; -typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; +typedef png_unknown_chunk FAR *png_unknown_chunkp; +typedef png_unknown_chunk FAR *FAR *png_unknown_chunkpp; #endif /* png_info is a structure that holds the information in a PNG file so @@ -826,247 +818,271 @@ typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns * functions do not make their own copies. */ -typedef struct png_info_struct -{ - /* The following are necessary for every PNG file */ - png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ - png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ - png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */ - png_uint_32 rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */ - png_colorp palette PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */ - png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ - png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */ - /* The following three should have been named *_method not *_type */ - png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ - png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - - /* The following is informational only on read, and not used on writes. */ - png_byte channels PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */ - png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for future use */ - png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */ - - /* The rest of the data is optional. If you are reading, check the - * valid field to see if the information in these are valid. If you - * are writing, set the valid field to those chunks you want written, - * and initialize the appropriate fields below. - */ +typedef struct png_info_struct { + /* The following are necessary for every PNG file */ + png_uint_32 width + PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ + png_uint_32 height + PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ + png_uint_32 valid + PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */ + png_uint_32 rowbytes + PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */ + png_colorp palette + PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette + PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans + PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */ + png_byte bit_depth + PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type + PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type + PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type + PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type + PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels + PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ + png_byte spare_byte + PNG_DEPSTRUCT; /* to align the data, and for future use */ + png_byte signature[8] + PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ #if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - /* The gAMA chunk describes the gamma characteristics of the system - * on which the image was created, normally in the range [1.0, 2.5]. - * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. - */ - float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + float gamma + PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ #endif #ifdef PNG_sRGB_SUPPORTED - /* GR-P, 0.96a */ - /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */ + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */ #endif #ifdef PNG_TEXT_SUPPORTED - /* The tEXt, and zTXt chunks contain human-readable textual data in - * uncompressed, compressed, and optionally compressed forms, respectively. - * The data in "text" is an array of pointers to uncompressed, - * null-terminated C strings. Each chunk has a keyword that describes the - * textual data contained in that chunk. Keywords are not required to be - * unique, and the text string may be empty. Any number of text chunks may - * be in an image. - */ - int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ - int max_text PNG_DEPSTRUCT; /* current size of text array */ - png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ + int max_text PNG_DEPSTRUCT; /* current size of text array */ + png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ #endif /* PNG_TEXT_SUPPORTED */ #ifdef PNG_tIME_SUPPORTED - /* The tIME chunk holds the last time the displayed image data was - * modified. See the png_time struct for the contents of this struct. - */ - png_time mod_time PNG_DEPSTRUCT; + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time PNG_DEPSTRUCT; #endif #ifdef PNG_sBIT_SUPPORTED - /* The sBIT chunk specifies the number of significant high-order bits - * in the pixel data. Values are in the range [1, bit_depth], and are - * only specified for the channels in the pixel data. The contents of - * the low-order bits is not specified. Data is valid if - * (valid & PNG_INFO_sBIT) is non-zero. - */ - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ #endif #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The tRNS chunk supplies transparency data for paletted images and - * other image types that don't need a full alpha channel. There are - * "num_trans" transparency values for a paletted image, stored in the - * same order as the palette colors, starting from index 0. Values - * for the data are in the range [0, 255], ranging from fully transparent - * to fully opaque, respectively. For non-paletted images, there is a - * single color specified that should be treated as fully transparent. - * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. - */ - png_bytep trans PNG_DEPSTRUCT; /* transparent values for paletted image */ - png_color_16 trans_values PNG_DEPSTRUCT; /* transparent color for non-palette image */ + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans PNG_DEPSTRUCT; /* transparent values for paletted image */ + png_color_16 trans_values + PNG_DEPSTRUCT; /* transparent color for non-palette image */ #endif #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The bKGD chunk gives the suggested image background color if the - * display program does not have its own background color and the image - * is needs to composited onto a background before display. The colors - * in "background" are normally in the same color space/depth as the - * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. - */ - png_color_16 background PNG_DEPSTRUCT; + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background PNG_DEPSTRUCT; #endif #ifdef PNG_oFFs_SUPPORTED - /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards - * and downwards from the top-left corner of the display, page, or other - * application-specific co-ordinate space. See the PNG_OFFSET_ defines - * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. - */ - png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ - png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ - png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ + png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ + png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ #endif #ifdef PNG_pHYs_SUPPORTED - /* The pHYs chunk gives the physical pixel density of the image for - * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ - * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. - */ - png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ - png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ - png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */ + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ + png_byte phys_unit_type + PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */ #endif #ifdef PNG_hIST_SUPPORTED - /* The hIST chunk contains the relative frequency or importance of the - * various palette entries, so that a viewer can intelligently select a - * reduced-color palette, if required. Data is an array of "num_palette" - * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) - * is non-zero. - */ - png_uint_16p hist PNG_DEPSTRUCT; + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist PNG_DEPSTRUCT; #endif #ifdef PNG_cHRM_SUPPORTED - /* The cHRM chunk describes the CIE color characteristics of the monitor - * on which the PNG was created. This data allows the viewer to do gamut - * mapping of the input image to ensure that the viewer sees the same - * colors in the image as the creator. Values are in the range - * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. - */ + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ #ifdef PNG_FLOATING_POINT_SUPPORTED - float x_white PNG_DEPSTRUCT; - float y_white PNG_DEPSTRUCT; - float x_red PNG_DEPSTRUCT; - float y_red PNG_DEPSTRUCT; - float x_green PNG_DEPSTRUCT; - float y_green PNG_DEPSTRUCT; - float x_blue PNG_DEPSTRUCT; - float y_blue PNG_DEPSTRUCT; + float x_white PNG_DEPSTRUCT; + float y_white PNG_DEPSTRUCT; + float x_red PNG_DEPSTRUCT; + float y_red PNG_DEPSTRUCT; + float x_green PNG_DEPSTRUCT; + float y_green PNG_DEPSTRUCT; + float x_blue PNG_DEPSTRUCT; + float y_blue PNG_DEPSTRUCT; #endif #endif #ifdef PNG_pCAL_SUPPORTED - /* The pCAL chunk describes a transformation between the stored pixel - * values and original physical data values used to create the image. - * The integer range [0, 2^bit_depth - 1] maps to the floating-point - * range given by [pcal_X0, pcal_X1], and are further transformed by a - * (possibly non-linear) transformation function given by "pcal_type" - * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ - * defines below, and the PNG-Group's PNG extensions document for a - * complete description of the transformations and how they should be - * implemented, and for a description of the ASCII parameter strings. - * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. - */ - png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ - png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ - png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ - png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical units */ - png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing parameter values */ - png_byte pcal_type PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */ - png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given in pcal_params */ -#endif - -/* New members added in libpng-1.0.6 */ + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ + png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ + png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ + png_charp pcal_units + PNG_DEPSTRUCT; /* Latin-1 string giving physical units */ + png_charpp pcal_params + PNG_DEPSTRUCT; /* ASCII strings containing parameter values */ + png_byte pcal_type + PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams + PNG_DEPSTRUCT; /* number of parameters given in pcal_params */ +#endif + + /* New members added in libpng-1.0.6 */ #ifdef PNG_FREE_ME_SUPPORTED - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ + png_uint_32 free_me + PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ #endif #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) - /* Storage for unknown chunks that the library doesn't recognize. */ - png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; - png_size_t unknown_chunks_num PNG_DEPSTRUCT; + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; + png_size_t unknown_chunks_num PNG_DEPSTRUCT; #endif #ifdef PNG_iCCP_SUPPORTED - /* iCCP chunk data. */ - png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ - png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium profile data */ - /* Note to maintainer: should be png_bytep */ - png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ - png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ + /* iCCP chunk data. */ + png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ + png_charp iccp_profile + PNG_DEPSTRUCT; /* International Color Consortium profile data */ + /* Note to maintainer: should be png_bytep */ + png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ + png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ #endif #ifdef PNG_sPLT_SUPPORTED - /* Data on sPLT chunks (there may be more than one). */ - png_sPLT_tp splt_palettes PNG_DEPSTRUCT; - png_uint_32 splt_palettes_num PNG_DEPSTRUCT; + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes PNG_DEPSTRUCT; + png_uint_32 splt_palettes_num PNG_DEPSTRUCT; #endif #ifdef PNG_sCAL_SUPPORTED - /* The sCAL chunk describes the actual physical dimensions of the - * subject matter of the graphic. The chunk contains a unit specification - * a byte value, and two ASCII strings representing floating-point - * values. The values are width and height corresponsing to one pixel - * in the image. This external representation is converted to double - * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. - */ - png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. This external representation is converted to double + * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. + */ + png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ #ifdef PNG_FLOATING_POINT_SUPPORTED - double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ - double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ + double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ + double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ #endif #ifdef PNG_FIXED_POINT_SUPPORTED - png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ - png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ + png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ + png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ #endif #endif #ifdef PNG_INFO_IMAGE_SUPPORTED - /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ - /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ - png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ #endif #if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */ + png_fixed_point int_gamma + PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */ #endif #if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) - png_fixed_point int_x_white PNG_DEPSTRUCT; - png_fixed_point int_y_white PNG_DEPSTRUCT; - png_fixed_point int_x_red PNG_DEPSTRUCT; - png_fixed_point int_y_red PNG_DEPSTRUCT; - png_fixed_point int_x_green PNG_DEPSTRUCT; - png_fixed_point int_y_green PNG_DEPSTRUCT; - png_fixed_point int_x_blue PNG_DEPSTRUCT; - png_fixed_point int_y_blue PNG_DEPSTRUCT; + png_fixed_point int_x_white PNG_DEPSTRUCT; + png_fixed_point int_y_white PNG_DEPSTRUCT; + png_fixed_point int_x_red PNG_DEPSTRUCT; + png_fixed_point int_y_red PNG_DEPSTRUCT; + png_fixed_point int_x_green PNG_DEPSTRUCT; + png_fixed_point int_y_green PNG_DEPSTRUCT; + png_fixed_point int_x_blue PNG_DEPSTRUCT; + png_fixed_point int_y_blue PNG_DEPSTRUCT; #endif } png_info; -typedef png_info FAR * png_infop; -typedef png_info FAR * FAR * png_infopp; +typedef png_info FAR *png_infop; +typedef png_info FAR *FAR *png_infopp; /* Maximum positive integer used in PNG is (2^31)-1 */ #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) @@ -1169,18 +1185,17 @@ typedef png_info FAR * FAR * png_infopp; * change these values for the row. It also should enable using * the routines for other purposes. */ -typedef struct png_row_info_struct -{ - png_uint_32 width; /* width of row */ - png_uint_32 rowbytes; /* number of bytes in row */ - png_byte color_type; /* color type of row */ - png_byte bit_depth; /* bit depth of row */ - png_byte channels; /* number of channels (1, 2, 3, or 4) */ - png_byte pixel_depth; /* bits per pixel (depth * channels) */ +typedef struct png_row_info_struct { + png_uint_32 width; /* width of row */ + png_uint_32 rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ } png_row_info; -typedef png_row_info FAR * png_row_infop; -typedef png_row_info FAR * FAR * png_row_infopp; +typedef png_row_info FAR *png_row_infop; +typedef png_row_info FAR *FAR *png_row_infopp; /* These are the function types for the I/O functions and for the functions * that allow the user to override the default I/O functions with his or her @@ -1189,32 +1204,34 @@ typedef png_row_info FAR * FAR * png_row_infopp; * user read/write data functions. */ typedef struct png_struct_def png_struct; -typedef png_struct FAR * png_structp; +typedef png_struct FAR *png_structp; typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp)); typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t)); typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp)); typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32, - int)); + int)); typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, - int)); + int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); +typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, + png_infop)); typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, - png_uint_32, int)); + png_uint_32, int)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_LEGACY_SUPPORTED) typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, - png_row_infop, png_bytep)); + png_row_infop, png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); +typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, + png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); @@ -1255,312 +1272,382 @@ typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); * the jmp_buf. */ -struct png_struct_def -{ +struct png_struct_def { #ifdef PNG_SETJMP_SUPPORTED - jmp_buf jmpbuf; /* used in png_error */ -#endif - png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */ - png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */ - png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */ - png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */ - png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */ - png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */ + jmp_buf jmpbuf; /* used in png_error */ +#endif + png_error_ptr error_fn + PNG_DEPSTRUCT; /* function for printing errors and aborting */ + png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */ + png_voidp error_ptr + PNG_DEPSTRUCT; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */ + png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */ + png_voidp io_ptr + PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */ #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */ + png_user_transform_ptr read_user_transform_fn + PNG_DEPSTRUCT; /* user read transform */ #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */ + png_user_transform_ptr write_user_transform_fn + PNG_DEPSTRUCT; /* user write transform */ #endif -/* These were added in libpng-1.0.2 */ + /* These were added in libpng-1.0.2 */ #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */ - png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */ - png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */ -#endif -#endif - - png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */ - png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */ - png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */ - - z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */ - png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ - png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ - int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ - int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ - int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */ - int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */ - int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */ - - png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ - png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ - png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ - png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ - png_uint_32 rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ + png_voidp user_transform_ptr + PNG_DEPSTRUCT; /* user supplied struct for user transform */ + png_byte user_transform_depth + PNG_DEPSTRUCT; /* bit depth of user transformed pixels */ + png_byte user_transform_channels + PNG_DEPSTRUCT; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode + PNG_DEPSTRUCT; /* tells us where we are in the PNG file */ + png_uint_32 flags + PNG_DEPSTRUCT; /* flags indicating various things to libpng */ + png_uint_32 transformations + PNG_DEPSTRUCT; /* which transformations to perform */ + + z_stream zstream + PNG_DEPSTRUCT; /* pointer to decompression structure (below) */ + png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ + png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ + int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ + int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ + int zlib_window_bits + PNG_DEPSTRUCT; /* holds zlib compression window bits */ + int zlib_mem_level + PNG_DEPSTRUCT; /* holds zlib compression memory level */ + int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */ + + png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ + png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ + png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ + png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ + png_uint_32 rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ #if 0 /* Replaced with the following in libpng-1.2.43 */ - png_size_t irowbytes PNG_DEPSTRUCT; + png_size_t irowbytes PNG_DEPSTRUCT; #endif -/* Added in libpng-1.2.43 */ + /* Added in libpng-1.2.43 */ #ifdef PNG_USER_LIMITS_SUPPORTED - /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown - * chunks that can be stored (0 means unlimited). - */ - png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; -#endif - png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */ - png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ - png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */ - png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; +#endif + png_uint_32 iwidth + PNG_DEPSTRUCT; /* width of current interlaced row in pixels */ + png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ + png_bytep prev_row + PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */ + png_bytep row_buf + PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ #ifndef PNG_NO_WRITE_FILTER - png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */ - png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */ - png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */ -#endif - png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */ - - png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ - png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ - png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ - png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */ - png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */ - png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ - png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ - png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */ - png_byte color_type PNG_DEPSTRUCT; /* color type of file */ - png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ - png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ - png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ - png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ - png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */ + png_bytep sub_row + PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */ + png_bytep up_row + PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */ + png_bytep avg_row + PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row + PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */ +#endif + png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */ + + png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ + png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ + png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ + png_uint_16 num_palette + PNG_DEPSTRUCT; /* number of color entries in palette */ + png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ + png_byte chunk_name[5] + PNG_DEPSTRUCT; /* null-terminated name of current chunk */ + png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */ + png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ + png_byte interlaced + PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ + png_byte do_filter + PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type PNG_DEPSTRUCT; /* color type of file */ + png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ + png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ + png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ + png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ + png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ + png_byte sig_bytes + PNG_DEPSTRUCT; /* magic bytes read/written from start of file */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) #ifdef PNG_LEGACY_SUPPORTED - png_byte filler PNG_DEPSTRUCT; /* filler byte for pixel expansion */ + png_byte filler PNG_DEPSTRUCT; /* filler byte for pixel expansion */ #else - png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */ + png_uint_16 filler + PNG_DEPSTRUCT; /* filler bytes for pixel expansion */ #endif #endif #ifdef PNG_bKGD_SUPPORTED - png_byte background_gamma_type PNG_DEPSTRUCT; + png_byte background_gamma_type PNG_DEPSTRUCT; # ifdef PNG_FLOATING_POINT_SUPPORTED - float background_gamma PNG_DEPSTRUCT; + float background_gamma PNG_DEPSTRUCT; # endif - png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */ + png_color_16 background + PNG_DEPSTRUCT; /* background color in screen gamma space */ #ifdef PNG_READ_GAMMA_SUPPORTED - png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */ + png_color_16 background_1 + PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */ #endif #endif /* PNG_bKGD_SUPPORTED */ #ifdef PNG_WRITE_FLUSH_SUPPORTED - png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */ - png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */ - png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */ + png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */ + png_uint_32 flush_dist + PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows + PNG_DEPSTRUCT; /* number of rows written since last flush */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */ + int gamma_shift + PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */ #ifdef PNG_FLOATING_POINT_SUPPORTED - float gamma PNG_DEPSTRUCT; /* file gamma value */ - float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */ + float gamma PNG_DEPSTRUCT; /* file gamma value */ + float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */ #endif #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */ - png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ - png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */ - png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ - png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ + png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */ + png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ + png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table + PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */ + png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */ + png_color_8 sig_bit + PNG_DEPSTRUCT; /* significant bits in each available channel */ #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */ + png_color_8 shift + PNG_DEPSTRUCT; /* shift for significant bit tranformation */ #endif #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans PNG_DEPSTRUCT; /* transparency values for paletted files */ - png_color_16 trans_values PNG_DEPSTRUCT; /* transparency values for non-paletted files */ + png_bytep trans + PNG_DEPSTRUCT; /* transparency values for paletted files */ + png_color_16 trans_values + PNG_DEPSTRUCT; /* transparency values for non-paletted files */ #endif - png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */ - png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */ + png_read_status_ptr read_row_fn + PNG_DEPSTRUCT; /* called after each row is decoded */ + png_write_status_ptr write_row_fn + PNG_DEPSTRUCT; /* called after each row is encoded */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */ - png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */ - png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */ - png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */ - png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */ - png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */ - png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */ - png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */ - png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */ - png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */ - png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */ - png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */ - png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */ - int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */ - int cur_palette PNG_DEPSTRUCT; /* current push library palette index */ + png_progressive_info_ptr info_fn + PNG_DEPSTRUCT; /* called after header data fully read */ + png_progressive_row_ptr row_fn + PNG_DEPSTRUCT; /* called after each prog. row is decoded */ + png_progressive_end_ptr end_fn + PNG_DEPSTRUCT; /* called after image is complete */ + png_bytep save_buffer_ptr + PNG_DEPSTRUCT; /* current location in save_buffer */ + png_bytep save_buffer + PNG_DEPSTRUCT; /* buffer for previously read data */ + png_bytep current_buffer_ptr + PNG_DEPSTRUCT; /* current location in current_buffer */ + png_bytep current_buffer + PNG_DEPSTRUCT; /* buffer for recently used data */ + png_uint_32 push_length + PNG_DEPSTRUCT; /* size of current input chunk */ + png_uint_32 skip_length + PNG_DEPSTRUCT; /* bytes to skip in input data */ + png_size_t save_buffer_size + PNG_DEPSTRUCT; /* amount of data now in save_buffer */ + png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */ + png_size_t buffer_size + PNG_DEPSTRUCT; /* total amount of available input data */ + png_size_t current_buffer_size + PNG_DEPSTRUCT; /* amount of data now in current_buffer */ + int process_mode + PNG_DEPSTRUCT; /* what push library is currently doing */ + int cur_palette + PNG_DEPSTRUCT; /* current push library palette index */ # ifdef PNG_TEXT_SUPPORTED - png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */ - png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */ - png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */ - png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */ + png_size_t current_text_size + PNG_DEPSTRUCT; /* current size of text input data */ + png_size_t current_text_left + PNG_DEPSTRUCT; /* how much text left to read in input */ + png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */ + png_charp current_text_ptr + PNG_DEPSTRUCT; /* current location in current_text */ # endif /* PNG_TEXT_SUPPORTED */ #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* for the Borland special 64K segment handler */ - png_bytepp offset_table_ptr PNG_DEPSTRUCT; - png_bytep offset_table PNG_DEPSTRUCT; - png_uint_16 offset_table_number PNG_DEPSTRUCT; - png_uint_16 offset_table_count PNG_DEPSTRUCT; - png_uint_16 offset_table_count_free PNG_DEPSTRUCT; + /* for the Borland special 64K segment handler */ + png_bytepp offset_table_ptr PNG_DEPSTRUCT; + png_bytep offset_table PNG_DEPSTRUCT; + png_uint_16 offset_table_number PNG_DEPSTRUCT; + png_uint_16 offset_table_count PNG_DEPSTRUCT; + png_uint_16 offset_table_count_free PNG_DEPSTRUCT; #endif #ifdef PNG_READ_DITHER_SUPPORTED - png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ - png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette files */ + png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ + png_bytep dither_index + PNG_DEPSTRUCT; /* index translation for palette files */ #endif #if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) - png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ + png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ #endif #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */ - png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */ - png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */ + png_byte heuristic_method + PNG_DEPSTRUCT; /* heuristic for row filter selection */ + png_byte num_prev_filters + PNG_DEPSTRUCT; /* number of weights for previous rows */ + png_bytep prev_filters + PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights + PNG_DEPSTRUCT; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights + PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs + PNG_DEPSTRUCT; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs + PNG_DEPSTRUCT; /* 1/relative filter calculation cost */ #endif #ifdef PNG_TIME_RFC1123_SUPPORTED - png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ + png_charp time_buffer + PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ #endif -/* New members added in libpng-1.0.6 */ + /* New members added in libpng-1.0.6 */ #ifdef PNG_FREE_ME_SUPPORTED - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ + png_uint_32 free_me + PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ #endif #ifdef PNG_USER_CHUNKS_SUPPORTED - png_voidp user_chunk_ptr PNG_DEPSTRUCT; - png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */ + png_voidp user_chunk_ptr PNG_DEPSTRUCT; + png_user_chunk_ptr read_user_chunk_fn + PNG_DEPSTRUCT; /* user read chunk handler */ #endif #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - int num_chunk_list PNG_DEPSTRUCT; - png_bytep chunk_list PNG_DEPSTRUCT; + int num_chunk_list PNG_DEPSTRUCT; + png_bytep chunk_list PNG_DEPSTRUCT; #endif -/* New members added in libpng-1.0.3 */ + /* New members added in libpng-1.0.3 */ #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED - png_byte rgb_to_gray_status PNG_DEPSTRUCT; - /* These were changed from png_byte in libpng-1.0.6 */ - png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; - png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; - png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; + png_byte rgb_to_gray_status PNG_DEPSTRUCT; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; + png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; + png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; #endif -/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ + /* New member added in libpng-1.0.4 (renamed in 1.0.9) */ #if defined(PNG_MNG_FEATURES_SUPPORTED) || \ defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + /* Changed from png_byte to png_uint_32 at version 1.2.0 */ #ifdef PNG_1_0_X - png_byte mng_features_permitted PNG_DEPSTRUCT; + png_byte mng_features_permitted PNG_DEPSTRUCT; #else - png_uint_32 mng_features_permitted PNG_DEPSTRUCT; + png_uint_32 mng_features_permitted PNG_DEPSTRUCT; #endif /* PNG_1_0_X */ #endif -/* New member added in libpng-1.0.7 */ + /* New member added in libpng-1.0.7 */ #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; + png_fixed_point int_gamma PNG_DEPSTRUCT; #endif -/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ + /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ #ifdef PNG_MNG_FEATURES_SUPPORTED - png_byte filter_type PNG_DEPSTRUCT; + png_byte filter_type PNG_DEPSTRUCT; #endif #ifdef PNG_1_0_X -/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */ - png_uint_32 row_buf_size PNG_DEPSTRUCT; + /* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */ + png_uint_32 row_buf_size PNG_DEPSTRUCT; #endif -/* New members added in libpng-1.2.0 */ + /* New members added in libpng-1.2.0 */ #ifdef PNG_ASSEMBLER_CODE_SUPPORTED # ifndef PNG_1_0_X # ifdef PNG_MMX_CODE_SUPPORTED - png_byte mmx_bitdepth_threshold PNG_DEPSTRUCT; - png_uint_32 mmx_rowbytes_threshold PNG_DEPSTRUCT; + png_byte mmx_bitdepth_threshold PNG_DEPSTRUCT; + png_uint_32 mmx_rowbytes_threshold PNG_DEPSTRUCT; # endif - png_uint_32 asm_flags PNG_DEPSTRUCT; + png_uint_32 asm_flags PNG_DEPSTRUCT; # endif #endif -/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ + /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ #ifdef PNG_USER_MEM_SUPPORTED - png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */ - png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */ - png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */ + png_voidp mem_ptr + PNG_DEPSTRUCT; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */ + png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */ #endif -/* New member added in libpng-1.0.13 and 1.2.0 */ - png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ + /* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf + PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ #ifdef PNG_READ_DITHER_SUPPORTED -/* The following three members were added at version 1.0.14 and 1.2.4 */ - png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */ - png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is */ - /* in the palette */ - png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this */ - /* palette color */ + /* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */ + png_bytep index_to_palette + PNG_DEPSTRUCT; /* where the original index currently is */ + /* in the palette */ + png_bytep palette_to_index + PNG_DEPSTRUCT; /* which original index points to this */ + /* palette color */ #endif -/* New members added in libpng-1.0.16 and 1.2.6 */ - png_byte compression_type PNG_DEPSTRUCT; + /* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type PNG_DEPSTRUCT; #ifdef PNG_USER_LIMITS_SUPPORTED - png_uint_32 user_width_max PNG_DEPSTRUCT; - png_uint_32 user_height_max PNG_DEPSTRUCT; + png_uint_32 user_width_max PNG_DEPSTRUCT; + png_uint_32 user_height_max PNG_DEPSTRUCT; #endif -/* New member added in libpng-1.0.25 and 1.2.17 */ + /* New member added in libpng-1.0.25 and 1.2.17 */ #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - /* Storage for unknown chunk that the library doesn't recognize. */ - png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; + /* Storage for unknown chunk that the library doesn't recognize. */ + png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; #endif -/* New members added in libpng-1.2.26 */ - png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; - png_uint_32 old_prev_row_size PNG_DEPSTRUCT; + /* New members added in libpng-1.2.26 */ + png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; + png_uint_32 old_prev_row_size PNG_DEPSTRUCT; -/* New member added in libpng-1.2.30 */ - png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ + /* New member added in libpng-1.2.30 */ + png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ }; @@ -1571,7 +1658,7 @@ struct png_struct_def */ typedef png_structp version_1_2_50; -typedef png_struct FAR * FAR * png_structpp; +typedef png_struct FAR *FAR *png_structpp; /* Here are the function definitions most commonly used. This is not * the place to find out how to use libpng. See libpng.txt for the @@ -1580,227 +1667,229 @@ typedef png_struct FAR * FAR * png_structpp; */ /* Returns the version number of the library */ -extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); +extern PNG_EXPORT(png_uint_32, png_access_version_number) PNGARG((void)); /* Tell lib we have already handled the first magic bytes. * Handling more than 8 bytes from the beginning of the file is an error. */ -extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, - int num_bytes)); +extern PNG_EXPORT(void, png_set_sig_bytes) PNGARG((png_structp png_ptr, + int num_bytes)); /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a * PNG file. Returns zero if the supplied bytes match the 8-byte PNG * signature, and non-zero otherwise. Having num_to_check == 0 or * start > 7 will always fail (ie return non-zero). */ -extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, - png_size_t num_to_check)); +extern PNG_EXPORT(int, png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, + png_size_t num_to_check)); /* Simple signature checking function. This is the same as calling * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). */ -extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)) PNG_DEPRECATED; +extern PNG_EXPORT(int, png_check_sig) PNGARG((png_bytep sig, + int num)) PNG_DEPRECATED; /* Allocate and initialize png_ptr struct for reading, and any other memory. */ -extern PNG_EXPORT(png_structp,png_create_read_struct) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; +extern PNG_EXPORT(png_structp, png_create_read_struct) +PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; /* Allocate and initialize png_ptr struct for writing, and any other memory */ -extern PNG_EXPORT(png_structp,png_create_write_struct) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; +extern PNG_EXPORT(png_structp, png_create_write_struct) +PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; #ifdef PNG_WRITE_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size) - PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_compression_buffer_size) +PNGARG((png_structp png_ptr)); #endif #ifdef PNG_WRITE_SUPPORTED -extern PNG_EXPORT(void,png_set_compression_buffer_size) - PNGARG((png_structp png_ptr, png_uint_32 size)); +extern PNG_EXPORT(void, png_set_compression_buffer_size) +PNGARG((png_structp png_ptr, png_uint_32 size)); #endif /* Reset the compression stream */ -extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(int, png_reset_zstream) PNGARG((png_structp png_ptr)); /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ #ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_structp,png_create_read_struct_2) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; -extern PNG_EXPORT(png_structp,png_create_write_struct_2) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; +extern PNG_EXPORT(png_structp, png_create_read_struct_2) +PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; +extern PNG_EXPORT(png_structp, png_create_write_struct_2) +PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; #endif /* Write a PNG chunk - size, type, (optional) data, CRC. */ -extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_bytep data, png_size_t length)); +extern PNG_EXPORT(void, png_write_chunk) PNGARG((png_structp png_ptr, + png_bytep chunk_name, png_bytep data, png_size_t length)); /* Write the start of a PNG chunk - length and chunk name. */ -extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_uint_32 length)); +extern PNG_EXPORT(void, png_write_chunk_start) PNGARG((png_structp png_ptr, + png_bytep chunk_name, png_uint_32 length)); /* Write the data of a PNG chunk started with png_write_chunk_start(). */ -extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); +extern PNG_EXPORT(void, png_write_chunk_data) PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); /* Finish a chunk started with png_write_chunk_start() (includes CRC). */ -extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_write_chunk_end) PNGARG((png_structp png_ptr)); /* Allocate and initialize the info structure */ -extern PNG_EXPORT(png_infop,png_create_info_struct) - PNGARG((png_structp png_ptr)) PNG_ALLOCATED; +extern PNG_EXPORT(png_infop, png_create_info_struct) +PNGARG((png_structp png_ptr)) PNG_ALLOCATED; #if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Initialize the info structure (old interface - DEPRECATED) */ -extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr)) - PNG_DEPRECATED; +extern PNG_EXPORT(void, png_info_init) PNGARG((png_infop info_ptr)) +PNG_DEPRECATED; #undef png_info_init #define png_info_init(info_ptr) png_info_init_3(&info_ptr,\ png_sizeof(png_info)); #endif -extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, - png_size_t png_info_struct_size)); +extern PNG_EXPORT(void, png_info_init_3) PNGARG((png_infopp info_ptr, + png_size_t png_info_struct_size)); /* Writes all the PNG information before the image. */ -extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr)); -extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +extern PNG_EXPORT(void, png_write_info_before_PLTE) PNGARG((png_structp png_ptr, + png_infop info_ptr)); +extern PNG_EXPORT(void, png_write_info) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. */ -extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +extern PNG_EXPORT(void, png_read_info) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED -extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) - PNGARG((png_structp png_ptr, png_timep ptime)); +extern PNG_EXPORT(png_charp, png_convert_to_rfc1123) +PNGARG((png_structp png_ptr, png_timep ptime)); #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ -extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, - struct tm FAR * ttime)); +extern PNG_EXPORT(void, png_convert_from_struct_tm) PNGARG((png_timep ptime, + struct tm FAR *ttime)); /* Convert from time_t to png_time. Uses gmtime() */ -extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, - time_t ttime)); +extern PNG_EXPORT(void, png_convert_from_time_t) PNGARG((png_timep ptime, + time_t ttime)); #endif /* PNG_CONVERT_tIME_SUPPORTED */ #ifdef PNG_READ_EXPAND_SUPPORTED /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ -extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_expand) PNGARG((png_structp png_ptr)); #ifndef PNG_1_0_X -extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp - png_ptr)); +extern PNG_EXPORT(void, png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp + png_ptr)); #endif -extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); #if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Deprecated */ -extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp - png_ptr)) PNG_DEPRECATED; +extern PNG_EXPORT(void, png_set_gray_1_2_4_to_8) PNGARG((png_structp + png_ptr)) PNG_DEPRECATED; #endif #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Use blue, green, red order for pixels. */ -extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_bgr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand the grayscale to 24-bit RGB if necessary. */ -extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB to grayscale. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, - int error_action, double red, double green )); +extern PNG_EXPORT(void, png_set_rgb_to_gray) PNGARG((png_structp png_ptr, + int error_action, double red, double green )); #endif -extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, - int error_action, png_fixed_point red, png_fixed_point green )); -extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp - png_ptr)); +extern PNG_EXPORT(void, png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green )); +extern PNG_EXPORT(png_byte, png_get_rgb_to_gray_status) PNGARG((png_structp + png_ptr)); #endif -extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, - png_colorp palette)); +extern PNG_EXPORT(void, png_build_grayscale_palette) PNGARG((int bit_depth, + png_colorp palette)); #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_strip_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_swap_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_invert_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, - png_uint_32 filler, int flags)); +extern PNG_EXPORT(void, png_set_filler) PNGARG((png_structp png_ptr, + png_uint_32 filler, int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ #define PNG_FILLER_BEFORE 0 #define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ #ifndef PNG_1_0_X -extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, - png_uint_32 filler, int flags)); +extern PNG_EXPORT(void, png_set_add_alpha) PNGARG((png_structp png_ptr, + png_uint_32 filler, int flags)); #endif #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) /* Swap bytes in 16-bit depth files. */ -extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_swap) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ -extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_packing) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ -extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_packswap) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) /* Converts files to legal bit depths. */ -extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, - png_color_8p true_bits)); +extern PNG_EXPORT(void, png_set_shift) PNGARG((png_structp png_ptr, + png_color_8p true_bits)); #endif #if defined(PNG_READ_INTERLACING_SUPPORTED) || \ defined(PNG_WRITE_INTERLACING_SUPPORTED) /* Have the code handle the interlacing. Returns the number of passes. */ -extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(int, png_set_interlace_handling) PNGARG(( + png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) /* Invert monochrome files */ -extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_invert_mono) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS by replacing with a background color. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma)); +extern PNG_EXPORT(void, png_set_background) PNGARG((png_structp png_ptr, + png_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)); #endif #define PNG_BACKGROUND_GAMMA_UNKNOWN 0 #define PNG_BACKGROUND_GAMMA_SCREEN 1 @@ -1810,21 +1899,21 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, #ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip the second byte of information from a 16-bit depth file. */ -extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_set_strip_16) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_DITHER_SUPPORTED /* Turn on dithering, and reduce the palette to the number of colors available. */ -extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette, int maximum_colors, - png_uint_16p histogram, int full_dither)); +extern PNG_EXPORT(void, png_set_dither) PNGARG((png_structp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_uint_16p histogram, int full_dither)); #endif #ifdef PNG_READ_GAMMA_SUPPORTED /* Handle gamma correction. Screen_gamma=(display_exponent) */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, - double screen_gamma, double default_file_gamma)); +extern PNG_EXPORT(void, png_set_gamma) PNGARG((png_structp png_ptr, + double screen_gamma, double default_file_gamma)); #endif #endif @@ -1833,88 +1922,88 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) /* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */ /* Deprecated and will be removed. Use png_permit_mng_features() instead. */ -extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr, - int empty_plte_permitted)) PNG_DEPRECATED; +extern PNG_EXPORT(void, png_permit_empty_plte) PNGARG((png_structp png_ptr, + int empty_plte_permitted)) PNG_DEPRECATED; #endif #endif #ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set how many lines between output flushes - 0 for no flushing */ -extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); +extern PNG_EXPORT(void, png_set_flush) PNGARG((png_structp png_ptr, int nrows)); /* Flush the current PNG output buffer */ -extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_write_flush) PNGARG((png_structp png_ptr)); #endif /* Optional update palette with requested transformations */ -extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void, png_start_read_image) PNGARG((png_structp png_ptr)); /* Optional call to update the users info structure */ -extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +extern PNG_EXPORT(void, png_read_update_info) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ -extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); +extern PNG_EXPORT(void, png_read_rows) PNGARG((png_structp png_ptr, + png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); #endif #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ -extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, - png_bytep row, - png_bytep display_row)); +extern PNG_EXPORT(void, png_read_row) PNGARG((png_structp png_ptr, + png_bytep row, + png_bytep display_row)); #endif #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED /* Read the whole image into memory at once. */ -extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, - png_bytepp image)); +extern PNG_EXPORT(void, png_read_image) PNGARG((png_structp png_ptr, + png_bytepp image)); #endif /* Write a row of image data */ -extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, - png_bytep row)); +extern PNG_EXPORT(void, png_write_row) PNGARG((png_structp png_ptr, + png_bytep row)); /* Write a few rows of image data */ -extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_uint_32 num_rows)); +extern PNG_EXPORT(void, png_write_rows) PNGARG((png_structp png_ptr, + png_bytepp row, png_uint_32 num_rows)); /* Write the image data */ -extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, - png_bytepp image)); +extern PNG_EXPORT(void, png_write_image) PNGARG((png_structp png_ptr, + png_bytepp image)); /* Writes the end of the PNG file. */ -extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +extern PNG_EXPORT(void, png_write_end) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. */ -extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +extern PNG_EXPORT(void, png_read_end) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #endif /* Free any memory associated with the png_info_struct */ -extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, - png_infopp info_ptr_ptr)); +extern PNG_EXPORT(void, png_destroy_info_struct) PNGARG((png_structp png_ptr, + png_infopp info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp - png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); +extern PNG_EXPORT(void, png_destroy_read_struct) PNGARG((png_structpp + png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* Free all memory used by the read (old method - NOT DLL EXPORTED) */ extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, - png_infop end_info_ptr)) PNG_DEPRECATED; + png_infop end_info_ptr)) PNG_DEPRECATED; /* Free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_write_struct) - PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); +extern PNG_EXPORT(void, png_destroy_write_struct) +PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); /* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ extern void png_write_destroy PNGARG((png_structp png_ptr)) PNG_DEPRECATED; /* Set the libpng method of handling chunk CRC errors */ -extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, - int crit_action, int ancil_action)); +extern PNG_EXPORT(void, png_set_crc_action) PNGARG((png_structp png_ptr, + int crit_action, int ancil_action)); /* Values for png_set_crc_action() to say how to handle CRC errors in * ancillary and critical chunks, and whether to use the data contained @@ -1943,8 +2032,8 @@ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, /* Set the filtering method(s) used by libpng. Currently, the only valid * value for "method" is 0. */ -extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, - int filters)); +extern PNG_EXPORT(void, png_set_filter) PNGARG((png_structp png_ptr, int method, + int filters)); /* Flags for png_set_filter() to say which filters to use. The flags * are chosen so that they don't conflict with real filter types @@ -2000,9 +2089,9 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, * to the UNWEIGHTED method, but with added encoding time/computation. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, - int heuristic_method, int num_weights, png_doublep filter_weights, - png_doublep filter_costs)); +extern PNG_EXPORT(void, png_set_filter_heuristics) PNGARG((png_structp png_ptr, + int heuristic_method, int num_weights, png_doublep filter_weights, + png_doublep filter_costs)); #endif #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ @@ -2021,20 +2110,20 @@ extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ -extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, - int level)); +extern PNG_EXPORT(void, png_set_compression_level) PNGARG((png_structp png_ptr, + int level)); -extern PNG_EXPORT(void,png_set_compression_mem_level) - PNGARG((png_structp png_ptr, int mem_level)); +extern PNG_EXPORT(void, png_set_compression_mem_level) +PNGARG((png_structp png_ptr, int mem_level)); -extern PNG_EXPORT(void,png_set_compression_strategy) - PNGARG((png_structp png_ptr, int strategy)); +extern PNG_EXPORT(void, png_set_compression_strategy) +PNGARG((png_structp png_ptr, int strategy)); -extern PNG_EXPORT(void,png_set_compression_window_bits) - PNGARG((png_structp png_ptr, int window_bits)); +extern PNG_EXPORT(void, png_set_compression_window_bits) +PNGARG((png_structp png_ptr, int window_bits)); -extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, - int method)); +extern PNG_EXPORT(void, png_set_compression_method) PNGARG((png_structp png_ptr, + int method)); /* These next functions are called for input/output, memory, and error * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, @@ -2047,7 +2136,8 @@ extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); +extern PNG_EXPORT(void, png_init_io) PNGARG((png_structp png_ptr, + png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user @@ -2058,11 +2148,11 @@ extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)) * default function will be used. */ -extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); +extern PNG_EXPORT(void, png_set_error_fn) PNGARG((png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); /* Return the user pointer associated with the error functions */ -extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_voidp, png_get_error_ptr) PNGARG((png_structp png_ptr)); /* Replace the default data output functions with a user supplied one(s). * If buffered output is not used, then output_flush_fn can be set to NULL. @@ -2074,116 +2164,118 @@ extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); * default flush function, which uses the standard *FILE structure, will * be used. */ -extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); +extern PNG_EXPORT(void, png_set_write_fn) PNGARG((png_structp png_ptr, + png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* Replace the default data input function with a user supplied one. */ -extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr read_data_fn)); +extern PNG_EXPORT(void, png_set_read_fn) PNGARG((png_structp png_ptr, + png_voidp io_ptr, png_rw_ptr read_data_fn)); /* Return the user pointer associated with the I/O functions */ -extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_voidp, png_get_io_ptr) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, - png_read_status_ptr read_row_fn)); +extern PNG_EXPORT(void, png_set_read_status_fn) PNGARG((png_structp png_ptr, + png_read_status_ptr read_row_fn)); -extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, - png_write_status_ptr write_row_fn)); +extern PNG_EXPORT(void, png_set_write_status_fn) PNGARG((png_structp png_ptr, + png_write_status_ptr write_row_fn)); #ifdef PNG_USER_MEM_SUPPORTED /* Replace the default memory allocation functions with user supplied one(s). */ -extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, - png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +extern PNG_EXPORT(void, png_set_mem_fn) PNGARG((png_structp png_ptr, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* Return the user pointer associated with the memory functions */ -extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_voidp, png_get_mem_ptr) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_LEGACY_SUPPORTED) -extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr read_user_transform_fn)); +extern PNG_EXPORT(void, png_set_read_user_transform_fn) PNGARG((png_structp + png_ptr, png_user_transform_ptr read_user_transform_fn)); #endif #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_LEGACY_SUPPORTED) -extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr write_user_transform_fn)); +extern PNG_EXPORT(void, png_set_write_user_transform_fn) PNGARG((png_structp + png_ptr, png_user_transform_ptr write_user_transform_fn)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_LEGACY_SUPPORTED) -extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp - png_ptr, png_voidp user_transform_ptr, int user_transform_depth, - int user_transform_channels)); +extern PNG_EXPORT(void, png_set_user_transform_info) PNGARG((png_structp + png_ptr, png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); /* Return the user pointer associated with the user transform functions */ -extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr) - PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_voidp, png_get_user_transform_ptr) +PNGARG((png_structp png_ptr)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, - png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); -extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp - png_ptr)); +extern PNG_EXPORT(void, png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +extern PNG_EXPORT(png_voidp, png_get_user_chunk_ptr) PNGARG((png_structp + png_ptr)); #endif #ifdef PNG_PROGRESSIVE_READ_SUPPORTED /* Sets the function callbacks for the push reader, and a pointer to a * user-defined structure available to the callback functions. */ -extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, - png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn)); +extern PNG_EXPORT(void, png_set_progressive_read_fn) PNGARG(( + png_structp png_ptr, + png_voidp progressive_ptr, + png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, + png_progressive_end_ptr end_fn)); /* Returns the user pointer associated with the push read functions */ -extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) - PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_voidp, png_get_progressive_ptr) +PNGARG((png_structp png_ptr)); /* Function to be called when data becomes available */ -extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); +extern PNG_EXPORT(void, png_process_data) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); /* Function that combines rows. Not very much different than the * png_combine_row() call. Is this even used????? */ -extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, - png_bytep old_row, png_bytep new_row)); +extern PNG_EXPORT(void, png_progressive_combine_row) PNGARG(( + png_structp png_ptr, + png_bytep old_row, png_bytep new_row)); #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, - png_uint_32 size)) PNG_ALLOCATED; +extern PNG_EXPORT(png_voidp, png_malloc) PNGARG((png_structp png_ptr, + png_uint_32 size)) PNG_ALLOCATED; #ifdef PNG_1_0_X # define png_malloc_warn png_malloc #else /* Added at libpng version 1.2.4 */ -extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, - png_uint_32 size)) PNG_ALLOCATED; +extern PNG_EXPORT(png_voidp, png_malloc_warn) PNGARG((png_structp png_ptr, + png_uint_32 size)) PNG_ALLOCATED; #endif /* Frees a pointer allocated by png_malloc() */ -extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); +extern PNG_EXPORT(void, png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); #ifdef PNG_1_0_X /* Function to allocate memory for zlib. */ -extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items, - uInt size)); +extern PNG_EXPORT(voidpf, png_zalloc) PNGARG((voidpf png_ptr, uInt items, + uInt size)); /* Function to free memory for zlib */ -extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr)); +extern PNG_EXPORT(void, png_zfree) PNGARG((voidpf png_ptr, voidpf ptr)); #endif /* Free data that was allocated internally */ -extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 free_me, int num)); +extern PNG_EXPORT(void, png_free_data) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 free_me, int num)); #ifdef PNG_FREE_ME_SUPPORTED /* Reassign responsibility for freeing existing data, whether allocated * by libpng or by the application */ -extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, - png_infop info_ptr, int freer, png_uint_32 mask)); +extern PNG_EXPORT(void, png_data_freer) PNGARG((png_structp png_ptr, + png_infop info_ptr, int freer, png_uint_32 mask)); #endif /* Assignments for png_data_freer */ #define PNG_DESTROY_WILL_FREE_DATA 1 @@ -2205,45 +2297,45 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, - png_uint_32 size)) PNG_ALLOCATED; -extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, - png_voidp ptr)); +extern PNG_EXPORT(png_voidp, png_malloc_default) PNGARG((png_structp png_ptr, + png_uint_32 size)) PNG_ALLOCATED; +extern PNG_EXPORT(void, png_free_default) PNGARG((png_structp png_ptr, + png_voidp ptr)); #endif -extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr, - png_voidp s1, png_voidp s2, png_uint_32 size)) PNG_DEPRECATED; +extern PNG_EXPORT(png_voidp, png_memcpy_check) PNGARG((png_structp png_ptr, + png_voidp s1, png_voidp s2, png_uint_32 size)) PNG_DEPRECATED; -extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr, - png_voidp s1, int value, png_uint_32 size)) PNG_DEPRECATED; +extern PNG_EXPORT(png_voidp, png_memset_check) PNGARG((png_structp png_ptr, + png_voidp s1, int value, png_uint_32 size)) PNG_DEPRECATED; #if defined(USE_FAR_KEYWORD) /* memory model conversion function */ -extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, - int check)); +extern void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr, + int check)); #endif /* USE_FAR_KEYWORD */ #ifndef PNG_NO_ERROR_TEXT /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)) PNG_NORETURN; +extern PNG_EXPORT(void, png_error) PNGARG((png_structp png_ptr, + png_const_charp error_message)) PNG_NORETURN; /* The same, but the chunk name is prepended to the error string. */ -extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)) PNG_NORETURN; +extern PNG_EXPORT(void, png_chunk_error) PNGARG((png_structp png_ptr, + png_const_charp error_message)) PNG_NORETURN; #else /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; +extern PNG_EXPORT(void, png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; #endif #ifndef PNG_NO_WARNINGS /* Non-fatal error in libpng. Can continue, but may have a problem. */ -extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); +extern PNG_EXPORT(void, png_warning) PNGARG((png_structp png_ptr, + png_const_charp warning_message)); #ifdef PNG_READ_SUPPORTED /* Non-fatal error in libpng, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); +extern PNG_EXPORT(void, png_chunk_warning) PNGARG((png_structp png_ptr, + png_const_charp warning_message)); #endif /* PNG_READ_SUPPORTED */ #endif /* PNG_NO_WARNINGS */ @@ -2260,258 +2352,258 @@ extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, * png_info_struct. */ /* Returns "flag" if chunk data is valid in info_ptr. */ -extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 flag)); +extern PNG_EXPORT(png_uint_32, png_get_valid) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ -extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_rowbytes) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* Returns row_pointers, which is an array of pointers to scanlines that was * returned from png_read_png(). */ -extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +extern PNG_EXPORT(png_bytepp, png_get_rows) PNGARG((png_structp png_ptr, + png_infop info_ptr)); /* Set row_pointers, which is an array of pointers to scanlines for use * by png_write_png(). */ -extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytepp row_pointers)); +extern PNG_EXPORT(void, png_set_rows) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytepp row_pointers)); #endif /* Returns number of color channels in image. */ -extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +extern PNG_EXPORT(png_byte, png_get_channels) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #ifdef PNG_EASY_ACCESS_SUPPORTED /* Returns image width in pixels. */ extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image height in pixels. */ extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image bit_depth. */ extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image color_type. */ extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image filter_type. */ extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image interlace_type. */ extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image compression_type. */ extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns image resolution in pixels per meter, from pHYs chunk data. */ extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); /* Returns pixel aspect ratio, computed from pHYs chunk data. */ #ifdef PNG_FLOATING_POINT_SUPPORTED extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); #endif /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); + png_ptr, png_infop info_ptr)); #endif /* PNG_EASY_ACCESS_SUPPORTED */ /* Returns pointer to signature string read from PNG header */ -extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +extern PNG_EXPORT(png_bytep, png_get_signature) PNGARG((png_structp png_ptr, + png_infop info_ptr)); #ifdef PNG_bKGD_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p *background)); +extern PNG_EXPORT(png_uint_32, png_get_bKGD) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_16p *background)); #endif #ifdef PNG_bKGD_SUPPORTED -extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p background)); +extern PNG_EXPORT(void, png_set_bKGD) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_16p background)); #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *white_x, double *white_y, double *red_x, - double *red_y, double *green_x, double *green_y, double *blue_x, - double *blue_y)); +extern PNG_EXPORT(png_uint_32, png_get_cHRM) PNGARG((png_structp png_ptr, + png_infop info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point - *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, - png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point - *int_blue_x, png_fixed_point *int_blue_y)); +extern PNG_EXPORT(png_uint_32, png_get_cHRM_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point + *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point + *int_blue_x, png_fixed_point *int_blue_y)); #endif #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double white_x, double white_y, double red_x, - double red_y, double green_x, double green_y, double blue_x, double blue_y)); +extern PNG_EXPORT(void, png_set_cHRM) PNGARG((png_structp png_ptr, + png_infop info_ptr, double white_x, double white_y, double red_x, + double red_y, double green_x, double green_y, double blue_x, double blue_y)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); +extern PNG_EXPORT(void, png_set_cHRM_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); #endif #endif #ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *file_gamma)); +extern PNG_EXPORT(png_uint_32, png_get_gAMA) PNGARG((png_structp png_ptr, + png_infop info_ptr, double *file_gamma)); #endif -extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point *int_file_gamma)); +extern PNG_EXPORT(png_uint_32, png_get_gAMA_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point *int_file_gamma)); #endif #ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double file_gamma)); +extern PNG_EXPORT(void, png_set_gAMA) PNGARG((png_structp png_ptr, + png_infop info_ptr, double file_gamma)); #endif -extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_file_gamma)); +extern PNG_EXPORT(void, png_set_gAMA_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_file_gamma)); #endif #ifdef PNG_hIST_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p *hist)); +extern PNG_EXPORT(png_uint_32, png_get_hIST) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_16p *hist)); #endif #ifdef PNG_hIST_SUPPORTED -extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p hist)); +extern PNG_EXPORT(void, png_set_hIST) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_16p hist)); #endif -extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, - int *bit_depth, int *color_type, int *interlace_method, - int *compression_method, int *filter_method)); +extern PNG_EXPORT(png_uint_32, png_get_IHDR) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); -extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_method, int compression_method, - int filter_method)); +extern PNG_EXPORT(void, png_set_IHDR) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); #ifdef PNG_oFFs_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, - int *unit_type)); +extern PNG_EXPORT(png_uint_32, png_get_oFFs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); #endif #ifdef PNG_oFFs_SUPPORTED -extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, - int unit_type)); +extern PNG_EXPORT(void, png_set_oFFs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); #endif #ifdef PNG_pCAL_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, - int *type, int *nparams, png_charp *units, png_charpp *params)); +extern PNG_EXPORT(png_uint_32, png_get_pCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, + int *type, int *nparams, png_charp *units, png_charpp *params)); #endif #ifdef PNG_pCAL_SUPPORTED -extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, - int type, int nparams, png_charp units, png_charpp params)); +extern PNG_EXPORT(void, png_set_pCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_charp units, png_charpp params)); #endif #ifdef PNG_pHYs_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); +extern PNG_EXPORT(png_uint_32, png_get_pHYs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif #ifdef PNG_pHYs_SUPPORTED -extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +extern PNG_EXPORT(void, png_set_pHYs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif -extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp *palette, int *num_palette)); +extern PNG_EXPORT(png_uint_32, png_get_PLTE) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_colorp *palette, int *num_palette)); -extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp palette, int num_palette)); +extern PNG_EXPORT(void, png_set_PLTE) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_colorp palette, int num_palette)); #ifdef PNG_sBIT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p *sig_bit)); +extern PNG_EXPORT(png_uint_32, png_get_sBIT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_8p *sig_bit)); #endif #ifdef PNG_sBIT_SUPPORTED -extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p sig_bit)); +extern PNG_EXPORT(void, png_set_sBIT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_8p sig_bit)); #endif #ifdef PNG_sRGB_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *intent)); +extern PNG_EXPORT(png_uint_32, png_get_sRGB) PNGARG((png_structp png_ptr, + png_infop info_ptr, int *intent)); #endif #ifdef PNG_sRGB_SUPPORTED -extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); -extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); +extern PNG_EXPORT(void, png_set_sRGB) PNGARG((png_structp png_ptr, + png_infop info_ptr, int intent)); +extern PNG_EXPORT(void, png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, + png_infop info_ptr, int intent)); #endif #ifdef PNG_iCCP_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charpp name, int *compression_type, - png_charpp profile, png_uint_32 *proflen)); - /* Note to maintainer: profile should be png_bytepp */ +extern PNG_EXPORT(png_uint_32, png_get_iCCP) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charpp name, int *compression_type, + png_charpp profile, png_uint_32 *proflen)); +/* Note to maintainer: profile should be png_bytepp */ #endif #ifdef PNG_iCCP_SUPPORTED -extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp name, int compression_type, - png_charp profile, png_uint_32 proflen)); - /* Note to maintainer: profile should be png_bytep */ +extern PNG_EXPORT(void, png_set_iCCP) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charp name, int compression_type, + png_charp profile, png_uint_32 proflen)); +/* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_sPLT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_sPLT_tpp entries)); +extern PNG_EXPORT(png_uint_32, png_get_sPLT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_sPLT_tpp entries)); #endif #ifdef PNG_sPLT_SUPPORTED -extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_sPLT_tp entries, int nentries)); +extern PNG_EXPORT(void, png_set_sPLT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_sPLT_tp entries, int nentries)); #endif #ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ -extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp *text_ptr, int *num_text)); +extern PNG_EXPORT(png_uint_32, png_get_text) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_textp *text_ptr, int *num_text)); #endif /* @@ -2523,30 +2615,30 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, */ #ifdef PNG_TEXT_SUPPORTED -extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); +extern PNG_EXPORT(void, png_set_text) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_textp text_ptr, int num_text)); #endif #ifdef PNG_tIME_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep *mod_time)); +extern PNG_EXPORT(png_uint_32, png_get_tIME) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_timep *mod_time)); #endif #ifdef PNG_tIME_SUPPORTED -extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep mod_time)); +extern PNG_EXPORT(void, png_set_tIME) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_timep mod_time)); #endif #ifdef PNG_tRNS_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep *trans, int *num_trans, - png_color_16p *trans_values)); +extern PNG_EXPORT(png_uint_32, png_get_tRNS) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytep *trans, int *num_trans, + png_color_16p *trans_values)); #endif #ifdef PNG_tRNS_SUPPORTED -extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep trans, int num_trans, - png_color_16p trans_values)); +extern PNG_EXPORT(void, png_set_tRNS) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytep trans, int num_trans, + png_color_16p trans_values)); #endif #ifdef PNG_tRNS_SUPPORTED @@ -2554,24 +2646,24 @@ extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, #ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *unit, double *width, double *height)); +extern PNG_EXPORT(png_uint_32, png_get_sCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, int *unit, double *width, double *height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); +extern PNG_EXPORT(png_uint_32, png_get_sCAL_s) PNGARG((png_structp png_ptr, + png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); #endif #endif #endif /* PNG_sCAL_SUPPORTED */ #ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, int unit, double width, double height)); +extern PNG_EXPORT(void, png_set_sCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, int unit, double width, double height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, - png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); +extern PNG_EXPORT(void, png_set_sCAL_s) PNGARG((png_structp png_ptr, + png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); #endif #endif #endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */ @@ -2587,17 +2679,17 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, = 3: keep even if unsafe-to-copy */ extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp - png_ptr, int keep, png_bytep chunk_list, int num_chunks)); -PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep - chunk_name)); + png_ptr, int keep, png_bytep chunk_list, int num_chunks)); +PNG_EXPORT(int, png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep + chunk_name)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); + png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); extern PNG_EXPORT(void, png_set_unknown_chunk_location) - PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); -extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp - png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); +PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); +extern PNG_EXPORT(png_uint_32, png_get_unknown_chunks) PNGARG((png_structp + png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); #endif /* Png_free_data() will turn off the "valid" flag for anything it frees. @@ -2605,18 +2697,18 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, - png_infop info_ptr, int mask)); + png_infop info_ptr, int mask)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, - png_infop info_ptr, - int transforms, - png_voidp params)); + png_infop info_ptr, + int transforms, + png_voidp params)); extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, - png_infop info_ptr, - int transforms, - png_voidp params)); + png_infop info_ptr, + int transforms, + png_voidp params)); #endif /* Define PNG_DEBUG at compile time for debugging information. Higher @@ -2726,14 +2818,15 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, #define png_debug2(l, m, p1, p2) #endif -extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp, png_get_copyright) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp, png_get_header_ver) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp, + png_get_header_version) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp, png_get_libpng_ver) PNGARG((png_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp - png_ptr, png_uint_32 mng_features_permitted)); +extern PNG_EXPORT(png_uint_32, png_permit_mng_features) PNGARG((png_structp + png_ptr, png_uint_32 mng_features_permitted)); #endif /* For use in png_set_keep_unknown, added to version 1.2.6 */ @@ -2774,39 +2867,39 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp #ifndef PNG_1_0_X /* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask) - PNGARG((int flag_select, int *compilerID)); +extern PNG_EXPORT(png_uint_32, png_get_mmx_flagmask) +PNGARG((int flag_select, int *compilerID)); /* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask) - PNGARG((int flag_select)); +extern PNG_EXPORT(png_uint_32, png_get_asm_flagmask) +PNGARG((int flag_select)); /* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_asm_flags) - PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_asm_flags) +PNGARG((png_structp png_ptr)); /* pngget.c */ -extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold) - PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_byte, png_get_mmx_bitdepth_threshold) +PNGARG((png_structp png_ptr)); /* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold) - PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_mmx_rowbytes_threshold) +PNGARG((png_structp png_ptr)); /* pngset.c */ -extern PNG_EXPORT(void,png_set_asm_flags) - PNGARG((png_structp png_ptr, png_uint_32 asm_flags)); +extern PNG_EXPORT(void, png_set_asm_flags) +PNGARG((png_structp png_ptr, png_uint_32 asm_flags)); /* pngset.c */ -extern PNG_EXPORT(void,png_set_mmx_thresholds) - PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold, - png_uint_32 mmx_rowbytes_threshold)); +extern PNG_EXPORT(void, png_set_mmx_thresholds) +PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold, + png_uint_32 mmx_rowbytes_threshold)); #endif /* PNG_1_0_X */ #ifndef PNG_1_0_X /* png.c, pnggccrd.c, or pngvcrd.c */ -extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); +extern PNG_EXPORT(int, png_mmx_support) PNGARG((void)); #endif /* PNG_1_0_X */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ @@ -2814,18 +2907,18 @@ extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); * messages before passing them to the error or warning handler. */ #ifdef PNG_ERROR_NUMBERS_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp - png_ptr, png_uint_32 strip_mode)); +extern PNG_EXPORT(void, png_set_strip_error_numbers) PNGARG((png_structp + png_ptr, png_uint_32 strip_mode)); #endif /* Added at libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED -extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp - png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); -extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp - png_ptr)); -extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp - png_ptr)); +extern PNG_EXPORT(void, png_set_user_limits) PNGARG((png_structp + png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); +extern PNG_EXPORT(png_uint_32, png_get_user_width_max) PNGARG((png_structp + png_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_user_height_max) PNGARG((png_structp + png_ptr)); #endif /* Maintainer: Put new public prototypes here ^, in libpng.3, and in * project defs @@ -2844,7 +2937,7 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] */ - /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ +/* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ # define png_composite(composite, fg, alpha, bg) \ { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \ @@ -2885,27 +2978,27 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp # define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) # define png_get_int_32(buf) ( *((png_int_32p) (buf))) #else -extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); -extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); -extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); +extern PNG_EXPORT(png_uint_32, png_get_uint_32) PNGARG((png_bytep buf)); +extern PNG_EXPORT(png_uint_16, png_get_uint_16) PNGARG((png_bytep buf)); +extern PNG_EXPORT(png_int_32, png_get_int_32) PNGARG((png_bytep buf)); #endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */ -extern PNG_EXPORT(png_uint_32,png_get_uint_31) - PNGARG((png_structp png_ptr, png_bytep buf)); +extern PNG_EXPORT(png_uint_32, png_get_uint_31) +PNGARG((png_structp png_ptr, png_bytep buf)); /* No png_get_int_16 -- may be added if there's a real need for it. */ /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ -extern PNG_EXPORT(void,png_save_uint_32) - PNGARG((png_bytep buf, png_uint_32 i)); -extern PNG_EXPORT(void,png_save_int_32) - PNGARG((png_bytep buf, png_int_32 i)); +extern PNG_EXPORT(void, png_save_uint_32) +PNGARG((png_bytep buf, png_uint_32 i)); +extern PNG_EXPORT(void, png_save_int_32) +PNGARG((png_bytep buf, png_int_32 i)); /* Place a 16-bit number into a buffer in PNG byte order. * The parameter is declared unsigned int, not png_uint_16, * just to avoid potential problems on pre-ANSI C compilers. */ -extern PNG_EXPORT(void,png_save_uint_16) - PNGARG((png_bytep buf, unsigned int i)); +extern PNG_EXPORT(void, png_save_uint_16) +PNGARG((png_bytep buf, unsigned int i)); /* No png_save_int_16 -- may be added if there's a real need for it. */ /* ************************************************************************* */ @@ -2951,7 +3044,7 @@ extern PNG_EXPORT(void,png_save_uint_16) #define PNG_DITHER 0x0040 #define PNG_BACKGROUND 0x0080 #define PNG_BACKGROUND_EXPAND 0x0100 - /* 0x0200 unused */ +/* 0x0200 unused */ #define PNG_16_TO_8 0x0400 #define PNG_RGBA 0x0800 #define PNG_EXPAND 0x1000 @@ -2966,15 +3059,15 @@ extern PNG_EXPORT(void,png_save_uint_16) #define PNG_RGB_TO_GRAY_ERR 0x200000L #define PNG_RGB_TO_GRAY_WARN 0x400000L #define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ - /* 0x800000L Unused */ +/* 0x800000L Unused */ #define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ #define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ #define PNG_PREMULTIPLY_ALPHA 0x4000000L /* Added to libpng-1.2.41 */ - /* by volker */ - /* 0x8000000L unused */ - /* 0x10000000L unused */ - /* 0x20000000L unused */ - /* 0x40000000L unused */ +/* by volker */ +/* 0x8000000L unused */ +/* 0x10000000L unused */ +/* 0x20000000L unused */ +/* 0x40000000L unused */ /* Flags for png_create_struct */ #define PNG_STRUCT_PNG 0x0001 @@ -3010,14 +3103,14 @@ extern PNG_EXPORT(void,png_save_uint_16) #define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L #define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ #define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ - /* 0x800000L unused */ - /* 0x1000000L unused */ - /* 0x2000000L unused */ - /* 0x4000000L unused */ - /* 0x8000000L unused */ - /* 0x10000000L unused */ - /* 0x20000000L unused */ - /* 0x40000000L unused */ +/* 0x800000L unused */ +/* 0x1000000L unused */ +/* 0x2000000L unused */ +/* 0x4000000L unused */ +/* 0x8000000L unused */ +/* 0x10000000L unused */ +/* 0x20000000L unused */ +/* 0x40000000L unused */ #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ PNG_FLAG_CRC_ANCILLARY_NOWARN) @@ -3052,7 +3145,7 @@ extern PNG_EXPORT(void,png_save_uint_16) #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) /* Place to hold the signature string for a PNG file. */ #ifdef PNG_USE_GLOBAL_ARRAYS - PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8]; +PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8]; #else #endif #endif /* PNG_NO_EXTERN */ @@ -3111,37 +3204,37 @@ PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5]; /* Initialize png_ptr struct for reading, and allocate any other memory. * (old interface - DEPRECATED - use png_create_read_struct instead). */ -extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)) - PNG_DEPRECATED; +extern PNG_EXPORT(void, png_read_init) PNGARG((png_structp png_ptr)) +PNG_DEPRECATED; #undef png_read_init #define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ PNG_LIBPNG_VER_STRING, png_sizeof(png_struct)); #endif -extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size)); +extern PNG_EXPORT(void, png_read_init_3) PNGARG((png_structpp ptr_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size)); #if defined(PNG_1_0_X) || defined (PNG_1_2_X) -extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t - png_info_size)); +extern PNG_EXPORT(void, png_read_init_2) PNGARG((png_structp png_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t + png_info_size)); #endif #if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Initialize png_ptr struct for writing, and allocate any other memory. * (old interface - DEPRECATED - use png_create_write_struct instead). */ -extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr)) - PNG_DEPRECATED; +extern PNG_EXPORT(void, png_write_init) PNGARG((png_structp png_ptr)) +PNG_DEPRECATED; #undef png_write_init #define png_write_init(png_ptr) png_write_init_3(&png_ptr, \ PNG_LIBPNG_VER_STRING, png_sizeof(png_struct)); #endif -extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size)); -extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t - png_info_size)); +extern PNG_EXPORT(void, png_write_init_3) PNGARG((png_structpp ptr_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size)); +extern PNG_EXPORT(void, png_write_init_2) PNGARG((png_structp png_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t + png_info_size)); /* Allocate memory for an internal libpng struct */ PNG_EXTERN png_voidp png_create_struct PNGARG((int type)) PNG_PRIVATE; @@ -3150,26 +3243,26 @@ PNG_EXTERN png_voidp png_create_struct PNGARG((int type)) PNG_PRIVATE; PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)) PNG_PRIVATE; PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr - malloc_fn, png_voidp mem_ptr)) PNG_PRIVATE; + malloc_fn, png_voidp mem_ptr)) PNG_PRIVATE; PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, - png_free_ptr free_fn, png_voidp mem_ptr)) PNG_PRIVATE; + png_free_ptr free_fn, png_voidp mem_ptr)) PNG_PRIVATE; /* Free any memory that info_ptr points to and reset struct. */ PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; #ifndef PNG_1_0_X /* Function to allocate memory for zlib. */ PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, - uInt size)) PNG_PRIVATE; + uInt size)) PNG_PRIVATE; /* Function to free memory for zlib */ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) PNG_PRIVATE; #ifdef PNG_SIZE_T /* Function to convert a sizeof an item to png_sizeof item */ - PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)) - PNG_PRIVATE; +PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)) +PNG_PRIVATE; #endif /* Next four functions are used internally as callbacks. PNGAPI is required @@ -3177,26 +3270,26 @@ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) PNG_PRIVATE; */ PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)) PNG_PRIVATE; + png_bytep data, png_size_t length)) PNG_PRIVATE; #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)) PNG_PRIVATE; + png_bytep buffer, png_size_t length)) PNG_PRIVATE; #endif PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)) PNG_PRIVATE; + png_bytep data, png_size_t length)) PNG_PRIVATE; #ifdef PNG_WRITE_FLUSH_SUPPORTED #ifdef PNG_STDIO_SUPPORTED PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)) - PNG_PRIVATE; +PNG_PRIVATE; #endif #endif #else /* PNG_1_0_X */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)) PNG_PRIVATE; + png_bytep buffer, png_size_t length)) PNG_PRIVATE; #endif #endif /* PNG_1_0_X */ @@ -3205,27 +3298,27 @@ PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Write the "data" buffer to whatever output you are using. */ PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)) PNG_PRIVATE; + png_size_t length)) PNG_PRIVATE; /* Read data from whatever input you are using into the "data" buffer */ PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)) PNG_PRIVATE; + png_size_t length)) PNG_PRIVATE; /* Read bytes into buf, and update png_ptr->crc */ PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)) PNG_PRIVATE; + png_size_t length)) PNG_PRIVATE; /* Decompress data in a chunk that uses compression */ #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, - int comp_type, png_size_t chunklength, - png_size_t prefix_length, png_size_t *data_length)) PNG_PRIVATE; + int comp_type, png_size_t chunklength, + png_size_t prefix_length, png_size_t *data_length)) PNG_PRIVATE; #endif /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip) - PNG_PRIVATE); + PNG_PRIVATE); /* Read the CRC from the file and compare it to the libpng calculated CRC */ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) PNG_PRIVATE; @@ -3235,7 +3328,7 @@ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) PNG_PRIVATE; * since this is the maximum buffer size we can specify. */ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, - png_size_t length)) PNG_PRIVATE; + png_size_t length)) PNG_PRIVATE; #ifdef PNG_WRITE_FLUSH_SUPPORTED PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)) PNG_PRIVATE; @@ -3250,139 +3343,139 @@ PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)) PNG_PRIVATE; * information. */ PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, - png_uint_32 height, - int bit_depth, int color_type, int compression_method, int filter_method, - int interlace_method)) PNG_PRIVATE; + png_uint_32 height, + int bit_depth, int color_type, int compression_method, int filter_method, + int interlace_method)) PNG_PRIVATE; PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, - png_uint_32 num_pal)) PNG_PRIVATE; + png_uint_32 num_pal)) PNG_PRIVATE; PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)) PNG_PRIVATE; + png_size_t length)) PNG_PRIVATE; PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_WRITE_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)) - PNG_PRIVATE; +PNG_PRIVATE; #endif #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, - png_fixed_point file_gamma)) PNG_PRIVATE; + png_fixed_point file_gamma)) PNG_PRIVATE; #endif #endif #ifdef PNG_WRITE_sBIT_SUPPORTED PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, - int color_type)) PNG_PRIVATE; + int color_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, - double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y)) PNG_PRIVATE; + double white_x, double white_y, + double red_x, double red_y, double green_x, double green_y, + double blue_x, double blue_y)) PNG_PRIVATE; #endif #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)) PNG_PRIVATE; + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) PNG_PRIVATE; #endif #endif #ifdef PNG_WRITE_sRGB_SUPPORTED PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)) PNG_PRIVATE; + int intent)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_iCCP_SUPPORTED PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, - png_charp name, int compression_type, - png_charp profile, int proflen)) PNG_PRIVATE; - /* Note to maintainer: profile should be png_bytep */ + png_charp name, int compression_type, + png_charp profile, int proflen)) PNG_PRIVATE; +/* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_WRITE_sPLT_SUPPORTED PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, - png_sPLT_tp palette)) PNG_PRIVATE; + png_sPLT_tp palette)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_tRNS_SUPPORTED PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, - png_color_16p values, int number, int color_type)) PNG_PRIVATE; + png_color_16p values, int number, int color_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_bKGD_SUPPORTED PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, - png_color_16p values, int color_type)) PNG_PRIVATE; + png_color_16p values, int color_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_hIST_SUPPORTED PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, - int num_hist)) PNG_PRIVATE; + int num_hist)) PNG_PRIVATE; #endif #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, - png_charp key, png_charpp new_key)) PNG_PRIVATE; + png_charp key, png_charpp new_key)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_tEXt_SUPPORTED PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len)) PNG_PRIVATE; + png_charp text, png_size_t text_len)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_zTXt_SUPPORTED PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len, int compression)) PNG_PRIVATE; + png_charp text, png_size_t text_len, int compression)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_iTXt_SUPPORTED PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, - int compression, png_charp key, png_charp lang, png_charp lang_key, - png_charp text)) PNG_PRIVATE; + int compression, png_charp key, png_charp lang, png_charp lang_key, + png_charp text)) PNG_PRIVATE; #endif #ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)) PNG_PRIVATE; + png_infop info_ptr, png_textp text_ptr, int num_text)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_oFFs_SUPPORTED PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, - png_int_32 x_offset, png_int_32 y_offset, int unit_type)) PNG_PRIVATE; + png_int_32 x_offset, png_int_32 y_offset, int unit_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_pCAL_SUPPORTED PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, - png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params)) PNG_PRIVATE; + png_int_32 X0, png_int_32 X1, int type, int nparams, + png_charp units, png_charpp params)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_pHYs_SUPPORTED PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, - png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, - int unit_type)) PNG_PRIVATE; + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_tIME_SUPPORTED PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_timep mod_time)) PNG_PRIVATE; + png_timep mod_time)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_sCAL_SUPPORTED #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, - int unit, double width, double height)) PNG_PRIVATE; + int unit, double width, double height)) PNG_PRIVATE; #else #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, - int unit, png_charp width, png_charp height)) PNG_PRIVATE; + int unit, png_charp width, png_charp height)) PNG_PRIVATE; #endif #endif #endif @@ -3399,7 +3492,7 @@ PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Combine a row of data, dealing with alpha, etc. if requested */ PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int mask)) PNG_PRIVATE; + int mask)) PNG_PRIVATE; #ifdef PNG_READ_INTERLACING_SUPPORTED /* Expand an interlaced row */ @@ -3415,21 +3508,21 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Grab pixels out of a row for an interlaced pass */ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)) PNG_PRIVATE; + png_bytep row, int pass)) PNG_PRIVATE; #endif /* Unfilter a row */ PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row, png_bytep prev_row, - int filter)) PNG_PRIVATE; + png_row_infop row_info, png_bytep row, png_bytep prev_row, + int filter)) PNG_PRIVATE; /* Choose the best filter to use and filter the row data */ PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)) PNG_PRIVATE; + png_row_infop row_info)) PNG_PRIVATE; /* Write out the filtered row. */ PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)) PNG_PRIVATE; + png_bytep filtered_row)) PNG_PRIVATE; /* Finish a row while reading, dealing with interlacing passes, etc. */ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); @@ -3437,132 +3530,132 @@ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Optional call to update the users info structure */ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; /* These are the functions that do the transformations */ #ifdef PNG_READ_FILLER_SUPPORTED PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 filler, png_uint_32 flags)) PNG_PRIVATE; + png_bytep row, png_uint_32 filler, png_uint_32 flags)) PNG_PRIVATE; #endif #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 flags)) PNG_PRIVATE; + png_bytep row, png_uint_32 flags)) PNG_PRIVATE; #endif #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop - row_info, png_bytep row)) PNG_PRIVATE; + row_info, png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_PACK_SUPPORTED PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_SHIFT_SUPPORTED PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p sig_bits)) PNG_PRIVATE; + png_color_8p sig_bits)) PNG_PRIVATE; #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_16_TO_8_SUPPORTED PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_READ_DITHER_SUPPORTED PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, - png_bytep row, png_bytep palette_lookup, - png_bytep dither_lookup)) PNG_PRIVATE; + png_bytep row, png_bytep palette_lookup, + png_bytep dither_lookup)) PNG_PRIVATE; # ifdef PNG_CORRECT_PALETTE_SUPPORTED PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)) PNG_PRIVATE; + png_colorp palette, int num_palette)) PNG_PRIVATE; # endif #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_PACK_SUPPORTED PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 bit_depth)) PNG_PRIVATE; + png_bytep row, png_uint_32 bit_depth)) PNG_PRIVATE; #endif #ifdef PNG_WRITE_SHIFT_SUPPORTED PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p bit_depth)) PNG_PRIVATE; + png_color_8p bit_depth)) PNG_PRIVATE; #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED #ifdef PNG_READ_GAMMA_SUPPORTED PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background, - png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift)) PNG_PRIVATE; + png_color_16p trans_values, png_color_16p background, + png_color_16p background_1, + png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, + png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, + png_uint_16pp gamma_16_to_1, int gamma_shift)) PNG_PRIVATE; #else PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background)) PNG_PRIVATE; + png_color_16p trans_values, png_color_16p background)) PNG_PRIVATE; #endif #endif #ifdef PNG_READ_GAMMA_SUPPORTED PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift)) PNG_PRIVATE; + png_bytep gamma_table, png_uint_16pp gamma_16_table, + int gamma_shift)) PNG_PRIVATE; #endif #ifdef PNG_READ_EXPAND_SUPPORTED PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, - png_bytep row, png_colorp palette, png_bytep trans, - int num_trans)) PNG_PRIVATE; + png_bytep row, png_colorp palette, png_bytep trans, + int num_trans)) PNG_PRIVATE; PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_color_16p trans_value)) PNG_PRIVATE; + png_bytep row, png_color_16p trans_value)) PNG_PRIVATE; #endif /* The following decodes the appropriate chunks, and does error correction, @@ -3571,168 +3664,168 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, /* Decode the IHDR chunk */ PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #ifdef PNG_READ_bKGD_SUPPORTED PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_cHRM_SUPPORTED PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_gAMA_SUPPORTED PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_hIST_SUPPORTED PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_iCCP_SUPPORTED extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif /* PNG_READ_iCCP_SUPPORTED */ #ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_oFFs_SUPPORTED PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_pCAL_SUPPORTED PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_pHYs_SUPPORTED PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_sBIT_SUPPORTED PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_sCAL_SUPPORTED PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_sPLT_SUPPORTED extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif /* PNG_READ_sPLT_SUPPORTED */ #ifdef PNG_READ_sRGB_SUPPORTED PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_tIME_SUPPORTED PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_tRNS_SUPPORTED PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif #ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; #endif PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_bytep chunk_name)) PNG_PRIVATE; + png_bytep chunk_name)) PNG_PRIVATE; /* Handle the transformations for reading and writing */ PNG_EXTERN void png_do_read_transformations - PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_do_write_transformations - PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_init_read_transformations - PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)) PNG_PRIVATE; + png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; + png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; + png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; PNG_EXTERN void png_read_push_finish_row - PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNGARG((png_structp png_ptr)) PNG_PRIVATE; #ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; #endif #ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; #endif #ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; + png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)) PNG_PRIVATE; + png_infop info_ptr)) PNG_PRIVATE; #endif #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)) PNG_PRIVATE; + png_bytep row)) PNG_PRIVATE; #endif #ifdef PNG_ASSEMBLER_CODE_SUPPORTED @@ -3746,56 +3839,56 @@ PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* The following six functions will be exported in libpng-1.4.0. */ #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr, -png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr, -png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr, -png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr, -png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr, -png_infop info_ptr)); + png_infop info_ptr)); #ifdef PNG_pHYs_SUPPORTED PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); + png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif /* PNG_pHYs_SUPPORTED */ #endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ /* Read the chunk header (length + type name) */ PNG_EXTERN png_uint_32 png_read_chunk_header - PNGARG((png_structp png_ptr)) PNG_PRIVATE; +PNGARG((png_structp png_ptr)) PNG_PRIVATE; /* Added at libpng version 1.2.34 */ #ifdef PNG_cHRM_SUPPORTED PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)) PNG_PRIVATE; + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) PNG_PRIVATE; #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_CHECK_cHRM_SUPPORTED /* Added at libpng version 1.2.34 */ PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, - unsigned long *hi_product, unsigned long *lo_product)) PNG_PRIVATE; + unsigned long *hi_product, unsigned long *lo_product)) PNG_PRIVATE; #endif #endif /* Added at libpng version 1.2.41 */ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, - png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_type, int compression_type, - int filter_type)) PNG_PRIVATE; + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type)) PNG_PRIVATE; /* Added at libpng version 1.2.41 */ PNG_EXTERN png_voidp png_calloc PNGARG((png_structp png_ptr, - png_uint_32 size)); + png_uint_32 size)); /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ diff --git a/src/modules/tracepath/pngconf.h b/src/modules/tracepath/pngconf.h index 042a5e9..e16707d 100644 --- a/src/modules/tracepath/pngconf.h +++ b/src/modules/tracepath/pngconf.h @@ -263,9 +263,9 @@ #ifdef _WIN32_WCE # include - /* Console I/O functions are not supported on WindowsCE */ +/* Console I/O functions are not supported on WindowsCE */ # define PNG_NO_CONSOLE_IO - /* abort() may not be supported on some/all Windows CE platforms */ +/* abort() may not be supported on some/all Windows CE platforms */ # define PNG_ABORT() exit(-1) # ifdef PNG_DEBUG # undef PNG_DEBUG @@ -365,16 +365,16 @@ # undef _BSD_SOURCE # endif # ifdef _SETJMP_H - /* If you encounter a compiler error here, see the explanation - * near the end of INSTALL. - */ - __pngconf.h__ in libpng already includes setjmp.h; - __dont__ include it again.; +/* If you encounter a compiler error here, see the explanation + * near the end of INSTALL. + */ +__pngconf.h__ in libpng already includes setjmp.h; +__dont__ include it again.; # endif # endif /* __linux__ */ # endif /* PNG_SKIP_SETJMP_CHECK */ - /* include setjmp.h for error handling */ +/* include setjmp.h for error handling */ # include # ifdef __linux__ @@ -413,10 +413,10 @@ #ifdef PNG_FLOATING_POINT_SUPPORTED # ifdef MACOS - /* We need to check that hasn't already been included earlier - * as it seems it doesn't agree with , yet we should really use - * if possible. - */ +/* We need to check that hasn't already been included earlier + * as it seems it doesn't agree with , yet we should really use + * if possible. + */ # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) # include # endif @@ -424,9 +424,9 @@ # include # endif # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) - /* Amiga SAS/C: We must include builtin FPU functions when compiling using - * MATH=68881 - */ +/* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 + */ # include # endif #endif @@ -656,7 +656,7 @@ !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ #endif /* about interlacing capability! You'll */ - /* still have interlacing unless you change the following define: */ +/* still have interlacing unless you change the following define: */ #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ /* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */ @@ -806,7 +806,7 @@ # endif # if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4) - /* work around 64-bit gcc compiler bugs in gcc-3.x */ +/* work around 64-bit gcc compiler bugs in gcc-3.x */ # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) # define PNG_NO_MMX_CODE # endif @@ -1219,7 +1219,7 @@ /* Need the time information for converting tIME chunks */ #ifdef PNG_CONVERT_tIME_SUPPORTED - /* "time.h" functions are not supported on WindowsCE */ +/* "time.h" functions are not supported on WindowsCE */ # include #endif @@ -1241,10 +1241,10 @@ typedef unsigned char png_byte; /* This is usually size_t. It is typedef'ed just in case you need it to change (I'm not sure if you will or not, so I thought I'd be safe) */ #ifdef PNG_SIZE_T - typedef PNG_SIZE_T png_size_t; +typedef PNG_SIZE_T png_size_t; # define png_sizeof(x) png_convert_size(sizeof(x)) #else - typedef size_t png_size_t; +typedef size_t png_size_t; # define png_sizeof(x) sizeof(x) #endif @@ -1265,7 +1265,7 @@ typedef unsigned char png_byte; # else # define LDATA 0 # endif - /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ +/* GRR: why is Cygwin in here? Cygwin is not Borland C... */ # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) # define PNG_MAX_MALLOC_64K # if (LDATA != 1) @@ -1274,11 +1274,11 @@ typedef unsigned char png_byte; # endif # define USE_FAR_KEYWORD # endif /* LDATA != 1 */ - /* Possibly useful for moving data out of default segment. - * Uncomment it if you want. Could also define FARDATA as - * const if your compiler supports it. (SJT) +/* Possibly useful for moving data out of default segment. + * Uncomment it if you want. Could also define FARDATA as + * const if your compiler supports it. (SJT) # define FARDATA FAR - */ + */ # endif /* __WIN32__, __FLAT__, __CYGWIN__ */ #endif /* __BORLANDC__ */ @@ -1312,43 +1312,43 @@ typedef unsigned char png_byte; typedef png_int_32 png_fixed_point; /* Add typedefs for pointers */ -typedef void FAR * png_voidp; -typedef png_byte FAR * png_bytep; -typedef png_uint_32 FAR * png_uint_32p; -typedef png_int_32 FAR * png_int_32p; -typedef png_uint_16 FAR * png_uint_16p; -typedef png_int_16 FAR * png_int_16p; -typedef PNG_CONST char FAR * png_const_charp; -typedef char FAR * png_charp; -typedef png_fixed_point FAR * png_fixed_point_p; +typedef void FAR *png_voidp; +typedef png_byte FAR *png_bytep; +typedef png_uint_32 FAR *png_uint_32p; +typedef png_int_32 FAR *png_int_32p; +typedef png_uint_16 FAR *png_uint_16p; +typedef png_int_16 FAR *png_int_16p; +typedef PNG_CONST char FAR *png_const_charp; +typedef char FAR *png_charp; +typedef png_fixed_point FAR *png_fixed_point_p; #ifndef PNG_NO_STDIO #ifdef _WIN32_WCE typedef HANDLE png_FILE_p; #else -typedef FILE * png_FILE_p; +typedef FILE *png_FILE_p; #endif #endif #ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * png_doublep; +typedef double FAR *png_doublep; #endif /* Pointers to pointers; i.e. arrays */ -typedef png_byte FAR * FAR * png_bytepp; -typedef png_uint_32 FAR * FAR * png_uint_32pp; -typedef png_int_32 FAR * FAR * png_int_32pp; -typedef png_uint_16 FAR * FAR * png_uint_16pp; -typedef png_int_16 FAR * FAR * png_int_16pp; -typedef PNG_CONST char FAR * FAR * png_const_charpp; -typedef char FAR * FAR * png_charpp; -typedef png_fixed_point FAR * FAR * png_fixed_point_pp; +typedef png_byte FAR *FAR *png_bytepp; +typedef png_uint_32 FAR *FAR *png_uint_32pp; +typedef png_int_32 FAR *FAR *png_int_32pp; +typedef png_uint_16 FAR *FAR *png_uint_16pp; +typedef png_int_16 FAR *FAR *png_int_16pp; +typedef PNG_CONST char FAR *FAR *png_const_charpp; +typedef char FAR *FAR *png_charpp; +typedef png_fixed_point FAR *FAR *png_fixed_point_pp; #ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * FAR * png_doublepp; +typedef double FAR *FAR *png_doublepp; #endif /* Pointers to pointers to pointers; i.e., pointer to array */ -typedef char FAR * FAR * FAR * png_charppp; +typedef char FAR *FAR *FAR *png_charppp; #if defined(PNG_1_0_X) || defined(PNG_1_2_X) /* SPC - Is this stuff deprecated? */ @@ -1357,9 +1357,9 @@ typedef char FAR * FAR * FAR * png_charppp; * or another compression library is used, then change these. * Eliminates need to change all the source files. */ -typedef charf * png_zcharp; -typedef charf * FAR * png_zcharpp; -typedef z_stream FAR * png_zstreamp; +typedef charf *png_zcharp; +typedef charf *FAR *png_zcharpp; +typedef z_stream FAR *png_zstreamp; #endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */ /* @@ -1466,7 +1466,7 @@ typedef z_stream FAR * png_zstreamp; # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol - /* Borland/Microsoft */ +/* Borland/Microsoft */ # if defined(_MSC_VER) || defined(__BORLANDC__) # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) # define PNG_EXPORT PNG_EXPORT_TYPE1 @@ -1476,7 +1476,7 @@ typedef z_stream FAR * png_zstreamp; # define PNG_IMPEXP __export # else # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in - VC++ */ +VC++ */ # endif /* Exists in Borland C++ for C++ classes (== huge) */ # endif @@ -1552,10 +1552,10 @@ typedef z_stream FAR * png_zstreamp; # define PNG_ALLOCATED __attribute__((__malloc__)) # endif - /* This specifically protects structure members that should only be - * accessed from within the library, therefore should be empty during - * a library build. - */ +/* This specifically protects structure members that should only be + * accessed from within the library, therefore should be empty during + * a library build. + */ # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif @@ -1633,12 +1633,12 @@ typedef z_stream FAR * png_zstreamp; # define png_snprintf6 snprintf # endif # else - /* You don't have or don't want to use snprintf(). Caution: Using - * sprintf instead of snprintf exposes your application to accidental - * or malevolent buffer overflows. If you don't have snprintf() - * as a general rule you should provide one (you can get one from - * Portable OpenSSH). - */ +/* You don't have or don't want to use snprintf(). Caution: Using + * sprintf instead of snprintf exposes your application to accidental + * or malevolent buffer overflows. If you don't have snprintf() + * as a general rule you should provide one (you can get one from + * Portable OpenSSH). + */ # define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) # define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) # define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ diff --git a/src/modules/tracepath/zconf.h b/src/modules/tracepath/zconf.h index b234387..0806216 100644 --- a/src/modules/tracepath/zconf.h +++ b/src/modules/tracepath/zconf.h @@ -233,7 +233,7 @@ for small objects. */ - /* Type declarations */ +/* Type declarations */ #ifndef OF /* function prototypes */ # ifdef STDC @@ -251,7 +251,7 @@ */ #ifdef SYS16BIT # if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ +/* MSC small or medium model */ # define SMALL_MEDIUM # ifdef _MSC_VER # define FAR _far @@ -260,7 +260,7 @@ # endif # endif # if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ +/* Turbo C small or medium model */ # define SMALL_MEDIUM # ifdef __BORLANDC__ # define FAR _far @@ -271,9 +271,9 @@ #endif #if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ +/* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ # ifdef ZLIB_DLL # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) # ifdef ZLIB_INTERNAL @@ -283,17 +283,17 @@ # endif # endif # endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ +/* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ # ifdef ZLIB_WINAPI # ifdef FAR # undef FAR # endif # include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +/* No need for _export, use ZLIB.DEF instead. */ +/* For complete Windows compatibility, use WINAPI, not __stdcall. */ # define ZEXPORT WINAPI # ifdef WIN32 # define ZEXPORTVA WINAPIV @@ -336,10 +336,10 @@ typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ #ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ # define Bytef Byte FAR #else - typedef Byte FAR Bytef; +typedef Byte FAR Bytef; #endif typedef char FAR charf; typedef int FAR intf; @@ -347,13 +347,13 @@ typedef uInt FAR uIntf; typedef uLong FAR uLongf; #ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; +typedef void const *voidpc; +typedef void FAR *voidpf; +typedef void *voidp; #else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; +typedef Byte const *voidpc; +typedef Byte FAR *voidpf; +typedef Byte *voidp; #endif #if 1 /* was set to #if 1 by ./configure */ @@ -410,19 +410,19 @@ typedef uLong FAR uLongf; /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") +#pragma map(deflateInit_,"DEIN") +#pragma map(deflateInit2_,"DEIN2") +#pragma map(deflateEnd,"DEEND") +#pragma map(deflateBound,"DEBND") +#pragma map(inflateInit_,"ININ") +#pragma map(inflateInit2_,"ININ2") +#pragma map(inflateEnd,"INEND") +#pragma map(inflateSync,"INSY") +#pragma map(inflateSetDictionary,"INSEDI") +#pragma map(compressBound,"CMBND") +#pragma map(inflate_table,"INTABL") +#pragma map(inflate_fast,"INFA") +#pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */ diff --git a/src/modules/tracepath/zlib.h b/src/modules/tracepath/zlib.h index d3a3da8..5815faf 100644 --- a/src/modules/tracepath/zlib.h +++ b/src/modules/tracepath/zlib.h @@ -83,24 +83,24 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address)); struct internal_state; typedef struct z_stream_s { - Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total nb of input bytes read so far */ + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total nb of bytes output so far */ + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ - char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ + int data_type; /* best guess about the data type: binary or text */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ } z_stream; typedef z_stream FAR *z_streamp; @@ -110,19 +110,19 @@ typedef z_stream FAR *z_streamp; for more details on the meanings of these fields. */ typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used when writing a gzip file) */ } gz_header; @@ -159,7 +159,7 @@ typedef gz_header FAR *gz_headerp; if the decompressor wants to decompress everything in a single step). */ - /* constants */ +/* constants */ #define Z_NO_FLUSH 0 #define Z_PARTIAL_FLUSH 1 @@ -211,9 +211,9 @@ typedef gz_header FAR *gz_headerp; /* for compatibility with versions < 1.0.2 */ - /* basic functions */ +/* basic functions */ -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +ZEXTERN const char *ZEXPORT zlibVersion OF((void)); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. This check @@ -508,7 +508,7 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); */ - /* Advanced functions */ +/* Advanced functions */ /* The following functions are needed only in some special applications. @@ -576,8 +576,8 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, */ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); + const Bytef *dictionary, + uInt dictLength)); /* Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called @@ -615,7 +615,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, */ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); + z_streamp source)); /* Sets the destination stream as a complete copy of the source stream. @@ -644,8 +644,8 @@ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); */ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); + int level, + int strategy)); /* Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2. This can be @@ -665,10 +665,10 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, */ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); + int good_length, + int max_lazy, + int nice_length, + int max_chain)); /* Fine tune deflate's internal compression parameters. This should only be used by someone who understands the algorithm used by zlib's deflate for @@ -682,7 +682,7 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, */ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); + uLong sourceLen)); /* deflateBound() returns an upper bound on the compressed size after deflation of sourceLen bytes. It must be called after deflateInit() or @@ -692,8 +692,8 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, */ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); + int bits, + int value)); /* deflatePrime() inserts bits in the deflate output stream. The intent is that this function is used to start off the deflate output with the bits @@ -708,7 +708,7 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, */ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); + gz_headerp head)); /* deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called @@ -782,8 +782,8 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, */ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); + const Bytef *dictionary, + uInt dictLength)); /* Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate, @@ -819,7 +819,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); */ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); + z_streamp source)); /* Sets the destination stream as a complete copy of the source stream. @@ -845,7 +845,7 @@ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); */ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); + int windowBits)); /* This function is the same as inflateReset, but it also permits changing the wrap and window size requests. The windowBits parameter is interpreted @@ -857,8 +857,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, */ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); + int bits, + int value)); /* This function inserts bits in the inflate input stream. The intent is that this function is used to start inflating at a bit position in the @@ -906,7 +906,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); */ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); + gz_headerp head)); /* inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after @@ -967,12 +967,12 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR *FAR *)); typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); /* inflateBack() does a raw inflate with a single call using a call-back interface for input and output. This is more efficient than inflate() for @@ -1089,7 +1089,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); */ - /* utility functions */ +/* utility functions */ /* The following utility functions are implemented on top of the basic @@ -1100,7 +1100,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); */ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); + const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1114,8 +1114,8 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, */ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); + const Bytef *source, uLong sourceLen, + int level)); /* Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte @@ -1137,7 +1137,7 @@ ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); */ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); + const Bytef *source, uLong sourceLen)); /* Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1153,7 +1153,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, */ - /* gzip file access functions */ +/* gzip file access functions */ /* This library supports reading and writing files in gzip (.gz) format with @@ -1249,7 +1249,7 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); */ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); + voidpc buf, unsigned len)); /* Writes the given number of uncompressed bytes into the compressed file. gzwrite returns the number of uncompressed bytes written or 0 in case of @@ -1279,7 +1279,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); gzputs returns the number of characters written, or -1 in case of error. */ -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +ZEXTERN char *ZEXPORT gzgets OF((gzFile file, char *buf, int len)); /* Reads bytes from the compressed file until len-1 characters are read, or a newline character is read and transferred to buf, or an end-of-file @@ -1434,7 +1434,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); zlib library. */ -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +ZEXTERN const char *ZEXPORT gzerror OF((gzFile file, int *errnum)); /* Returns the error message for the last error which occurred on the given compressed file. errnum is set to zlib error number. If an error occurred @@ -1458,7 +1458,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); */ - /* checksum functions */ +/* checksum functions */ /* These functions are not related to compression but are exported @@ -1524,25 +1524,25 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); */ - /* various hacks, don't look :) */ +/* various hacks, don't look :) */ /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); + const char *version, int stream_size)); ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); + const char *version, int stream_size)); ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); + const char *version, int stream_size)); ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); + unsigned char FAR *window, + const char *version, + int stream_size)); #define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit(strm) \ @@ -1563,12 +1563,12 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, * without large file support, _LFS64_LARGEFILE must also be true */ #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); +ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); +ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); +ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); +ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); +ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); +ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); #endif #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 @@ -1579,31 +1579,33 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 # ifndef _LARGEFILE64_SOURCE - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); +ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); +ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); +ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); +ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); +ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); # endif #else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); #endif /* hack for buggy compilers */ #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; +struct internal_state { + int dummy; +}; #endif /* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); +ZEXTERN const char *ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); +ZEXTERN const uLongf *ZEXPORT get_crc_table OF((void)); ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); #ifdef __cplusplus diff --git a/src/wraps/coregl_egl.c b/src/wraps/coregl_egl.c index 18fda83..4fda715 100644 --- a/src/wraps/coregl_egl.c +++ b/src/wraps/coregl_egl.c @@ -38,8 +38,7 @@ int coregl_glwrap_init() { lib_handle = dlopen("libCOREGL.so", RTLD_NOW); - if (!lib_handle) - { + if (!lib_handle) { LOGE(" \E[40;31;1m%s\E[0m\n\n", dlerror()); LOGE(" \E[40;31;1mInvalid library link! (Check linkage of libEGL -> libCOREGL)\E[0m\n"); return 0; @@ -77,7 +76,7 @@ eglGetDisplay(EGLNativeDisplayType display_id) } EGLBoolean -eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) +eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { INIT_EXPORT(); return ovr_eglInitialize(dpy, major, minor); @@ -91,21 +90,24 @@ eglTerminate(EGLDisplay dpy) } EGLBoolean -eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) +eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, + EGLint *num_config) { INIT_EXPORT(); return ovr_eglGetConfigs(dpy, configs, config_size, num_config); } EGLBoolean -eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) +eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, + EGLint config_size, EGLint *num_config) { INIT_EXPORT(); return ovr_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config); } EGLBoolean -eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) +eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, + EGLint *value) { INIT_EXPORT(); return ovr_eglGetConfigAttrib(dpy, config, attribute, value); @@ -113,21 +115,24 @@ eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *v EGLSurface -eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) +eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, const EGLint *attrib_list) { INIT_EXPORT(); return ovr_eglCreateWindowSurface(dpy, config, win, attrib_list); } EGLSurface -eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) +eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list) { INIT_EXPORT(); return ovr_eglCreatePbufferSurface(dpy, config, attrib_list); } EGLSurface -eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) +eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, const EGLint *attrib_list) { INIT_EXPORT(); return ovr_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list); @@ -141,7 +146,8 @@ eglDestroySurface(EGLDisplay dpy, EGLSurface surface) } EGLBoolean -eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value) +eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, + EGLint *value) { INIT_EXPORT(); return ovr_eglQuerySurface(dpy, surface, attribute, value); @@ -176,14 +182,17 @@ eglReleaseThread(void) } EGLSurface -eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) +eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, + EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) { INIT_EXPORT(); - return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); + return ovr_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, + attrib_list); } EGLBoolean -eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) +eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, + EGLint value) { INIT_EXPORT(); return ovr_eglSurfaceAttrib(dpy, surface, attribute, value); @@ -211,7 +220,8 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval) } EGLContext -eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) +eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, + const EGLint *attrib_list) { INIT_EXPORT(); return ovr_eglCreateContext(dpy, config, share_context, attrib_list); @@ -288,7 +298,7 @@ eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) } _eng_fn -eglGetProcAddress(const char* procname) +eglGetProcAddress(const char *procname) { INIT_EXPORT(); return ovr_eglGetProcAddress(procname); diff --git a/src/wraps/coregl_gl.c b/src/wraps/coregl_gl.c index 957fa56..b78ca45 100644 --- a/src/wraps/coregl_gl.c +++ b/src/wraps/coregl_gl.c @@ -36,8 +36,7 @@ int coregl_glwrap_init() { lib_handle = dlopen("libCOREGL.so", RTLD_NOW); - if (!lib_handle) - { + if (!lib_handle) { LOGE(" \E[40;31;1m%s\E[0m\n\n", dlerror()); LOGE(" \E[40;31;1mInvalid library link! (Check linkage of libEGL -> libCOREGL)\E[0m\n"); return 0; @@ -72,7 +71,7 @@ glAttachShader(GLuint program, GLuint shader) } void -glBindAttribLocation(GLuint program, GLuint index, const char* name) +glBindAttribLocation(GLuint program, GLuint index, const char *name) { ovr_glBindAttribLocation(program, index, name); } @@ -126,19 +125,21 @@ glBlendFunc(GLenum sfactor, GLenum dfactor) } void -glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, + GLenum dstAlpha) { ovr_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); } void -glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) +glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage) { ovr_glBufferData(target, size, data, usage); } void -glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) +glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, + const void *data) { ovr_glBufferSubData(target, offset, size, data); } @@ -186,25 +187,34 @@ glCompileShader(GLuint shader) } void -glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) +glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLsizei imageSize, + const void *data) { - ovr_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); + ovr_glCompressedTexImage2D(target, level, internalformat, width, height, border, + imageSize, data); } void -glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) +glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, + const void *data) { - ovr_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); + ovr_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, + format, imageSize, data); } void -glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, + GLint y, GLsizei width, GLsizei height, GLint border) { - ovr_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + ovr_glCopyTexImage2D(target, level, internalformat, x, y, width, height, + border); } void -glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint x, GLint y, GLsizei width, GLsizei height) { ovr_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } @@ -228,13 +238,13 @@ glCullFace(GLenum mode) } void -glDeleteBuffers(GLsizei n, const GLuint* buffers) +glDeleteBuffers(GLsizei n, const GLuint *buffers) { ovr_glDeleteBuffers(n, buffers); } void -glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) +glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) { ovr_glDeleteFramebuffers(n, framebuffers); } @@ -246,7 +256,7 @@ glDeleteProgram(GLuint program) } void -glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) +glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) { ovr_glDeleteRenderbuffers(n, renderbuffers); } @@ -258,7 +268,7 @@ glDeleteShader(GLuint shader) } void -glDeleteTextures(GLsizei n, const GLuint* textures) +glDeleteTextures(GLsizei n, const GLuint *textures) { ovr_glDeleteTextures(n, textures); } @@ -306,7 +316,7 @@ glDrawArrays(GLenum mode, GLint first, GLsizei count) } void -glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) +glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) { ovr_glDrawElements(mode, count, type, indices); } @@ -336,13 +346,16 @@ glFlush(void) } void -glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +glFramebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { - ovr_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + ovr_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, + renderbuffer); } void -glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, + GLuint texture, GLint level) { ovr_glFramebufferTexture2D(target, attachment, textarget, texture, level); } @@ -354,19 +367,19 @@ glFrontFace(GLenum mode) } void -glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) +glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) { ovr_glGetVertexAttribfv(index, pname, params); } void -glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) +glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) { ovr_glGetVertexAttribiv(index, pname, params); } void -glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) +glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) { ovr_glGetVertexAttribPointerv(index, pname, pointer); } @@ -378,7 +391,7 @@ glHint(GLenum target, GLenum mode) } void -glGenBuffers(GLsizei n, GLuint* buffers) +glGenBuffers(GLsizei n, GLuint *buffers) { ovr_glGenBuffers(n, buffers); } @@ -390,55 +403,58 @@ glGenerateMipmap(GLenum target) } void -glGenFramebuffers(GLsizei n, GLuint* framebuffers) +glGenFramebuffers(GLsizei n, GLuint *framebuffers) { ovr_glGenFramebuffers(n, framebuffers); } void -glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) +glGenRenderbuffers(GLsizei n, GLuint *renderbuffers) { ovr_glGenRenderbuffers(n, renderbuffers); } void -glGenTextures(GLsizei n, GLuint* textures) +glGenTextures(GLsizei n, GLuint *textures) { ovr_glGenTextures(n, textures); } void -glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { ovr_glGetActiveAttrib(program, index, bufsize, length, size, type, name); } void -glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) +glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, + GLsizei *length, GLint *size, GLenum *type, char *name) { ovr_glGetActiveUniform(program, index, bufsize, length, size, type, name); } void -glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) +glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, + GLuint *shaders) { ovr_glGetAttachedShaders(program, maxcount, count, shaders); } int -glGetAttribLocation(GLuint program, const char* name) +glGetAttribLocation(GLuint program, const char *name) { return ovr_glGetAttribLocation(program, name); } void -glGetBooleanv(GLenum pname, GLboolean* params) +glGetBooleanv(GLenum pname, GLboolean *params) { ovr_glGetBooleanv(pname, params); } void -glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) +glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) { ovr_glGetBufferParameteriv(target, pname, params); } @@ -450,61 +466,65 @@ glGetError(void) } void -glGetFloatv(GLenum pname, GLfloat* params) +glGetFloatv(GLenum pname, GLfloat *params) { ovr_glGetFloatv(pname, params); } void -glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) +glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, + GLenum pname, GLint *params) { ovr_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); } void -glGetIntegerv(GLenum pname, GLint* params) +glGetIntegerv(GLenum pname, GLint *params) { ovr_glGetIntegerv(pname, params); } void -glGetProgramiv(GLuint program, GLenum pname, GLint* params) +glGetProgramiv(GLuint program, GLenum pname, GLint *params) { ovr_glGetProgramiv(program, pname, params); } void -glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) +glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, + char *infolog) { ovr_glGetProgramInfoLog(program, bufsize, length, infolog); } void -glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) +glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params) { ovr_glGetRenderbufferParameteriv(target, pname, params); } void -glGetShaderiv(GLuint shader, GLenum pname, GLint* params) +glGetShaderiv(GLuint shader, GLenum pname, GLint *params) { ovr_glGetShaderiv(shader, pname, params); } void -glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) +glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, + char *infolog) { ovr_glGetShaderInfoLog(shader, bufsize, length, infolog); } void -glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, + GLint *range, GLint *precision) { ovr_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); } void -glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) +glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, char *source) { ovr_glGetShaderSource(shader, bufsize, length, source); } @@ -516,31 +536,31 @@ glGetString(GLenum name) } void -glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) +glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) { ovr_glGetTexParameterfv(target, pname, params); } void -glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) +glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) { ovr_glGetTexParameteriv(target, pname, params); } void -glGetUniformfv(GLuint program, GLint location, GLfloat* params) +glGetUniformfv(GLuint program, GLint location, GLfloat *params) { ovr_glGetUniformfv(program, location, params); } void -glGetUniformiv(GLuint program, GLint location, GLint* params) +glGetUniformiv(GLuint program, GLint location, GLint *params) { ovr_glGetUniformiv(program, location, params); } int -glGetUniformLocation(GLuint program, const char* name) +glGetUniformLocation(GLuint program, const char *name) { return ovr_glGetUniformLocation(program, name); } @@ -612,7 +632,8 @@ glPolygonOffset(GLfloat factor, GLfloat units) } void -glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) +glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, + GLenum type, void *pixels) { ovr_glReadPixels(x, y, width, height, format, type, pixels); } @@ -624,7 +645,8 @@ glReleaseShaderCompiler(void) } void -glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, + GLsizei height) { ovr_glRenderbufferStorage(target, internalformat, width, height); } @@ -642,13 +664,15 @@ glScissor(GLint x, GLint y, GLsizei width, GLsizei height) } void -glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +glShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, + const void *binary, GLsizei length) { ovr_glShaderBinary(n, shaders, binaryformat, binary, length); } void -glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) +glShaderSource(GLuint shader, GLsizei count, const char **string, + const GLint *length) { ovr_glShaderSource(shader, count, string, length); } @@ -690,9 +714,11 @@ glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) } void -glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) +glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, + GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) { - ovr_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); + ovr_glTexImage2D(target, level, internalformat, width, height, border, format, + type, pixels); } void @@ -702,7 +728,7 @@ glTexParameterf(GLenum target, GLenum pname, GLfloat param) } void -glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) +glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) { ovr_glTexParameterfv(target, pname, params); } @@ -714,15 +740,17 @@ glTexParameteri(GLenum target, GLenum pname, GLint param) } void -glTexParameteriv(GLenum target, GLenum pname, const GLint* params) +glTexParameteriv(GLenum target, GLenum pname, const GLint *params) { ovr_glTexParameteriv(target, pname, params); } void -glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) +glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) { - ovr_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + ovr_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, + type, pixels); } void @@ -732,7 +760,7 @@ glUniform1f(GLint location, GLfloat x) } void -glUniform1fv(GLint location, GLsizei count, const GLfloat* v) +glUniform1fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform1fv(location, count, v); } @@ -744,7 +772,7 @@ glUniform1i(GLint location, GLint x) } void -glUniform1iv(GLint location, GLsizei count, const GLint* v) +glUniform1iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform1iv(location, count, v); } @@ -756,7 +784,7 @@ glUniform2f(GLint location, GLfloat x, GLfloat y) } void -glUniform2fv(GLint location, GLsizei count, const GLfloat* v) +glUniform2fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform2fv(location, count, v); } @@ -768,7 +796,7 @@ glUniform2i(GLint location, GLint x, GLint y) } void -glUniform2iv(GLint location, GLsizei count, const GLint* v) +glUniform2iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform2iv(location, count, v); } @@ -780,7 +808,7 @@ glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) } void -glUniform3fv(GLint location, GLsizei count, const GLfloat* v) +glUniform3fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform3fv(location, count, v); } @@ -792,7 +820,7 @@ glUniform3i(GLint location, GLint x, GLint y, GLint z) } void -glUniform3iv(GLint location, GLsizei count, const GLint* v) +glUniform3iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform3iv(location, count, v); } @@ -804,7 +832,7 @@ glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) } void -glUniform4fv(GLint location, GLsizei count, const GLfloat* v) +glUniform4fv(GLint location, GLsizei count, const GLfloat *v) { ovr_glUniform4fv(location, count, v); } @@ -816,25 +844,28 @@ glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) } void -glUniform4iv(GLint location, GLsizei count, const GLint* v) +glUniform4iv(GLint location, GLsizei count, const GLint *v) { ovr_glUniform4iv(location, count, v); } void -glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix2fv(location, count, transpose, value); } void -glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix3fv(location, count, transpose, value); } void -glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix4fv(location, count, transpose, value); } @@ -858,7 +889,7 @@ glVertexAttrib1f(GLuint index, GLfloat x) } void -glVertexAttrib1fv(GLuint index, const GLfloat* values) +glVertexAttrib1fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib1fv(index, values); } @@ -870,7 +901,7 @@ glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) } void -glVertexAttrib2fv(GLuint index, const GLfloat* values) +glVertexAttrib2fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib2fv(index, values); } @@ -882,7 +913,7 @@ glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) } void -glVertexAttrib3fv(GLuint index, const GLfloat* values) +glVertexAttrib3fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib3fv(index, values); } @@ -894,13 +925,14 @@ glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) } void -glVertexAttrib4fv(GLuint index, const GLfloat* values) +glVertexAttrib4fv(GLuint index, const GLfloat *values) { ovr_glVertexAttrib4fv(index, values); } void -glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) +glVertexAttribPointer(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, const void *pointer) { ovr_glVertexAttribPointer(index, size, type, normalized, stride, pointer); } @@ -919,49 +951,64 @@ glReadBuffer(GLenum mode) } void -glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) +glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices) { ovr_glDrawRangeElements(mode, start, end, count, type, indices); } void -glTexImage3D(GLenum target, GLint level, GLint GLinternalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) +glTexImage3D(GLenum target, GLint level, GLint GLinternalFormat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, + const GLvoid *pixels) { - ovr_glTexImage3D(target, level, GLinternalFormat, width, height, depth, border, format, type, pixels); + ovr_glTexImage3D(target, level, GLinternalFormat, width, height, depth, border, + format, type, pixels); } void -glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) +glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, + GLenum type, const GLvoid *pixels) { - ovr_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + ovr_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, + depth, format, type, pixels); } void -glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - ovr_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + ovr_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, + height); } void -glCompressedTexImage3D(GLenum target, GLint level, GLenum GLinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) +glCompressedTexImage3D(GLenum target, GLint level, GLenum GLinternalformat, + GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, + const GLvoid *data) { - ovr_glCompressedTexImage3D(target, level, GLinternalformat, width, height, depth, border, imageSize, data); + ovr_glCompressedTexImage3D(target, level, GLinternalformat, width, height, + depth, border, imageSize, data); } void -glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) +glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, const GLvoid *data) { - ovr_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + ovr_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, + height, depth, format, imageSize, data); } void -glGenQueries(GLsizei n, GLuint* ids) +glGenQueries(GLsizei n, GLuint *ids) { ovr_glGenQueries(n, ids); } void -glDeleteQueries(GLsizei n, const GLuint* ids) +glDeleteQueries(GLsizei n, const GLuint *ids) { ovr_glDeleteQueries(n, ids); } @@ -985,13 +1032,13 @@ glEndQuery(GLenum target) } void -glGetQueryiv(GLenum target, GLenum pname, GLint* params) +glGetQueryiv(GLenum target, GLenum pname, GLint *params) { ovr_glGetQueryiv(target, pname, params); } void -glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) +glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) { ovr_glGetQueryObjectuiv(id, pname, params); } @@ -1003,73 +1050,86 @@ glUnmapBuffer(GLenum target) } void -glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) +glGetBufferPointerv(GLenum target, GLenum pname, GLvoid **params) { ovr_glGetBufferPointerv(target, pname, params); } void -glDrawBuffers(GLsizei n, const GLenum* bufs) +glDrawBuffers(GLsizei n, const GLenum *bufs) { ovr_glDrawBuffers(n, bufs); } void -glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix2x3fv(location, count, transpose, value); } void -glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix3x2fv(location, count, transpose, value); } void -glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix2x4fv(location, count, transpose, value); } void -glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix4x2fv(location, count, transpose, value); } void -glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix3x4fv(location, count, transpose, value); } void -glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) { ovr_glUniformMatrix4x3fv(location, count, transpose, value); } void -glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) +glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter) { - ovr_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + ovr_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, + mask, filter); } void -glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) +glRenderbufferStorageMultisample(GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height) { - ovr_glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + ovr_glRenderbufferStorageMultisample(target, samples, internalformat, width, + height); } void -glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) +glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, + GLint level, GLint layer) { ovr_glFramebufferTextureLayer(target, attachment, texture, level, layer); } -GLvoid* -glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) +GLvoid * +glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, + GLbitfield access) { return ovr_glMapBufferRange(target, offset, length, access); } @@ -1087,13 +1147,13 @@ glBindVertexArray(GLuint array) } void -glDeleteVertexArrays(GLsizei n, const GLuint* arrays) +glDeleteVertexArrays(GLsizei n, const GLuint *arrays) { ovr_glDeleteVertexArrays(n, arrays); } void -glGenVertexArrays(GLsizei n, GLuint* arrays) +glGenVertexArrays(GLsizei n, GLuint *arrays) { ovr_glGenVertexArrays(n, arrays); } @@ -1105,7 +1165,7 @@ glIsVertexArray(GLuint array) } void -glGetIntegeri_v(GLenum target, GLuint index, GLint* data) +glGetIntegeri_v(GLenum target, GLuint index, GLint *data) { ovr_glGetIntegeri_v(target, index, data); } @@ -1123,7 +1183,8 @@ glEndTransformFeedback() } void -glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) +glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, + GLsizeiptr size) { ovr_glBindBufferRange(target, index, buffer, offset, size); } @@ -1135,31 +1196,35 @@ glBindBufferBase(GLenum target, GLuint index, GLuint buffer) } void -glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) +glTransformFeedbackVaryings(GLuint program, GLsizei count, + const GLchar *const *varyings, GLenum bufferMode) { ovr_glTransformFeedbackVaryings(program, count, varyings, bufferMode); } void -glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) +glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, + GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) { - ovr_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); + ovr_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, + name); } void -glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) +glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, + const GLvoid *pointer) { ovr_glVertexAttribIPointer(index, size, type, stride, pointer); } void -glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) +glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) { ovr_glGetVertexAttribIiv(index, pname, params); } void -glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) +glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) { ovr_glGetVertexAttribIuiv(index, pname, params); } @@ -1177,19 +1242,19 @@ glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) } void -glVertexAttribI4iv(GLuint index, const GLint* v) +glVertexAttribI4iv(GLuint index, const GLint *v) { ovr_glVertexAttribI4iv(index, v); } void -glVertexAttribI4uiv(GLuint index, const GLuint* v) +glVertexAttribI4uiv(GLuint index, const GLuint *v) { ovr_glVertexAttribI4uiv(index, v); } void -glGetUniformuiv(GLuint program, GLint location, GLuint* params) +glGetUniformuiv(GLuint program, GLint location, GLuint *params) { ovr_glGetUniformuiv(program, location, params); } @@ -1225,43 +1290,43 @@ glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) } void -glUniform1uiv(GLint location, GLsizei count, const GLuint* value) +glUniform1uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform1uiv(location, count, value); } void -glUniform2uiv(GLint location, GLsizei count, const GLuint* value) +glUniform2uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform2uiv(location, count, value); } void -glUniform3uiv(GLint location, GLsizei count, const GLuint* value) +glUniform3uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform3uiv(location, count, value); } void -glUniform4uiv(GLint location, GLsizei count, const GLuint* value) +glUniform4uiv(GLint location, GLsizei count, const GLuint *value) { ovr_glUniform4uiv(location, count, value); } void -glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) +glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) { ovr_glClearBufferiv(buffer, drawbuffer, value); } void -glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) +glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) { ovr_glClearBufferuiv(buffer, drawbuffer, value); } void -glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) +glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) { ovr_glClearBufferfv(buffer, drawbuffer, value); } @@ -1272,62 +1337,71 @@ glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) ovr_glClearBufferfi(buffer, drawbuffer, depth, stencil); } -const GLubyte* +const GLubyte * glGetStringi(GLenum name, GLuint index) { return ovr_glGetStringi(name, index); } void -glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) +glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size) { ovr_glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); } void -glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) +glGetUniformIndices(GLuint program, GLsizei uniformCount, + const GLchar *const *uniformNames, GLuint *uniformIndices) { ovr_glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); } void -glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) +glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, + const GLuint *uniformIndices, GLenum pname, GLint *params) { ovr_glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); } GLuint -glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) +glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) { return ovr_glGetUniformBlockIndex(program, uniformBlockName); } void -glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) +glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, + GLenum pname, GLint *params) { ovr_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); } void -glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) +glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, + GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) { - ovr_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); + ovr_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, + uniformBlockName); } void -glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) +glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, + GLuint uniformBlockBinding) { ovr_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); } void -glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) +glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, + GLsizei instanceCount) { ovr_glDrawArraysInstanced(mode, first, count, instanceCount); } void -glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) +glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLsizei instanceCount) { ovr_glDrawElementsInstanced(mode, count, type, indices, instanceCount); } @@ -1363,37 +1437,38 @@ glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) } void -glGetInteger64v(GLenum pname, GLint64* params) +glGetInteger64v(GLenum pname, GLint64 *params) { ovr_glGetInteger64v(pname, params); } void -glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) +glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, + GLint *values) { ovr_glGetSynciv(sync, pname, bufSize, length, values); } void -glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) +glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data) { ovr_glGetInteger64i_v(target, index, data); } void -glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) +glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) { ovr_glGetBufferParameteri64v(target, pname, params); } void -glGenSamplers(GLsizei n, GLuint* samplers) +glGenSamplers(GLsizei n, GLuint *samplers) { ovr_glGenSamplers(n, samplers); } void -glDeleteSamplers(GLsizei n, const GLuint* samplers) +glDeleteSamplers(GLsizei n, const GLuint *samplers) { ovr_glDeleteSamplers(n, samplers); } @@ -1417,7 +1492,7 @@ glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) } void -glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) +glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) { ovr_glSamplerParameteriv(sampler, pname, param); } @@ -1429,19 +1504,19 @@ glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) } void -glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) +glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param) { ovr_glSamplerParameterfv(sampler, pname, param); } void -glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) +glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) { ovr_glGetSamplerParameteriv(sampler, pname, params); } void -glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) +glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) { ovr_glGetSamplerParameterfv(sampler, pname, params); } @@ -1459,13 +1534,13 @@ glBindTransformFeedback(GLenum target, GLuint id) } void -glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) +glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids) { ovr_glDeleteTransformFeedbacks(n, ids); } void -glGenTransformFeedbacks(GLsizei n, GLuint* ids) +glGenTransformFeedbacks(GLsizei n, GLuint *ids) { ovr_glGenTransformFeedbacks(n, ids); } @@ -1489,13 +1564,15 @@ glResumeTransformFeedback() } void -glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) +glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, + GLenum *binaryFormat, GLvoid *binary) { ovr_glGetProgramBinary(program, bufSize, length, binaryFormat, binary); } void -glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) +glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid *binary, + GLsizei length) { ovr_glProgramBinary(program, binaryFormat, binary, length); } @@ -1507,38 +1584,45 @@ glProgramParameteri(GLuint program, GLenum pname, GLint value) } void -glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) +glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, + const GLenum *attachments) { ovr_glInvalidateFramebuffer(target, numAttachments, attachments); } void -glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) +glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height) { - ovr_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); + ovr_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, + height); } void -glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height) { ovr_glTexStorage2D(target, levels, internalformat, width, height); } void -glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) +glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, + GLsizei width, GLsizei height, GLsizei depth) { ovr_glTexStorage3D(target, levels, internalformat, width, height, depth); } void -glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) +glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, + GLsizei bufSize, GLint *params) { ovr_glGetInternalformativ(target, internalformat, pname, bufSize, params); } /* GLES3.1 API */ GLuint -glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings) +glCreateShaderProgramv(GLenum type, GLsizei count, + const GLchar *const *strings) { return ovr_glCreateShaderProgramv(type, count, strings); } @@ -1580,7 +1664,8 @@ glValidateProgramPipeline(GLuint pipeline) } void -glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) +glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, + GLchar *infoLog) { ovr_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); } @@ -1616,37 +1701,45 @@ glFramebufferParameteri(GLenum target, GLenum pname, GLint param) } void -glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint * params) +glGetFramebufferParameteriv( GLenum target, GLenum pname, GLint *params) { ovr_glGetFramebufferParameteriv(target, pname, params); } void -glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) +glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, + GLint *params) { ovr_glGetProgramInterfaceiv(program, programInterface, pname, params); } GLuint -glGetProgramResourceIndex( GLuint program, GLenum programInterface, const char * name) +glGetProgramResourceIndex( GLuint program, GLenum programInterface, + const char *name) { return ovr_glGetProgramResourceIndex(program, programInterface, name); } void -glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name) +glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, + GLsizei bufSize, GLsizei *length, GLchar *name) { - ovr_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); + ovr_glGetProgramResourceName(program, programInterface, index, bufSize, length, + name); } void -glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) +glGetProgramResourceiv( GLuint program, GLenum programInterface, GLuint index, + GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, + GLint *params) { - ovr_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); + ovr_glGetProgramResourceiv(program, programInterface, index, propCount, + props, bufSize, length, params); } GLint -glGetProgramResourceLocation(GLuint program, GLenum programInterface, GLchar const *name) +glGetProgramResourceLocation(GLuint program, GLenum programInterface, + GLchar const *name) { return ovr_glGetProgramResourceLocation(program, programInterface, name); } @@ -1658,28 +1751,32 @@ glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) } void -glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value) +glProgramUniform1iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform1iv(program, location, count, value); } void -glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value) +glProgramUniform2iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform2iv(program, location, count, value); } void -glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value) +glProgramUniform3iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform3iv(program, location, count, value); } void -glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value) +glProgramUniform4iv(GLuint program, GLint location, GLsizei count, + const GLint *value) { ovr_glProgramUniform4iv(program, location, count, value); } @@ -1687,48 +1784,55 @@ glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint * void -glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +glProgramUniform1fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform1fv(program, location, count, value); } void -glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +glProgramUniform2fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform2fv(program, location, count, value); } void -glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +glProgramUniform3fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform3fv(program, location, count, value); } void -glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value) +glProgramUniform4fv(GLuint program, GLint location, GLsizei count, + const GLfloat *value) { ovr_glProgramUniform4fv(program, location, count, value); } void -glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2fv(program, location, count, transpose, value); } void -glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3fv(program, location, count, transpose, value); } void -glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4fv(program, location, count, transpose, value); } @@ -1755,7 +1859,8 @@ glProgramUniform3i(GLuint program, GLint location, GLint x, GLint y, GLint z) void -glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) +glProgramUniform4i(GLuint program, GLint location, GLint x, GLint y, GLint z, + GLint w) { ovr_glProgramUniform4i(program, location, x, y, z, w); } @@ -1776,14 +1881,16 @@ glProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y) void -glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) +glProgramUniform3f(GLuint program, GLint location, GLfloat x, GLfloat y, + GLfloat z) { ovr_glProgramUniform3f(program, location, x, y, z); } void -glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +glProgramUniform4f(GLuint program, GLint location, GLfloat x, GLfloat y, + GLfloat z, GLfloat w) { ovr_glProgramUniform4f(program, location, x, y, z, w); } @@ -1803,86 +1910,99 @@ glProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y) void -glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z) +glProgramUniform3ui(GLuint program, GLint location, GLuint x, GLuint y, + GLuint z) { ovr_glProgramUniform3ui(program, location, x, y, z); } void -glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w) +glProgramUniform4ui(GLuint program, GLint location, GLuint x, GLuint y, + GLuint z, GLuint w) { ovr_glProgramUniform4ui(program, location, x, y, z, w); } void -glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform1uiv(program, location, count, value); } void -glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform2uiv(program, location, count, value); } void -glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform3uiv(program, location, count, value); } void -glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value) +glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, + const GLuint *value) { ovr_glProgramUniform4uiv(program, location, count, value); } void -glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); } void -glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); } void -glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); } void -glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); } void -glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); } void -glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *value) { ovr_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); } void -glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) +glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum access, GLenum format) { ovr_glBindImageTexture (unit, texture, level, layered, layer, access, format); } @@ -1910,9 +2030,12 @@ glMemoryBarrierByRegion (GLbitfield barriers) void -glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) +glTexStorage2DMultisample (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height, + GLboolean fixedsamplelocations) { - ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, fixedsamplelocations); + ovr_glTexStorage2DMultisample (target, samples, internalformat, width, height, + fixedsamplelocations); } @@ -1931,35 +2054,40 @@ glSampleMaski (GLuint maskNumber, GLbitfield mask) void -glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) +glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, + GLint *params) { ovr_glGetTexLevelParameteriv (target, level, pname, params); } void -glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) +glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, + GLfloat *params) { ovr_glGetTexLevelParameterfv (target, level, pname, params); } void -glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) +glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, + GLsizei stride) { ovr_glBindVertexBuffer (bindingindex, buffer, offset, stride); } void -glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) +glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeoffset) { ovr_glVertexAttribFormat (attribindex, size, type, normalized, relativeoffset); } void -glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) +glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, + GLuint relativeoffset) { ovr_glVertexAttribIFormat (attribindex, size, type, relativeoffset); } -- 2.7.4 From 4294aa12487daaee60f18a33625fa9c56d1b6434 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 7 Mar 2016 15:22:51 +0900 Subject: [PATCH 15/16] Update CoreGL License Apache 2.0 SGI Free Software License B v2.0 MIT Zlib Change-Id: Ic4942c3b78377caf2a66b7fac048727be0ffcb62 --- LICENSE => COPYING | 0 COPYING.MIT | 18 ++++++++++++++++++ COPYING.SGIFreeSWLicB_2_0 | 13 +++++++++++++ COPYING.ZLIB | 19 +++++++++++++++++++ packaging/coregl.spec | 14 +++++++++++++- 5 files changed, 63 insertions(+), 1 deletion(-) rename LICENSE => COPYING (100%) create mode 100644 COPYING.MIT create mode 100644 COPYING.SGIFreeSWLicB_2_0 create mode 100644 COPYING.ZLIB diff --git a/LICENSE b/COPYING similarity index 100% rename from LICENSE rename to COPYING diff --git a/COPYING.MIT b/COPYING.MIT new file mode 100644 index 0000000..288f6e4 --- /dev/null +++ b/COPYING.MIT @@ -0,0 +1,18 @@ +Copyright (C) 2000 - 2016 Samsung Electronics co., Ltd. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/COPYING.SGIFreeSWLicB_2_0 b/COPYING.SGIFreeSWLicB_2_0 new file mode 100644 index 0000000..98c7a1b --- /dev/null +++ b/COPYING.SGIFreeSWLicB_2_0 @@ -0,0 +1,13 @@ +Copyright notice for SGI FREE SOFTWARE LICENSE B files: + +The following file is licensed under SGI FREE SOFTWARE LICENSE B, Version 2.0 + - src/headers/glx.h + +SGI FREE SOFTWARE LICENSE B +(Version 2.0, Sept. 18, 2008) +Copyright (C) [dates of first publication] Silicon Graphics, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice including the dates of first publication and either this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Except as contained in this notice, the name of Silicon Graphics, Inc. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Silicon Graphics, Inc diff --git a/COPYING.ZLIB b/COPYING.ZLIB new file mode 100644 index 0000000..ddea4e2 --- /dev/null +++ b/COPYING.ZLIB @@ -0,0 +1,19 @@ +Copyright (C) 2000 - 2016 Samsung Electronics co., Ltd. All Rights Reserved. + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use +of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. diff --git a/packaging/coregl.spec b/packaging/coregl.spec index 0604938..683d7de 100644 --- a/packaging/coregl.spec +++ b/packaging/coregl.spec @@ -5,7 +5,7 @@ Summary: CoreGL FastPath Optimization Version: 0.1.10 Release: 02 Group: Graphics -License: Apache 2.0 +License: Apache-2.0 and MIT and SGI-B-2.0 and Zlib URL: http://www.tizen.org Source: %{name}-%{version}.tar.gz @@ -45,6 +45,14 @@ make %{?jobs:-j%jobs} %endif %install + +# for license notification +mkdir -p %{buildroot}/usr/share/license +cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/usr/share/license/%{name} +cp -a %{_builddir}/%{buildsubdir}/COPYING.MIT %{buildroot}/usr/share/license/%{name}.MIT +cp -a %{_builddir}/%{buildsubdir}/COPYING.SGIFreeSWLicB_2_0 %{buildroot}/usr/share/license/%{name}.SGIFreeSWLicB_2_0 +cp -a %{_builddir}/%{buildsubdir}/COPYING.ZLIB %{buildroot}/usr/share/license/%{name}.ZLIB + # release pkg mkdir -p %{buildroot}%{_libdir}/pkgconfig @@ -91,6 +99,10 @@ rm -rf %{buildroot} %{_libdir}/libEGL.so* %{_libdir}/libGLESv1_CM.so* %{_libdir}/libGLESv2.so* +/usr/share/license/%{name} +/usr/share/license/%{name}.MIT +/usr/share/license/%{name}.SGIFreeSWLicB_2_0 +/usr/share/license/%{name}.ZLIB %files devel %defattr(-,root,root,-) -- 2.7.4 From e76483ef2b00e204a4e7240ab77c4441405ac69c Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Mon, 7 Mar 2016 21:48:46 +0900 Subject: [PATCH 16/16] Add Null check on Return value of a function 'dlsym' Change-Id: Ibd16dfa12003dbd6964c08cd1c06688cd0aa34aa --- src/modules/tracepath/coregl_tracepath.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/tracepath/coregl_tracepath.c b/src/modules/tracepath/coregl_tracepath.c index 1ef736e..7d9d7c4 100644 --- a/src/modules/tracepath/coregl_tracepath.c +++ b/src/modules/tracepath/coregl_tracepath.c @@ -1480,10 +1480,13 @@ finish: } if (png != NULL) { if (info != NULL) { - dl_png_destroy_write_struct(&png, &info); + if (dl_png_destroy_write_struct) + dl_png_destroy_write_struct(&png, &info); info = NULL; - } else - dl_png_destroy_write_struct(&png, NULL); + } else { + if (dl_png_destroy_write_struct) + dl_png_destroy_write_struct(&png, NULL); + } png = NULL; } } -- 2.7.4