You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Track mesh dependencies in Dummy RenderingServer to properly resolve freeing MeshInstances
This commit is contained in:
@@ -53,13 +53,14 @@ void MeshStorage::mesh_initialize(RID p_rid) {
|
||||
void MeshStorage::mesh_free(RID p_rid) {
|
||||
DummyMesh *mesh = mesh_owner.get_or_null(p_rid);
|
||||
ERR_FAIL_NULL(mesh);
|
||||
|
||||
mesh->dependency.deleted_notify(p_rid);
|
||||
mesh_owner.free(p_rid);
|
||||
}
|
||||
|
||||
void MeshStorage::mesh_surface_remove(RID p_mesh, int p_surface) {
|
||||
DummyMesh *m = mesh_owner.get_or_null(p_mesh);
|
||||
ERR_FAIL_NULL(m);
|
||||
m->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_MESH);
|
||||
m->surfaces.remove_at(p_surface);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user