I feel really stupid, but i don´t know why this does not work. I could not find any tutorial showing how to use this function properly, since this is such a trivial thing.
The function glShaderSourceARB simply crashes. I don´t know why, i have tried everything.
Note that all obects (FragmentShaderObject, etc.) are created, i just didn´t post the code for it.
It´s the first time i try to get glSlang running, the piece of shader-code is just a copy out of a tutorial, it should not have any effect.
Since a crashing OpenGL function is usually a violation of the spec, unless you pass an invalid pointer, you should send a bug report to the people who made your GL implementation.
If you pass NULL as the last parameter of glShaderSourceARB, it will calculate the length itself, which means you must null terminate the string you pass in.
I feel really stupid, but i don´t know why this does not work. I could not find any tutorial showing how to use this function properly, since this is such a trivial thing.
Another thing, putting \0\0\0 at the end of your string is not very useful, as strcpy is only going to copy until the first null char (and anyways C already null terminates all literal strings).
Originally posted by evanGLizr: Another thing, putting \0\0\0 at the end of your string is not very useful, as strcpy is only going to copy until the first null char (and anyways C already null terminates all literal strings).
Yeah, i know that. The “\0\0\0” was just a result of my desperate attempt to make it work
Anyway thanks to all of you for your answers, i will try it immediatly.