浏览代码

fixed regression

Nicolas Cannasse 3 年之前
父节点
当前提交
6160900232
共有 1 个文件被更改,包括 3 次插入1 次删除
  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];