title: WebGL 2.0 Integer attribute throws type error if VertexAttribArray is disabled
body: <p>I just spent some hours to isolate a behavior of WebGL which i don't understand.</p>
  
  <p>Let's assume a vertex shader with integer attribute:</p>
  
  <pre><code>precision highp int;
  in vec4 vtx_pos;
  in vec3 vtx_nrm;
  in ivec4 vtx_int; // &lt;- integer attribute
  
  void main() {
     // blah blah...
  }
  </code></pre>
  
  <p>With the following shader attributes binding:</p>
  
  <pre><code>var p = gl.createProgram();
  
  gl.bindAttribLocation(p, 0, "vtx_pos");
  gl.bindAttribLocation(p, 1, "vtx_nrm");
  gl.bindAttribLocation(p, 2, "vtx_int"); // &lt;- ivec4 on array #2
  </code></pre>
  
  <p>And finally the following AttribPointer configuration:</p>
  
  <pre><code>gl.vertexAttribPointer(0, 4, gl.FLOAT, false, 28, 0);
  gl.enableVertexAttribArray(0);
  gl.vertexAttribPointer(1, 3, gl.FLOAT, false, 28, 16);
  gl.enableVertexAttribArray(1);
  gl.disableVertexAttribArray(2); // &lt;- here is the devil
  </code></pre>
  
  <p>With this configuration (VertexAttribArray(2) disabled), browsers throws type error for the attribute 2:</p>
  
  <p>Chrome: <code>GL_INVALID_OPERATION : glDrawElements: vertexAttrib function must match shader attrib type</code></p>
  
  <p>Firefox: <code>drawElements: Vertex attrib 2 requires data of type INT, but is being supplied with type FLOAT.</code></p>
  
  <p>What I understood is that when the VertexAttribArray is not explicitly enabled with the proper vertexAttrib<strong>I</strong>Pointer, WebGL consideres it be "supplied as FLOAT" by default, and so, throws a type error. </p>
  
  <p>What I don't understand is: Why it checks the supplied type of an <strong>disabled</strong> VertexAttribArray where, logicaly, <strong>nothing</strong> is supplied ?</p>
  
  <p>Except by enabling the VertexAttribArray as dummy, is there some magic to avoid this error ? </p>