Skip to content Skip to sidebar Skip to footer

Can't Link Compiled Shaders To Program Opengl Es 2.0 Android

I have a problem with linking shaders to program in OpenGL ES 2.0. Here's my code package pl.projekcik; import android.content.Context; import java.io.IOException; import java.n

Solution 1:

Your problem is here:

GLES20.glShaderSource(fragmentShader, fragmentShaderSource);
GLES20.glCompileShader(vertexShader); 
GLES20.glGetShaderiv(vertexShader, GL_COMPILE_STATUS, compileStatus, 0);

You're compiling the vertexShader instead of the fragmentShader, so the vertexShader is getting compiled twice, and the fragmentShader isn't getting compiled at all.

Post a Comment for "Can't Link Compiled Shaders To Program Opengl Es 2.0 Android"