The gl.getActiveAttrib method returns some GLSL building variables (e.g. gl_InstanceID, gl_VertexID) as attributes with location == -1, so they need to be filtered out.
Also, to make it easier to use istancing draw without any additional attributes, the setInstancedCount method will automatically set the isInstanced flag depending on the given count value.
The
gl.getActiveAttrib
method returns some GLSL building variables (e.g.gl_InstanceID
,gl_VertexID
) as attributes with location == -1, so they need to be filtered out. Also, to make it easier to use istancing draw without any additional attributes, thesetInstancedCount
method will automatically set theisInstanced
flag depending on the given count value.