fix Bug 750: workaround GL2 function params const-iness issues with pas2c
authorsheepluva
Sun, 04 Aug 2019 00:30:56 +0200
changeset 15297 70d416a8f63f
parent 15296 07ab4206f2a9
child 15298 042a5e8d9c59
fix bug #750: workaround GL2 function params const-iness issues with pas2c
hedgewars/pas2cRedo.pas
hedgewars/pas2cSystem.pas
project_files/hwc/rtl/misc.c
--- 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