PDA

View Full Version : Shader compilation on Raspberry Pi - very strange problem ;?



SHristov
04-01-2015, 07:18 AM
For couple of days I'm trying to get openGL ES working on Raspberry pi. So far I was able to set a clear color on the screen. So it's working (or at least I'm thinking that it's working).

The problem that when I try to compile a shader (vertex or fragment) the glGetShaderiv(Shader, GL_COMPILE_STATUS, &isCompiled); always returning isCompiled = GL_TRUE, even when I'm putting some garbage like that for source of the shader ;?



const GLchar vertexShaderSource[] =
"attribute vec2 coord2d;\n"
"void masssin(void) {\n"
" gl_Posdfsdfsdfsition = vec4(coord2d, 0.0, 1.0);\n"
"}\n";

Any idea about that problem ?

p.p.
It looks like there is bug into the OpenGL driver for the raspberry. If you check for error after the compilation of the shader there is no error but there is no log too. If you link the program and check the state of the link, you can get correct information about it and log, with information about the error.