File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,23 +391,20 @@ var WebGLPipeline = new Class({
391391 // Which shader has the largest vertex size?
392392 var shaders = this . shaders ;
393393 var vertexSize = 0 ;
394- var vertexComponentCount = 0 ;
395394
396395 for ( i = 0 ; i < shaders . length ; i ++ )
397396 {
398397 if ( shaders [ i ] . vertexSize > vertexSize )
399398 {
400399 vertexSize = shaders [ i ] . vertexSize ;
401400 }
402-
403- if ( shaders [ i ] . vertexComponentCount > vertexComponentCount )
404- {
405- vertexComponentCount = shaders [ i ] . vertexComponentCount ;
406- }
407401 }
408402
403+ var batchSize = GetFastValue ( config , 'batchSize' , renderer . config . batchSize ) ;
404+
409405 // * 6 because there are 6 vertices in a quad and 'batchSize' represents the quantity of quads in the batch
410- this . vertexCapacity = ( GetFastValue ( config , 'vertexCapacity' , renderer . config . batchSize ) * 6 ) * vertexComponentCount ;
406+
407+ this . vertexCapacity = batchSize * 6 ;
411408
412409 var data = GetFastValue ( config , 'vertices' , new ArrayBuffer ( this . vertexCapacity * vertexSize ) ) ;
413410
@@ -670,7 +667,7 @@ var WebGLPipeline = new Class({
670667 {
671668 if ( amount === undefined ) { amount = 0 ; }
672669
673- return ( this . vertexCount + amount >= this . vertexCapacity ) ;
670+ return ( this . vertexCount + amount > this . vertexCapacity ) ;
674671 } ,
675672
676673 /**
You can’t perform that action at this time.
0 commit comments