MCPcopy
hub / github.com/shuding/cobe / setupInstancedAttribute

Function setupInstancedAttribute

src/index.js:329–339  ·  view source on GitHub ↗

* Set up instanced attribute

(attrib, size, stride, offset, divisor)

Source from the content-addressed store, hash-verified

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

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…