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