提交 8eb87c7b 编写于 作者: D dubejf

AddDrawcall: Simplify calls with explicit indexOffset of zero

上级 81533ee5
...@@ -699,7 +699,7 @@ ...@@ -699,7 +699,7 @@
attrib = new THREE.BufferAttribute( buffer, 1 ); attrib = new THREE.BufferAttribute( buffer, 1 );
geom.addAttribute( 'index', attrib ); geom.addAttribute( 'index', attrib );
geom.addDrawCall( 0, str_len / 2, 0 ); geom.addDrawCall( 0, str_len / 2 );
idx = 0; idx = 0;
......
...@@ -99,7 +99,7 @@ THREE.UTF8Loader.BufferGeometryCreator.prototype.create = function ( attribArray ...@@ -99,7 +99,7 @@ THREE.UTF8Loader.BufferGeometryCreator.prototype.create = function ( attribArray
geometry.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) ); geometry.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) );
geometry.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ) ); geometry.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ) );
geometry.addDrawCall( 0, indices.length, 0 ); geometry.addDrawCall( 0, indices.length );
geometry.computeBoundingSphere(); geometry.computeBoundingSphere();
......
...@@ -104,7 +104,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) { ...@@ -104,7 +104,7 @@ THREE.glTFLoader.prototype.load = function( url, callback ) {
var geometry = this.geometry; var geometry = this.geometry;
geometry.addAttribute( 'index', new THREE.BufferAttribute( this.indexArray, 1 ) ); geometry.addAttribute( 'index', new THREE.BufferAttribute( this.indexArray, 1 ) );
geometry.addDrawCall( 0, this.indexArray.length, 0 ); geometry.addDrawCall( 0, this.indexArray.length );
geometry.computeBoundingSphere(); geometry.computeBoundingSphere();
}; };
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
} }
particles.addDrawCall( 0, particleCount, 0 ); particles.addDrawCall( 0, particleCount );
particles.addAttribute( 'position', new THREE.DynamicBufferAttribute( particlePositions, 3 ) ); particles.addAttribute( 'position', new THREE.DynamicBufferAttribute( particlePositions, 3 ) );
// create the particle system // create the particle system
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
geometry.computeBoundingSphere(); geometry.computeBoundingSphere();
geometry.addDrawCall( 0, 0, 0 ); geometry.addDrawCall( 0, 0 );
var material = new THREE.LineBasicMaterial( { var material = new THREE.LineBasicMaterial( {
vertexColors: THREE.VertexColors, vertexColors: THREE.VertexColors,
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
} }
geometry.addAttribute( 'index', new THREE.BufferAttribute( indices, 1 ) ); geometry.addAttribute( 'index', new THREE.BufferAttribute( indices, 1 ) );
geometry.addDrawCall( 0, indices.length, 0 ); geometry.addDrawCall( 0, indices.length );
var material = new THREE.PointCloudMaterial( { size: pointSize, vertexColors: THREE.VertexColors } ); var material = new THREE.PointCloudMaterial( { size: pointSize, vertexColors: THREE.VertexColors } );
var pointcloud = new THREE.PointCloud( geometry, material ); var pointcloud = new THREE.PointCloud( geometry, material );
......
...@@ -561,7 +561,7 @@ THREE.BufferGeometry.prototype = { ...@@ -561,7 +561,7 @@ THREE.BufferGeometry.prototype = {
if ( this.drawcalls.length === 0 ) { if ( this.drawcalls.length === 0 ) {
this.addDrawCall( 0, indices.length, 0 ); this.addDrawCall( 0, indices.length );
} }
...@@ -746,7 +746,7 @@ THREE.BufferGeometry.prototype = { ...@@ -746,7 +746,7 @@ THREE.BufferGeometry.prototype = {
if ( this.drawcalls.length === 0 ) { if ( this.drawcalls.length === 0 ) {
this.addDrawCall( 0, indices.length, 0 ); this.addDrawCall( 0, indices.length );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册