Trying to initialize some shaders in JOGL .

Any ideas why the error is empty? I check the size of it, and it looks larger than 0 since "Unknown" is not printed.

vertexShaderProgram = gl.glCreateShader(GL2.GL_VERTEX_SHADER); fragmentShaderProgram = gl.glCreateShader(GL2.GL_FRAGMENT_SHADER); gl.glShaderSource(vertexShaderProgram, 1, vsrc, null, 0); gl.glCompileShader(vertexShaderProgram); gl.glShaderSource(fragmentShaderProgram, 1, fsrc, null, 0); gl.glCompileShader(fragmentShaderProgram); shaderprogram = gl.glCreateProgram(); gl.glAttachShader(shaderprogram, vertexShaderProgram); gl.glAttachShader(shaderprogram, fragmentShaderProgram); gl.glLinkProgram(shaderprogram); gl.glValidateProgram(shaderprogram); IntBuffer intBuffer = IntBuffer.allocate(1); gl.glGetProgramiv(shaderprogram, GL2.GL_LINK_STATUS, intBuffer); System.out.println("got link status"); if (intBuffer.get(0) != 1) { gl.glGetProgramiv(shaderprogram, GL2.GL_INFO_LOG_LENGTH, intBuffer); int size = intBuffer.get(0); System.err.println("Program link error: "); if (size > 0) { ByteBuffer byteBuffer = ByteBuffer.allocate(size); gl.glGetProgramInfoLog(shaderprogram, size, intBuffer, byteBuffer); for (byte b: byteBuffer.array()) { System.err.print((char) b); } } else { System.out.println("Unknown"); } System.exit(1); }

I get an error on console, but contains no data ..

got link status Program link error:

This is my fragment shader ..

< FILE :: fragmentShader.txt > uniform sampler2D fish_y_offset; uniform float alphavalue; void main() { gl_FragColor = texture2D(fish_y_offset, gl_TexCoord[0].st); gl_FragColor.a=alphavalue; }

and this is my vertex shader ..