Переглянути джерело

Less allocations on buffer upload if format has low precision

clementlandrin 9 місяців тому
батько
коміт
9e98226f29
1 змінених файлів з 2 додано та 1 видалено
  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 ) {