diff --git a/packages/dev/core/src/Engines/thinEngine.ts b/packages/dev/core/src/Engines/thinEngine.ts index d75c5f7a554..9713dc62a9a 100644 --- a/packages/dev/core/src/Engines/thinEngine.ts +++ b/packages/dev/core/src/Engines/thinEngine.ts @@ -2239,7 +2239,11 @@ export class ThinEngine { if (changed || this._vaoRecordInProgress) { this.bindArrayBuffer(buffer); - this._gl.vertexAttribPointer(indx, size, type, normalized, stride, offset); + if (type === this._gl.UNSIGNED_INT || type === this._gl.INT) { + this._gl.vertexAttribIPointer(indx, size, type, stride, offset); + } else { + this._gl.vertexAttribPointer(indx, size, type, normalized, stride, offset); + } } } diff --git a/packages/dev/core/src/LibDeclarations/webgl2.d.ts b/packages/dev/core/src/LibDeclarations/webgl2.d.ts index b32f5d7d927..340d6b2635a 100644 --- a/packages/dev/core/src/LibDeclarations/webgl2.d.ts +++ b/packages/dev/core/src/LibDeclarations/webgl2.d.ts @@ -127,6 +127,8 @@ interface WebGLRenderingContext { clearBufferiv(buffer: number, drawbuffer: number, values: ArrayBufferView, srcOffset: number | null): void; clearBufferuiv(buffer: number, drawbuffer: number, values: ArrayBufferView, srcOffset: number | null): void; clearBufferfi(buffer: number, drawbuffer: number, depth: number, stencil: number): void; + + vertexAttribIPointer(index: number, size: number, type: number, stride: number, offset: number): void; } interface ImageBitmap {