Hi,

I have a shader that compiles and also attaches to the shader program, but it does not link.

gl.attachShader(shaderProgram, fragmentShader);

console.log("shaders attached: " + gl.getProgramParameter(shaderProgram, gl.ATTACHED_SHADERS));

gl.validateProgram(shaderProgram);

gl.linkProgram(shaderProgram);
console.log("Program Link status: " + gl.getProgramParameter(shaderProgram, gl.LINK_STATUS));

if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {
console.log("Could not initialize shaders");
console.log(gl.getProgramInfoLog(shaderProgram));
}

I get a value 1 for gl.ATTACHED_SHADERS, but validate, link, or use fail. The only log I get is "Program has not been successfully linked"; not particularly useful.

Has anyone seen this before, and can give me pointers. Is there a better way to debug and get some more useful information to see what's really going on.

Thanks.