Bläddra i källkod

Restore old udpate mechanism for subdata

David Catuhe 6 år sedan
förälder
incheckning
bd5f25dc9c
1 ändrade filer med 1 tillägg och 5 borttagningar
  1. 1 5
      src/Engines/engine.ts

+ 1 - 5
src/Engines/engine.ts

@@ -2571,11 +2571,7 @@ export class Engine {
                 if (data instanceof ArrayBuffer) {
                     data = new Uint8Array(data, byteOffset, byteLength);
                 } else {
-                    let offset = data.byteOffset + byteOffset;
-
-                    if (offset || byteLength !== data.byteLength) {
-                        data = new Uint8Array(data.buffer, offset, byteLength);
-                    }
+                    data = new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);
                 }
 
                 this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, <ArrayBuffer>data);