From 7c95911157999d30fbadf8f964155396d17c49da Mon Sep 17 00:00:00 2001 From: Alistair Strachan Date: Mon, 21 Jan 2013 11:24:32 -0800 Subject: [PATCH] Import constness fix from gl3.h into gl2.h. This change has been made in Khronos SVN for GLES2 already, however it is mildly controversial and discussion is on-going. This change is necessary for Android because otherwise applications cannot include both GLES2/gl2.h and GLES3/gl3.h as the glShaderSource() prototype mismatches. Native programs may include framework headers (which now include GLES3 headers only) but already have included GLES2 headers, creating an incompatibility. Change-Id: I70a4075e079ee063e76cef5a227abb0ae70aebb4 --- opengl/include/GLES2/gl2.h | 2 +- opengl/libs/GLES2/gl2_api.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opengl/include/GLES2/gl2.h b/opengl/include/GLES2/gl2.h index c139c2517..d16f895f7 100644 --- a/opengl/include/GLES2/gl2.h +++ b/opengl/include/GLES2/gl2.h @@ -569,7 +569,7 @@ GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* 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 glStencilMask (GLuint mask); diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in index cccf46c1b..89c8b8d67 100644 --- a/opengl/libs/GLES2/gl2_api.in +++ b/opengl/libs/GLES2/gl2_api.in @@ -292,7 +292,7 @@ void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) { void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) { CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length); } -void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) { +void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) { CALL_GL_API(glShaderSource, shader, count, string, length); } void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {