Closed RStainforth closed 11 years ago
http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderSource.xml
void glGetShaderSource( GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source);
it also works ok for me (go 1.1 beta2), what's your os?
I am running Scientific Linux 6. With the following:
glew-1.5.5-1.el6.x86_64 glew-devel-1.5.5-1.el6.x86_64
freeglut-2.6.0-1.el6.x86_64 freeglut-devel-2.6.0-1.el6.x86_64
Pinging the thread since @RStainforth edited his response - Just so you know, if you edit the post it doesn't notify people watching the thread.
Just to add which mesa version I have also:
mesa-libGL-devel-9.0-0.7.el6.x86_64 mesa-libGL-devel-9.0-0.7.el6.i686
Sorry for the late response, glGetShaderSource is defined in glew.h and your glew version is pretty old, try using 1.9.0
in glew 1.5.5 ypedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
and glew 1.9.0 typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLuint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
its possible to write a proxy c function and let the c compiler handle the conversion to gluint/glint but I think because the readme specifies that the version of glew should be at least 1.5.8, this is working as intended.
Hmm. That's unfortunate because this seems to be the most recent version of glew shipped with @RStainforth's operating system, and if you change this one thing, it builds. I'm somewhat tempted to put such a wrapper in.
@banthar, were there other reasons that 1.5.5<=v<1.5.8 are not supported?
In GLEW < 1.5.4 some definitions we use are missing. E.g.: glIsTransformFeedback
. I don't know of any other issues.
This is affecting me, Arch Linux 32 bit. Glew 1.9.0, mesa 9.1.3.
> grep "PFNGLGETSHADERSOURCEPROC" /usr/include/GL/glew.h
typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
> pacman -Qo /usr/include/GL/glew.h
/usr/include/GL/glew.h is owned by glew 1.9.0-2
This is running on an ancient laptop, so that might be related. On another machine (same configuration except 64bit and with more modern graphics) I have no problems.
@bluepeppers, can you confirm that #106 fixes your problem? If so, I'll merge it.
I don't have any code to hand that uses the function, so I can't test that, but it fixes the build for me.
Thanks, that was what I wanted to know. I've merged #106.
Hmm, it seems I may have been building the wrong branch (Could have sworn I checked-out your issue-104 branch), and there seem to be a couple of bugs in the patch. Applying this diff changes resolves all issues for me. Sorry for the inconvenience.
@bluepeppers Thanks for reporting it quickly. Can you please submit a pull request?
Thanks @bluepeppers!
When I run the following, it doesn't compile, unless I apply the patch below: