瀏覽代碼

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++;
 		curInstances++;
 	}
 	}
 
 
+	public inline function canEmitInstance() {
+		return curInstances < maxInstances;
+	}
+
 	override function sync(ctx:RenderContext) {
 	override function sync(ctx:RenderContext) {
 		super.sync(ctx);
 		super.sync(ctx);
 		if( curInstances == 0 ) return;
 		if( curInstances == 0 ) return;