mrdoob/glsl-sandbox

Parse errors at link time as well?

greggman opened this issue · 0 comments

I don't think this matters but I just thought I'd point out that according to the OpenGL ES 2.0 spec a driver is allowed to always succeed at glCompileShader time as long as those errors are caught at glLinkProgram time. In other words you could do

gl.shaderSource(someShader, "bla bla bla");
gl.compileShader(someShader);
var success = gl.getShaderParameter(someShader, gl.COMPILE_STATUS);

And according to the spec it's valid for success to be true as long as later when you call gl.linkProgram and check that gl.getProgramParameter(someProgram, gl.LINK_STATUS) returns false.

I don't know of any drivers that do this, possibly some mobile drivers so it's probably not important but I just thought I'd point it out.