I have the following shader taken from the android SDK sampele:
final String vertexShader =
"uniform mat4 uMVPMatrix;\n" +
"attribute vec4 aPosition;\n" +
"attribute vec2 aTextureCoord;\n" +
"varying vec2 vTextureCoord;\n" +
"void main() {\n" +
" gl_Position = uMVPMatrix * aPosition;\n" +
" vTextureCoord = aTextureCoord;\n" +
"}\n";
the shader is from their opengl es 2.0 example and works fine when I comile the example.
However when I try to compile the shader in my program I get:
03-07 17:36:21.109: ERROR/GLES20TEST(5992): Could not compile shader 35633:
There is also the fact that the method:
GLES20.glGetShaderInfoLog(shader)
returns no information ( which I belive is a known bug as far as I understood from my google research)
does anyone know what I'm doing wrong?
Thanks, Jason
Solved the problem.
The problam was that I was trying to create a shader outside of the OnSurfaceCreate causing threading problems
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With