Skip to content

Commit

Permalink
Changed 'missing uniform/attribute' severity from error to warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreh committed Apr 24, 2011
1 parent 5acbea0 commit 6359764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/GraphicsEngine.js
Expand Up @@ -93,7 +93,7 @@ var GraphicsEngine = function(engine, canvas) {
shaderData.uniforms.forEach(function(uniform){
uniforms[uniform] = gl.getUniformLocation(program, uniform);
if (!uniforms[uniform]) {
throw new Error("Nonexistent or unused uniform in the description of shader " + shaderName + ": " + uniform);
console.warn("Nonexistent or unused uniform in the description of shader " + shaderName + ": " + uniform);
}
});

Expand All @@ -103,7 +103,7 @@ var GraphicsEngine = function(engine, canvas) {
shaderData.attributes.forEach(function(attribute){
attributes[attribute] = gl.getAttribLocation(program, attribute);
if (attributes[attribute] == -1) {
throw new Error("Nonexistent or unused attribute in the description of shader " + shaderName + ": " + attribute);
console.warn("Nonexistent or unused attribute in the description of shader " + shaderName + ": " + attribute);
}
});

Expand Down

0 comments on commit 6359764

Please sign in to comment.