Browse Source

added canEmitInstance()

Nicolas Cannasse 5 years ago
parent
commit
e8477411f3
1 changed files with 4 additions and 0 deletions
  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;