Ver Fonte

BigPrimitive optim: avoid big alloc when !static on all targets

trethaller há 7 anos atrás
pai
commit
8c697e59d5
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      h3d/prim/BigPrimitive.hx

+ 2 - 2
h3d/prim/BigPrimitive.hx

@@ -54,11 +54,11 @@ class BigPrimitive extends Primitive {
 				tmpBuf = new hxd.FloatBuffer();
 			else
 				PREV_BUFFER = null;
-			#if hl
 			if( isStatic )
-			#end
 				tmpBuf.grow(65535 * stride);
 		}
+		if( !isStatic )
+			tmpBuf.grow(vcount * stride + bufPos);
 		if( tmpIdx == null ) {
 			tmpIdx = PREV_INDEX;
 			if( tmpIdx == null )