forked from LeenkxTeam/LNXSDK
Batch mesh remove object
This commit is contained in:
@ -57,10 +57,8 @@ class MeshBatch {
|
||||
}
|
||||
|
||||
public function removeMesh(m: MeshObject) {
|
||||
var shader = m.materials[0].shader;
|
||||
var b = buckets.get(shader);
|
||||
if (b != null) b.removeMesh(m);
|
||||
else nonBatched.remove(m);
|
||||
var b = m.materials.length > 0 ? buckets.get(m.materials[0].shader) : null;
|
||||
if (b == null || !b.removeMesh(m)) nonBatched.remove(m);
|
||||
}
|
||||
|
||||
@:access(iron.RenderPath)
|
||||
@ -176,8 +174,8 @@ class Bucket {
|
||||
meshes.push(m);
|
||||
}
|
||||
|
||||
public function removeMesh(m: MeshObject) {
|
||||
meshes.remove(m);
|
||||
public function removeMesh(m: MeshObject): Bool {
|
||||
return meshes.remove(m);
|
||||
}
|
||||
|
||||
#if lnx_deinterleaved
|
||||
|
||||
Reference in New Issue
Block a user