0
某些客户端未能初始化webGL程序。我赶上了错误与WebGL错误:并非所有控制路径都返回值
gl.linkProgram(program);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
throw new Error("Unable to initialize the shader program: " + gl.getProgramInfoLog(program));
}
我得到的日志是
Unable to initialize the shader program:
C:\fakepath(72,30-133): error X3507: '_directionToColor':
Not all control paths return a value
我已经无法重现我的电脑上此错误。有没有人有什么错误的想法?我很高兴,如果这有助于分享更多的代码:)
好吧,它看起来像着色器“_directionToColor”是责怪。 72行,如果我没有记错的话。你能分享该着色器的源代码吗? –
我会把代码以易理解的方式分享,但我并没有在任何地方编写'_directionToColor',我不知道'_directionToColor'与谷歌都没有关系。 – Guig
搜索所有文件的“_directionToColor” 。我认为这是你的着色器代码中的某个方法。 –