Skip to content

Commit

Permalink
check for missing uniforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolalysenko committed Jul 1, 2016
1 parent 4267f67 commit e930715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core.js
Expand Up @@ -2312,15 +2312,15 @@ module.exports = function reglCore (
// perform type validation
check.optional(function () {
function check (pred) {
env.assert(scope, pred, 'invalid uniform ' + name)
env.assert(scope, pred, 'invalid or missing uniform "' + name + '"')
}

function checkType (type) {
check('typeof ' + VALUE + '==="' + type + '"')
}

function checkVector (n, type) {
check(VALUE + '.length===' + n)
check('Array.isArray(' + VALUE + ')&&' + VALUE + '.length===' + n)
}

function checkTexture (target) {
Expand Down

0 comments on commit e930715

Please sign in to comment.