소스 검색

Remove legacy assert in mesh batch

clementlandrin 1 년 전
부모
커밋
940ef0e7ed
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      h3d/scene/MeshBatch.hx

+ 2 - 3
h3d/scene/MeshBatch.hx

@@ -181,8 +181,6 @@ class MeshBatch extends MultiMaterial {
 							curPos += fmt[i].getBytesSize() >> 2;
 							curPos += fmt[i].getBytesSize() >> 2;
 					}
 					}
 					b.bufferFormat = hxd.BufferFormat.make(fmt);
 					b.bufferFormat = hxd.BufferFormat.make(fmt);
-					if( b.bufferFormat.stride & 3 != 0 )
-						throw "assert";
 				}
 				}
 
 
 				b.next = dataPasses;
 				b.next = dataPasses;
@@ -471,8 +469,9 @@ class MeshBatch extends MultiMaterial {
 			// check that the pass is still enable
 			// check that the pass is still enable
 			var material = materials[p.matIndex];
 			var material = materials[p.matIndex];
 			if( material != null && material.getPass(pass.name) != null ) {
 			if( material != null && material.getPass(pass.name) != null ) {
-				for( i in 0...p.buffers.length )
+				for( i in 0...p.buffers.length ) {
 					ctx.emitPass(pass, this).index = i | (p.matIndex << 16);
 					ctx.emitPass(pass, this).index = i | (p.matIndex << 16);
+				}
 			}
 			}
 			p = p.next;
 			p = p.next;
 		}
 		}