diff --git a/src/core/renderers/webgl/managers/ShaderManager.js b/src/core/renderers/webgl/managers/ShaderManager.js index 1684b53..7e06a88 100644 --- a/src/core/renderers/webgl/managers/ShaderManager.js +++ b/src/core/renderers/webgl/managers/ShaderManager.js @@ -68,6 +68,18 @@ { this.initPlugins(); + var gl = this.renderer.gl; + + // get the maximum number of attribute correctly as this tends to vary + this.maxAttibs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); + + this.attribState = []; + + for (var i = 0; i < this.maxAttibs; i++) + { + this.attribState[i] = false; + } + // TODO - Why are these not plugins? We can't decouple primitives unless they are.... this.defaultShader = new TextureShader(this); this.primitiveShader = new PrimitiveShader(this);