소스 검색

added canEmitInstance()

Nicolas Cannasse 5 년 전
부모
커밋
e8477411f3
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      h3d/scene/MeshBatch.hx

+ 4 - 0
h3d/scene/MeshBatch.hx

@@ -256,6 +256,10 @@ class MeshBatch extends Mesh {
 		curInstances++;
 	}
 
+	public inline function canEmitInstance() {
+		return curInstances < maxInstances;
+	}
+
 	override function sync(ctx:RenderContext) {
 		super.sync(ctx);
 		if( curInstances == 0 ) return;