vertexAttribDivisor method

void vertexAttribDivisor(
  1. GLuint index,
  2. GLuint divisor
)

The WebGL2RenderingContext.vertexAttribDivisor() method of the WebGL 2 API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with WebGL2RenderingContext.drawArraysInstanced and WebGL2RenderingContext.drawElementsInstanced.

Note: When using WebGLRenderingContext, the ANGLE_instanced_arrays extension can provide this method, too.

Implementation

external void vertexAttribDivisor(
  GLuint index,
  GLuint divisor,
);