fix
bug #750: workaround GL2 function params const-iness issues with pas2c
--- a/hedgewars/pas2cRedo.pas Sat Aug 03 17:10:19 2019 +0300
+++ b/hedgewars/pas2cRedo.pas Sun Aug 04 00:30:56 2019 +0200
@@ -117,3 +117,4 @@
GetCurrentDir : function : PChar;
+ glShaderSource : procedure;
--- a/hedgewars/pas2cSystem.pas Sat Aug 03 17:10:19 2019 +0300
+++ b/hedgewars/pas2cSystem.pas Sun Aug 04 00:30:56 2019 +0200
@@ -90,7 +90,7 @@
glBindRenderbufferEXT, glRenderbufferStorageEXT,
glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT,
glUniformMatrix4fv, glVertexAttribPointer, glCreateShader,
- glShaderSource, glCompileShader, glGetShaderiv, glGetShaderInfoLog,
+ {glShaderSource, }glCompileShader, glGetShaderiv, glGetShaderInfoLog,
glCreateProgram, glAttachShader, glBindAttribLocation, glLinkProgram,
glDeleteShader, glGetProgramiv, glGetProgramInfoLog, glUseProgram,
glUniform1i, glGetUniformLocation, glEnableVertexAttribArray,
--- a/project_files/hwc/rtl/misc.c Sat Aug 03 17:10:19 2019 +0300
+++ b/project_files/hwc/rtl/misc.c Sun Aug 04 00:30:56 2019 +0200
@@ -224,4 +224,8 @@
{
return GLEW_OK;
}
+#else
+void fpcrtl_glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length) {
+ glShaderSource(shader, count, (const char * const *)string, length);
+}
#endif