Przeglądaj źródła

fixed regression

Nicolas Cannasse 3 lat temu
rodzic
commit
6160900232
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      h3d/scene/MeshBatch.hx

+ 3 - 1
h3d/scene/MeshBatch.hx

@@ -307,8 +307,10 @@ class MeshBatch extends MultiMaterial {
 				if( buf == null || buf.isDisposed() ) {
 					buf = alloc.allocBuffer(MAX_BUFFER_ELEMENTS,4,UniformDynamic);
 					p.buffers[index] = buf;
-					buf.uploadVector(p.data, start * p.paramsCount * 4, count * p.paramsCount);
+					upload = true;
 				}
+				if( upload )
+					buf.uploadVector(p.data, start * p.paramsCount * 4, count * p.paramsCount);
 				if( psBytes != null ) {
 					if( p.instanceBuffers == null ) p.instanceBuffers = [];
 					var buf = p.instanceBuffers[index];