diff --git a/index.d.ts b/index.d.ts index 6d1c84e..6873b27 100644 --- a/index.d.ts +++ b/index.d.ts @@ -89,7 +89,7 @@ declare module '2gl' { export class BufferChannel { constructor(buffer: Buffer, options: Partial); - public bind(gl: WebGLRenderingContext, location?: number): this; + public bind(gl: WebGLRenderingContext, location?: number, options?: BufferBindOptions, instancesExt?: ANGLE_instanced_arrays): this; } export interface TextureOptions { diff --git a/package-lock.json b/package-lock.json index 223b67d..1abb366 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "2gl", - "version": "0.13.2", + "version": "0.13.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "2gl", - "version": "0.13.2", + "version": "0.13.3", "license": "SEE LICENSE IN FILE", "dependencies": { "@2gis/gl-matrix": "^2.4.1" diff --git a/package.json b/package.json index b10d025..93bd180 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "2gl", - "version": "0.13.2", + "version": "0.13.3", "description": "WebGL library for 2GIS projects", "repository": { "type": "git", diff --git a/src/BufferChannel.js b/src/BufferChannel.js index a4f1ee2..d25f5f3 100644 --- a/src/BufferChannel.js +++ b/src/BufferChannel.js @@ -30,8 +30,8 @@ class BufferChannel { * Связывает данные с контекстом WebGL с нужными параметрами. * Вызывает {@link Buffer#bind} исходного буфера. */ - bind(gl, location, instancesExt) { - this._buffer.bind(gl, location, this.options, instancesExt); + bind(gl, location, options, instancesExt) { + this._buffer.bind(gl, location, options || this.options, instancesExt); } } diff --git a/src/Vao.js b/src/Vao.js index 05df023..a0b6e97 100644 --- a/src/Vao.js +++ b/src/Vao.js @@ -98,7 +98,7 @@ class Vao { if (shaderAttribute.index !== true) { gl.enableVertexAttribArray(shaderAttribute.location); } - attributes[name].bind(gl, shaderAttribute.location, instancesExt); + attributes[name].bind(gl, shaderAttribute.location, null, instancesExt); } if (this.indicesBuffer) { this.indicesBuffer.bind(gl);