|
@@ -65,21 +65,26 @@ function WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {
|
|
|
const extension = extensions.get( 'WEBGL_multi_draw' );
|
|
|
if ( extension === null ) {
|
|
|
|
|
|
- console.error( 'THREE.WebGLBufferRenderer: using THREE.BatchedMesh but hardware does not support extension WEBGL_multi_draw.' );
|
|
|
- return;
|
|
|
+ for ( let i = 0; i < drawCount; i ++ ) {
|
|
|
|
|
|
- }
|
|
|
+ this.render( starts[ i ] / bytesPerElement, counts[ i ] );
|
|
|
|
|
|
- extension.multiDrawElementsWEBGL( mode, counts, 0, type, starts, 0, drawCount );
|
|
|
+ }
|
|
|
|
|
|
- let elementCount = 0;
|
|
|
- for ( let i = 0; i < drawCount; i ++ ) {
|
|
|
+ } else {
|
|
|
|
|
|
- elementCount += counts[ i ];
|
|
|
+ extension.multiDrawElementsWEBGL( mode, counts, 0, type, starts, 0, drawCount );
|
|
|
|
|
|
- }
|
|
|
+ let elementCount = 0;
|
|
|
+ for ( let i = 0; i < drawCount; i ++ ) {
|
|
|
+
|
|
|
+ elementCount += counts[ i ];
|
|
|
|
|
|
- info.update( elementCount, mode, 1 );
|
|
|
+ }
|
|
|
+
|
|
|
+ info.update( elementCount, mode, 1 );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|