* Set up instanced attribute
(attrib, size, stride, offset, divisor)
| 327 | * Set up instanced attribute |
| 328 | */ |
| 329 | function setupInstancedAttribute(attrib, size, stride, offset, divisor) { |
| 330 | if (attrib < 0) return |
| 331 | gl.enableVertexAttribArray(attrib) |
| 332 | gl.vertexAttribPointer(attrib, size, gl.FLOAT, false, stride, offset) |
| 333 | |
| 334 | if (webgl2) { |
| 335 | gl.vertexAttribDivisor(attrib, divisor) |
| 336 | } else if (instExt) { |
| 337 | instExt.vertexAttribDivisorANGLE(attrib, divisor) |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Draw instanced |
no outgoing calls
no test coverage detected
searching dependent graphs…