Przeglądaj źródła

Support for OES_element_index_uint extension in order to support 32 bits indices and then meshes with more than 65536 vertices

David Catuhe 10 lat temu
rodzic
commit
79182e43e3

+ 0 - 13
Babylon/Loading/Plugins/babylon.babylonFileLoader.ts

@@ -333,11 +333,6 @@
         if (parsedLight.excludedMeshesIds) {
             light._excludedMeshesIds = parsedLight.excludedMeshesIds;
         }
-		
-		// Parent
-        if (parsedLight.parentId) {
-            light._waitingParentId = parsedLight.parentId;
-        }
 
         // Parent
         if (parsedLight.parentId) {
@@ -1222,14 +1217,6 @@
                     camera._waitingParentId = undefined;
                 }
             }
-			
-			for (index = 0; index < scene.lights.length; index++) {
-                var light = scene.lights[index];
-                if (light._waitingParentId) {
-                    light.parent = scene.getLastEntryByID(light._waitingParentId);
-                    light._waitingParentId = undefined;
-                }
-            }
 
             for (index = 0; index < scene.lights.length; index++) {
                 var light = scene.lights[index];

+ 3 - 3
Babylon/Mesh/babylon.geometry.js

@@ -45,17 +45,17 @@ var BABYLON;
             vertexData.applyToGeometry(this, updatable);
         };
 
-        Geometry.prototype.setVerticesData = function (kind, data, updatable) {
+        Geometry.prototype.setVerticesData = function (kind, data, updatable, stride) {
             this._vertexBuffers = this._vertexBuffers || {};
 
             if (this._vertexBuffers[kind]) {
                 this._vertexBuffers[kind].dispose();
             }
 
-            this._vertexBuffers[kind] = new BABYLON.VertexBuffer(this._engine, data, kind, updatable, this._meshes.length === 0);
+            this._vertexBuffers[kind] = new BABYLON.VertexBuffer(this._engine, data, kind, updatable, this._meshes.length === 0, stride);
 
             if (kind === BABYLON.VertexBuffer.PositionKind) {
-                var stride = this._vertexBuffers[kind].getStrideSize();
+                stride = this._vertexBuffers[kind].getStrideSize();
 
                 this._totalVertices = data.length / stride;
 

+ 3 - 3
Babylon/Mesh/babylon.geometry.ts

@@ -54,17 +54,17 @@
             vertexData.applyToGeometry(this, updatable);
         }
 
-        public setVerticesData(kind: string, data: number[], updatable?: boolean): void {
+        public setVerticesData(kind: string, data: number[], updatable?: boolean, stride?: number): void {
             this._vertexBuffers = this._vertexBuffers || {};
 
             if (this._vertexBuffers[kind]) {
                 this._vertexBuffers[kind].dispose();
             }
 
-            this._vertexBuffers[kind] = new VertexBuffer(this._engine, data, kind, updatable, this._meshes.length === 0);
+            this._vertexBuffers[kind] = new VertexBuffer(this._engine, data, kind, updatable, this._meshes.length === 0, stride);
 
             if (kind === BABYLON.VertexBuffer.PositionKind) {
-                var stride = this._vertexBuffers[kind].getStrideSize();
+                stride = this._vertexBuffers[kind].getStrideSize();
 
                 this._totalVertices = data.length / stride;
 

+ 2 - 2
Babylon/Mesh/babylon.mesh.js

@@ -274,7 +274,7 @@ var BABYLON;
             this.synchronizeInstances();
         };
 
-        Mesh.prototype.setVerticesData = function (kind, data, updatable) {
+        Mesh.prototype.setVerticesData = function (kind, data, updatable, stride) {
             if (kind instanceof Array) {
                 var temp = data;
                 data = kind;
@@ -291,7 +291,7 @@ var BABYLON;
 
                 new BABYLON.Geometry(BABYLON.Geometry.RandomId(), scene, vertexData, updatable, this);
             } else {
-                this._geometry.setVerticesData(kind, data, updatable);
+                this._geometry.setVerticesData(kind, data, updatable, stride);
             }
         };
 

+ 2 - 2
Babylon/Mesh/babylon.mesh.ts

@@ -269,7 +269,7 @@
             this.synchronizeInstances();
         }
 
-        public setVerticesData(kind: any, data: any, updatable?: boolean): void {
+        public setVerticesData(kind: any, data: any, updatable?: boolean, stride?: number): void {
             if (kind instanceof Array) {
                 var temp = data;
                 data = kind;
@@ -287,7 +287,7 @@
                 new BABYLON.Geometry(Geometry.RandomId(), scene, vertexData, updatable, this);
             }
             else {
-                this._geometry.setVerticesData(kind, data, updatable);
+                this._geometry.setVerticesData(kind, data, updatable, stride);
             }
         }
 

+ 6 - 1
Babylon/Mesh/babylon.vertexBuffer.js

@@ -1,7 +1,7 @@
 var BABYLON;
 (function (BABYLON) {
     var VertexBuffer = (function () {
-        function VertexBuffer(engine, data, kind, updatable, postponeInternalCreation) {
+        function VertexBuffer(engine, data, kind, updatable, postponeInternalCreation, stride) {
             if (engine instanceof BABYLON.Mesh) {
                 this._engine = engine.getScene().getEngine();
             } else {
@@ -18,6 +18,11 @@
 
             this._kind = kind;
 
+            if (stride) {
+                this._strideSize = stride;
+                return;
+            }
+
             switch (kind) {
                 case VertexBuffer.PositionKind:
                     this._strideSize = 3;

+ 7 - 1
Babylon/Mesh/babylon.vertexBuffer.ts

@@ -8,7 +8,7 @@
         private _kind: string;
         private _strideSize: number;
 
-        constructor(engine: any, data: number[], kind: string, updatable: boolean, postponeInternalCreation?: boolean) {
+        constructor(engine: any, data: number[], kind: string, updatable: boolean, postponeInternalCreation?: boolean, stride?: number) {
             if (engine instanceof Mesh) { // old versions of BABYLON.VertexBuffer accepted 'mesh' instead of 'engine'
                 this._engine = engine.getScene().getEngine();
             }
@@ -26,6 +26,12 @@
 
             this._kind = kind;
 
+            if (stride) {
+                this._strideSize = stride;
+                return;
+            }
+
+            // Deduce stride from kind
             switch (kind) {
                 case VertexBuffer.PositionKind:
                     this._strideSize = 3;

+ 28 - 3
Babylon/babylon.engine.js

@@ -378,6 +378,7 @@
             this._loadedTexturesCache = new Array();
             this._activeTexturesCache = new Array();
             this._compiledEffects = {};
+            this._uintIndicesCurrentlySet = false;
             this._renderingCanvas = canvas;
             this._canvasClientRect = this._renderingCanvas.getBoundingClientRect();
 
@@ -427,6 +428,7 @@
             this._caps.textureAnisotropicFilterExtension = this._gl.getExtension('EXT_texture_filter_anisotropic') || this._gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || this._gl.getExtension('MOZ_EXT_texture_filter_anisotropic');
             this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0;
             this._caps.instancedArrays = this._gl.getExtension('ANGLE_instanced_arrays');
+            this._caps.uintIndices = this._gl.getExtension('OES_element_index_uint') !== null;
 
             // Depth buffer
             this.setDepthBuffer(true);
@@ -730,6 +732,7 @@
         };
 
         Engine.prototype.restoreDefaultFramebuffer = function () {
+            this._currentRenderTarget = null;
             this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null);
 
             this.setViewport(this._cachedViewport);
@@ -785,9 +788,28 @@
         Engine.prototype.createIndexBuffer = function (indices) {
             var vbo = this._gl.createBuffer();
             this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, vbo);
-            this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), this._gl.STATIC_DRAW);
+
+            // Check for 32 bits indices
+            var arrayBuffer;
+            var need32Bits = false;
+
+            if (this._caps.uintIndices) {
+                for (var index = 0; index < indices.length; index++) {
+                    if (indices[index] > 65535) {
+                        need32Bits = true;
+                        break;
+                    }
+                }
+
+                arrayBuffer = need32Bits ? new Uint32Array(indices) : new Uint16Array(indices);
+            } else {
+                arrayBuffer = new Uint16Array(indices);
+            }
+
+            this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, arrayBuffer, this._gl.STATIC_DRAW);
             this._resetIndexBufferBinding();
             vbo.references = 1;
+            vbo.is32Bits = need32Bits;
             return vbo;
         };
 
@@ -812,6 +834,7 @@
             if (this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+                this._uintIndicesCurrentlySet = indexBuffer.is32Bits;
             }
         };
 
@@ -840,6 +863,7 @@
             if (indexBuffer != null && this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+                this._uintIndicesCurrentlySet = indexBuffer.is32Bits;
             }
         };
 
@@ -899,12 +923,13 @@
             this.applyStates();
 
             // Render
+            var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;
             if (instancesCount) {
-                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, this._gl.UNSIGNED_SHORT, indexStart * 2, instancesCount);
+                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2, instancesCount);
                 return;
             }
 
-            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, this._gl.UNSIGNED_SHORT, indexStart * 2);
+            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2);
         };
 
         Engine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {

+ 30 - 3
Babylon/babylon.engine.ts

@@ -341,6 +341,7 @@
         public textureAnisotropicFilterExtension;
         public maxAnisotropy: number;
         public instancedArrays;
+        public uintIndices: boolean;
     }
 
     export class Engine {
@@ -439,6 +440,7 @@
         private _cachedEffectForVertexBuffers: Effect;
         private _currentRenderTarget: WebGLTexture;
         private _canvasClientRect: ClientRect;
+        private _uintIndicesCurrentlySet = false;
 
         private _workingCanvas: HTMLCanvasElement;
         private _workingContext: CanvasRenderingContext2D;
@@ -495,6 +497,7 @@
             this._caps.textureAnisotropicFilterExtension = this._gl.getExtension('EXT_texture_filter_anisotropic') || this._gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || this._gl.getExtension('MOZ_EXT_texture_filter_anisotropic');
             this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0;
             this._caps.instancedArrays = this._gl.getExtension('ANGLE_instanced_arrays');
+            this._caps.uintIndices = this._gl.getExtension('OES_element_index_uint') !== null;
 
             // Depth buffer
             this.setDepthBuffer(true);
@@ -740,6 +743,7 @@
         }
 
         public restoreDefaultFramebuffer(): void {
+            this._currentRenderTarget = null;
             this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null);
 
             this.setViewport(this._cachedViewport);
@@ -794,9 +798,29 @@
         public createIndexBuffer(indices: number[]): WebGLBuffer {
             var vbo = this._gl.createBuffer();
             this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, vbo);
-            this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), this._gl.STATIC_DRAW);
+
+            // Check for 32 bits indices
+            var arrayBuffer;
+            var need32Bits = false;
+
+            if (this._caps.uintIndices) {
+                
+                for (var index = 0; index < indices.length; index++) {
+                    if (indices[index] > 65535) {
+                        need32Bits = true;
+                        break;
+                    }
+                }
+
+                arrayBuffer = need32Bits ? new Uint32Array(indices) : new Uint16Array(indices);
+            } else {
+                arrayBuffer = new Uint16Array(indices);
+            }
+
+            this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, arrayBuffer, this._gl.STATIC_DRAW);
             this._resetIndexBufferBinding();
             vbo.references = 1;
+            vbo.is32Bits = need32Bits;
             return vbo;
         }
 
@@ -821,6 +845,7 @@
             if (this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+                this._uintIndicesCurrentlySet = indexBuffer.is32Bits;
             }
         }
 
@@ -849,6 +874,7 @@
             if (indexBuffer!= null && this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+                this._uintIndicesCurrentlySet = indexBuffer.is32Bits;
             }
         }
 
@@ -909,12 +935,13 @@
             this.applyStates();
 
             // Render
+            var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;
             if (instancesCount) {
-                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, this._gl.UNSIGNED_SHORT, indexStart * 2, instancesCount);
+                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2, instancesCount);
                 return;
             }
 
-            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, this._gl.UNSIGNED_SHORT, indexStart * 2);
+            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2);
         }
 
         public drawPointClouds(verticesStart: number, verticesCount: number, instancesCount?: number): void {

+ 1 - 0
Babylon/babylon.mixins.ts

@@ -67,6 +67,7 @@ interface WebGLTexture {
 interface WebGLBuffer {
     references: number;
     capacity: number;
+    is32Bits: boolean;
 }
 
 interface MouseEvent {

+ 39 - 9
babylon.2.0-alpha.debug.js

@@ -3663,6 +3663,7 @@ var BABYLON;
             this._loadedTexturesCache = new Array();
             this._activeTexturesCache = new Array();
             this._compiledEffects = {};
+            this._uintIndicesCurrentlySet = false;
             this._renderingCanvas = canvas;
             this._canvasClientRect = this._renderingCanvas.getBoundingClientRect();
 
@@ -3712,6 +3713,7 @@ var BABYLON;
             this._caps.textureAnisotropicFilterExtension = this._gl.getExtension('EXT_texture_filter_anisotropic') || this._gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || this._gl.getExtension('MOZ_EXT_texture_filter_anisotropic');
             this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0;
             this._caps.instancedArrays = this._gl.getExtension('ANGLE_instanced_arrays');
+            this._caps.uintIndices = this._gl.getExtension('OES_element_index_uint') !== null;
 
            
             this.setDepthBuffer(true);
@@ -4015,6 +4017,7 @@ var BABYLON;
         };
 
         Engine.prototype.restoreDefaultFramebuffer = function () {
+            this._currentRenderTarget = null;
             this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null);
 
             this.setViewport(this._cachedViewport);
@@ -4070,9 +4073,28 @@ var BABYLON;
         Engine.prototype.createIndexBuffer = function (indices) {
             var vbo = this._gl.createBuffer();
             this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, vbo);
-            this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), this._gl.STATIC_DRAW);
+
+           
+            var arrayBuffer;
+            var need32Bits = false;
+
+            if (this._caps.uintIndices) {
+                for (var index = 0; index < indices.length; index++) {
+                    if (indices[index] > 65535) {
+                        need32Bits = true;
+                        break;
+                    }
+                }
+
+                arrayBuffer = need32Bits ? new Uint32Array(indices) : new Uint16Array(indices);
+            } else {
+                arrayBuffer = new Uint16Array(indices);
+            }
+
+            this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, arrayBuffer, this._gl.STATIC_DRAW);
             this._resetIndexBufferBinding();
             vbo.references = 1;
+            vbo.is32Bits = need32Bits;
             return vbo;
         };
 
@@ -4097,6 +4119,7 @@ var BABYLON;
             if (this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+                this._uintIndicesCurrentlySet = indexBuffer.is32Bits;
             }
         };
 
@@ -4125,6 +4148,7 @@ var BABYLON;
             if (indexBuffer != null && this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+                this._uintIndicesCurrentlySet = indexBuffer.is32Bits;
             }
         };
 
@@ -4184,12 +4208,13 @@ var BABYLON;
             this.applyStates();
 
            
+            var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;
             if (instancesCount) {
-                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, this._gl.UNSIGNED_SHORT, indexStart * 2, instancesCount);
+                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2, instancesCount);
                 return;
             }
 
-            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, this._gl.UNSIGNED_SHORT, indexStart * 2);
+            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2);
         };
 
         Engine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {
@@ -9608,7 +9633,7 @@ var BABYLON;
 var BABYLON;
 (function (BABYLON) {
     var VertexBuffer = (function () {
-        function VertexBuffer(engine, data, kind, updatable, postponeInternalCreation) {
+        function VertexBuffer(engine, data, kind, updatable, postponeInternalCreation, stride) {
             if (engine instanceof BABYLON.Mesh) {
                 this._engine = engine.getScene().getEngine();
             } else {
@@ -9625,6 +9650,11 @@ var BABYLON;
 
             this._kind = kind;
 
+            if (stride) {
+                this._strideSize = stride;
+                return;
+            }
+
             switch (kind) {
                 case VertexBuffer.PositionKind:
                     this._strideSize = 3;
@@ -10896,7 +10926,7 @@ var BABYLON;
             this.synchronizeInstances();
         };
 
-        Mesh.prototype.setVerticesData = function (kind, data, updatable) {
+        Mesh.prototype.setVerticesData = function (kind, data, updatable, stride) {
             if (kind instanceof Array) {
                 var temp = data;
                 data = kind;
@@ -10913,7 +10943,7 @@ var BABYLON;
 
                 new BABYLON.Geometry(BABYLON.Geometry.RandomId(), scene, vertexData, updatable, this);
             } else {
-                this._geometry.setVerticesData(kind, data, updatable);
+                this._geometry.setVerticesData(kind, data, updatable, stride);
             }
         };
 
@@ -25987,17 +26017,17 @@ var BABYLON;
             vertexData.applyToGeometry(this, updatable);
         };
 
-        Geometry.prototype.setVerticesData = function (kind, data, updatable) {
+        Geometry.prototype.setVerticesData = function (kind, data, updatable, stride) {
             this._vertexBuffers = this._vertexBuffers || {};
 
             if (this._vertexBuffers[kind]) {
                 this._vertexBuffers[kind].dispose();
             }
 
-            this._vertexBuffers[kind] = new BABYLON.VertexBuffer(this._engine, data, kind, updatable, this._meshes.length === 0);
+            this._vertexBuffers[kind] = new BABYLON.VertexBuffer(this._engine, data, kind, updatable, this._meshes.length === 0, stride);
 
             if (kind === BABYLON.VertexBuffer.PositionKind) {
-                var stride = this._vertexBuffers[kind].getStrideSize();
+                stride = this._vertexBuffers[kind].getStrideSize();
 
                 this._totalVertices = data.length / stride;
 

Plik diff jest za duży
+ 6 - 6
babylon.2.0-alpha.js


+ 6 - 3
babylon.2.0.d.ts

@@ -41,6 +41,7 @@ declare module BABYLON {
         public textureAnisotropicFilterExtension: any;
         public maxAnisotropy: number;
         public instancedArrays: any;
+        public uintIndices: boolean;
     }
     class Engine {
         private static _ALPHA_DISABLE;
@@ -97,6 +98,7 @@ declare module BABYLON {
         private _cachedEffectForVertexBuffers;
         private _currentRenderTarget;
         private _canvasClientRect;
+        private _uintIndicesCurrentlySet;
         private _workingCanvas;
         private _workingContext;
         constructor(canvas: HTMLCanvasElement, antialias?: boolean, options?: any);
@@ -255,6 +257,7 @@ interface WebGLTexture {
 interface WebGLBuffer {
     references: number;
     capacity: number;
+    is32Bits: boolean;
 }
 interface MouseEvent {
     movementX: number;
@@ -2567,7 +2570,7 @@ declare module BABYLON {
         public getEngine(): Engine;
         public isReady(): boolean;
         public setAllVerticesData(vertexData: VertexData, updatable?: boolean): void;
-        public setVerticesData(kind: string, data: number[], updatable?: boolean): void;
+        public setVerticesData(kind: string, data: number[], updatable?: boolean, stride?: number): void;
         public updateVerticesDataDirectly(kind: string, data: Float32Array): void;
         public updateVerticesData(kind: string, data: number[], updateExtends?: boolean): void;
         public getTotalVertices(): number;
@@ -2782,7 +2785,7 @@ declare module BABYLON {
         public refreshBoundingInfo(): void;
         public _createGlobalSubMesh(): SubMesh;
         public subdivide(count: number): void;
-        public setVerticesData(kind: any, data: any, updatable?: boolean): void;
+        public setVerticesData(kind: any, data: any, updatable?: boolean, stride?: number): void;
         public updateVerticesData(kind: string, data: number[], updateExtends?: boolean, makeItUnique?: boolean): void;
         public updateVerticesDataDirectly(kind: string, data: Float32Array, makeItUnique?: boolean): void;
         public makeGeometryUnique(): void;
@@ -2937,7 +2940,7 @@ declare module BABYLON {
         private _updatable;
         private _kind;
         private _strideSize;
-        constructor(engine: any, data: number[], kind: string, updatable: boolean, postponeInternalCreation?: boolean);
+        constructor(engine: any, data: number[], kind: string, updatable: boolean, postponeInternalCreation?: boolean, stride?: number);
         public isUpdatable(): boolean;
         public getData(): number[];
         public getBuffer(): WebGLBuffer;