Fix glShaderSource parameter constness
Change-Id: I1008d779a9d333dc8968812d22e387b804e3c570
This commit is contained in:
@@ -486,7 +486,7 @@ void GL2Encoder::s_glDrawElements(void *self, GLenum mode, GLsizei count, GLenum
|
||||
ctx->m_glBindBuffer_enc(self, GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
indices = (void*)((GLintptr)buf->m_fixedBuffer.ptr() + (GLintptr)indices);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (adjustIndices) {
|
||||
void *adjustedIndices = (void*)indices;
|
||||
int minIndex = 0, maxIndex = 0;
|
||||
@@ -633,7 +633,7 @@ static bool replaceSamplerExternalWith2D(char* const str, ShaderData* const data
|
||||
return true;
|
||||
}
|
||||
|
||||
void GL2Encoder::s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar **string, const GLint *length)
|
||||
void GL2Encoder::s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
|
||||
{
|
||||
GL2Encoder* ctx = (GL2Encoder*)self;
|
||||
ShaderData* shaderData = ctx->m_shared->getShaderData(shader);
|
||||
@@ -686,7 +686,7 @@ void GL2Encoder::s_glLinkProgram(void * self, GLuint program)
|
||||
GLchar *name = new GLchar[maxLength+1];
|
||||
GLint location;
|
||||
//for each active uniform, get its size and starting location.
|
||||
for (GLint i=0 ; i<numUniforms ; ++i)
|
||||
for (GLint i=0 ; i<numUniforms ; ++i)
|
||||
{
|
||||
ctx->glGetActiveUniform(self, program, i, maxLength, NULL, &size, &type, name);
|
||||
location = ctx->m_glGetUniformLocation_enc(self, program, name);
|
||||
@@ -784,7 +784,7 @@ int GL2Encoder::s_glGetUniformLocation(void *self, GLuint program, const GLchar
|
||||
if (!brace || sscanf(brace+1,"%d",&arrIndex) != 1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
glBindBuffer_client_proc_t m_glBindBuffer_enc;
|
||||
static void s_glBindBuffer(void *self, GLenum target, GLuint id);
|
||||
|
||||
|
||||
|
||||
glBufferData_client_proc_t m_glBufferData_enc;
|
||||
static void s_glBufferData(void *self, GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
|
||||
glBufferSubData_client_proc_t m_glBufferSubData_enc;
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
glGetVertexAttribPointerv_client_proc_t m_glGetVertexAttribPointerv;
|
||||
static void s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pname, GLvoid **pointer);
|
||||
|
||||
static void s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar **string, const GLint *length);
|
||||
static void s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length);
|
||||
|
||||
static void s_glFinish(void *self);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "gl2_types.h"
|
||||
#ifndef gl2_APIENTRY
|
||||
#define gl2_APIENTRY
|
||||
#define gl2_APIENTRY
|
||||
#endif
|
||||
typedef void (gl2_APIENTRY *glActiveTexture_client_proc_t) (void * ctx, GLenum);
|
||||
typedef void (gl2_APIENTRY *glAttachShader_client_proc_t) (void * ctx, GLuint, GLuint);
|
||||
@@ -107,7 +107,7 @@ typedef void (gl2_APIENTRY *glRenderbufferStorage_client_proc_t) (void * ctx, GL
|
||||
typedef void (gl2_APIENTRY *glSampleCoverage_client_proc_t) (void * ctx, GLclampf, GLboolean);
|
||||
typedef void (gl2_APIENTRY *glScissor_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei);
|
||||
typedef void (gl2_APIENTRY *glShaderBinary_client_proc_t) (void * ctx, GLsizei, const GLuint*, GLenum, const GLvoid*, GLsizei);
|
||||
typedef void (gl2_APIENTRY *glShaderSource_client_proc_t) (void * ctx, GLuint, GLsizei, const GLchar**, const GLint*);
|
||||
typedef void (gl2_APIENTRY *glShaderSource_client_proc_t) (void * ctx, GLuint, GLsizei, const GLchar* const*, const GLint*);
|
||||
typedef void (gl2_APIENTRY *glStencilFunc_client_proc_t) (void * ctx, GLenum, GLint, GLuint);
|
||||
typedef void (gl2_APIENTRY *glStencilFuncSeparate_client_proc_t) (void * ctx, GLenum, GLenum, GLint, GLuint);
|
||||
typedef void (gl2_APIENTRY *glStencilMask_client_proc_t) (void * ctx, GLuint);
|
||||
|
||||
@@ -120,7 +120,7 @@ extern "C" {
|
||||
void glSampleCoverage_enc(void *self , GLclampf value, GLboolean invert);
|
||||
void glScissor_enc(void *self , GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void glShaderBinary_enc(void *self , GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
|
||||
void glShaderSource_enc(void *self , GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
|
||||
void glShaderSource_enc(void *self , GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
|
||||
void glStencilFunc_enc(void *self , GLenum func, GLint ref, GLuint mask);
|
||||
void glStencilFuncSeparate_enc(void *self , GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
void glStencilMask_enc(void *self , GLuint mask);
|
||||
@@ -231,4 +231,4 @@ extern "C" {
|
||||
void glShaderString_enc(void *self , GLuint shader, const GLchar* string, GLsizei len);
|
||||
int glFinishRoundTrip_enc(void *self );
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user