View Full Version : glGetShaderSource() - didn't get my source code back.

03-29-2012, 04:23 AM
Hi, i'm new here on this board so i wanna say hello at first.

I have some trouble with my shader. I like to compile the shader source and i get some weird things. First when i call the following method GetShaderiv....

GLint state=0;

glGetShaderiv(*shader, GL_COMPILE_STATUS, &state);

glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength);

.. i got a zero in my state. But i didn't get some error messages from the compiler with the GL_INFO_LOG_LENGTH. I have a little trial project with the same code and there i get a '1' in the state.

So i tried to read my shader source back from my shader and i get a really big string back. But not my shader code just some informations about my project with the project name, and with my name, and a lot of zeros and some other things.

glGetShaderSource(vertexShader, size, &sizei, code);

Can you help me please with this? I searched on google but i didn't find something and i didn't find something in this message board too.

Thanks a lot

Maybe some further information i use OpenGL ES 2.0 on my iPad 2.

03-29-2012, 06:23 AM
I didn't get something from the shader. The string is the same like before. So I didn't get some wrong source but i didn't get any source code back. Maybe it's important for my question.

04-01-2012, 01:27 AM
I've solved the problem.