amonakov/primus — pull request #24 by karolherbst (2012-11-09 00:40:52+00:00)
Title: fix glShaderSource gl passthru

the 3rd argument must not be 'const GLchar* *string', because this is compiled as 'const GLchar* const*' internally (I don't know though).
Using 'const GLchar **string' instead will fix this.

fixes #21 fully

See this compile error output for more information:

mkdir -p lib
g++ -Wall -g -DBUMBLEBEE_SOCKET='/var/run/bumblebee.socket' -DPRIMUS_SYNC='0' -DPRIMUS_VERBOSE='1' -DPRIMUS_DISPLAY=':8' -DPRIMUS_LOAD_GLOBAL='libglapi.so.0' -DPRIMUS_libGLa='/usr//nvidia-bumblebee/libGL.so.1' -DPRIMUS_libGLd='/usr//libGL.so.1' -fvisibility=hidden -fPIC -shared -Wl,-Bsymbolic -o lib/libGL.so.1 libglfork.cpp -lX11 -lpthread -lrt
libglfork.cpp:848:2: warning: #warning Enabled workarounds for applications demanding more than promised by the OpenGL ABI [-Wcpp]
In file included from libglfork.cpp:786:0:
gl-passthru.def: In function ‘void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)’:
gl-passthru.def:507:1: error: declaration of C function ‘void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)’ conflicts with
In file included from /usr/include/GL/gl.h:2085:0,
from /usr/include/GL/glx.h:45,
from libglfork.cpp:16:
/usr/include/GL/glext.h:6605:21: error: previous declaration ‘void glShaderSource(GLuint, GLsizei, const GLchar* const*, const GLint*)’ here
make: *** [lib/libGL.so.1] Error 1