Note: This feature is available in Web Workers.
The WebGL2RenderingContext.bindBufferRange() method of the WebGL 2 API binds a range of a given WebGLBuffer to a given binding point (target) at a given index.
bindBufferRange(target, index, buffer, offset, size)targetA GLenum specifying the target for the bind operation. Possible values:
gl.TRANSFORM_FEEDBACK_BUFFERgl.UNIFORM_BUFFERindexA GLuint specifying the index of the target.
bufferA WebGLBuffer which to bind to the binding point (target).
offsetA GLintptr specifying the starting offset.
sizeA GLsizeiptr specifying the amount of data that can be read from the buffer.
None (undefined).
gl.bindBufferRange(gl.TRANSFORM_FEEDBACK_BUFFER, 1, buffer, 0, 4);