The ANGLE_instanced_arrays.vertexAttribDivisorANGLE() method of the WebGL API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawArraysInstancedANGLE() and ext.drawElementsInstancedANGLE().
Note: When using WebGL2, this method is available as gl.vertexAttribDivisor() by default.
void ext.vertexAttribDivisorANGLE(index, divisor);
indexGLuint specifying the index of the generic vertex attributes.divisorGLuint specifying the number of instances that will pass between updates of the generic attribute.None.
var ext = gl.getExtension('ANGLE_instanced_arrays');
ext.vertexAttribDivisorANGLE(0, 2);
| Specification | Status | Comment |
|---|---|---|
| ANGLE_instanced_arrays The definition of 'ANGLE_instanced_arrays' in that specification. | Recommendation | Initial definition. |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | ? | 12 | 33 | 11 | ? | ? |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | ? | ? | ? | ? | ? | ? | ? |
ext.drawArraysInstancedANGLE()ext.drawElementsInstancedANGLE()WebGLRenderingContext.drawArrays()WebGLRenderingContext.drawElements()WebGL2RenderingContext.drawArraysInstanced()WebGL2RenderingContext.drawElementsInstanced()WebGL2RenderingContext.vertexAttribDivisor()
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE