Don't disable the vertex attribute if the location is invalid

This commit is contained in:
Richard Davey 2019-04-25 03:16:25 +01:00
parent e0c22c5534
commit 2727408e7c

View file

@ -342,7 +342,7 @@ var WebGLPipeline = new Class({
gl.enableVertexAttribArray(location);
gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset);
}
else
else if (location !== -1)
{
gl.disableVertexAttribArray(location);
}