Sfoglia il codice sorgente

Less allocations on buffer upload if format has low precision

clementlandrin 9 mesi fa
parent
commit
9e98226f29
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      h3d/Buffer.hx

+ 2 - 1
h3d/Buffer.hx

@@ -75,8 +75,9 @@ class Buffer {
 			var bytesPos : Int = 0;
 			var index : Int = bufPos;
 
+			var inputs = format.getInputs();
 			for ( i in 0...vertices ) {
-				for ( input in format.getInputs() ) {
+				for ( input in inputs ) {
 					var elementCount = input.type.getSize();
 					var step = 0;
 					switch ( input.precision ) {