Skip to content

Commit

Permalink
Clear AABB when Mesh is cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
clayjohn committed Dec 5, 2024
1 parent 1f47e4c commit deac37c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gles3/storage/mesh_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ void MeshStorage::mesh_clear(RID p_mesh) {
mesh->surface_count = 0;
mesh->material_cache.clear();
mesh->has_bone_weights = false;
mesh->aabb = AABB();
mesh->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_MESH);

for (Mesh *E : mesh->shadow_owners) {
Expand Down
1 change: 1 addition & 0 deletions servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ void MeshStorage::mesh_clear(RID p_mesh) {
mesh->surface_count = 0;
mesh->material_cache.clear();
mesh->has_bone_weights = false;
mesh->aabb = AABB();
mesh->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_MESH);

for (Mesh *E : mesh->shadow_owners) {
Expand Down

0 comments on commit deac37c

Please sign in to comment.