Skip to content

Commit

Permalink
Report when link fails
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcozzi committed Oct 15, 2014
1 parent 7ed2927 commit 80fbb49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Renderer/ShaderProgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,10 @@ define([
log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
console.error('[GL] Shader program link log: ' + log);
if (defined(debugShaders)) {
console.error('[GL] Translated vertex shader source:\n' + debugShaders.getTranslatedShaderSource(vertexShader));
console.error('[GL] Translated fragment shader source:\n' + debugShaders.getTranslatedShaderSource(fragmentShader));
}
throw new RuntimeError('Program failed to link. Link log: ' + log);
}

Expand Down

0 comments on commit 80fbb49

Please sign in to comment.