|
@@ -970,11 +970,12 @@ var BABYLON;
|
|
|
this._drawCalls++;
|
|
|
// Render
|
|
|
var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;
|
|
|
+ var mult = this._uintIndicesCurrentlySet ? 4 : 2;
|
|
|
if (instancesCount) {
|
|
|
- this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2, instancesCount);
|
|
|
+ this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * mult, instancesCount);
|
|
|
return;
|
|
|
}
|
|
|
- this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2);
|
|
|
+ this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * mult);
|
|
|
};
|
|
|
Engine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {
|
|
|
// Apply states
|