diff options
author | clayjohn <claynjohn@gmail.com> | 2022-12-14 19:32:19 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-12-14 19:32:19 -0800 |
commit | ef246d9156dccf2c1d5e404ad83750a6efb8b4a3 (patch) | |
tree | 86728c5c20b778d93e1dd21bf26240725ce49565 /drivers/gles3/storage | |
parent | 1c5cfc4675826db05d6e7dc42b337e8b1282de08 (diff) |
Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain
Diffstat (limited to 'drivers/gles3/storage')
-rw-r--r-- | drivers/gles3/storage/mesh_storage.cpp | 19 | ||||
-rw-r--r-- | drivers/gles3/storage/mesh_storage.h | 2 |
2 files changed, 0 insertions, 21 deletions
diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index 5bbbc7b91b..ac0fca97d9 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -323,27 +323,8 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) } if (mesh->surface_count == 0) { - mesh->bone_aabbs = p_surface.bone_aabbs; mesh->aabb = p_surface.aabb; } else { - if (mesh->bone_aabbs.size() < p_surface.bone_aabbs.size()) { - // ArrayMesh::_surface_set_data only allocates bone_aabbs up to max_bone - // Each surface may affect different numbers of bones. - mesh->bone_aabbs.resize(p_surface.bone_aabbs.size()); - } - for (int i = 0; i < p_surface.bone_aabbs.size(); i++) { - const AABB &bone = p_surface.bone_aabbs[i]; - if (bone.has_volume()) { - AABB &mesh_bone = mesh->bone_aabbs.write[i]; - if (mesh_bone != AABB()) { - // Already initialized, merge AABBs. - mesh_bone.merge_with(bone); - } else { - // Not yet initialized, copy the bone AABB. - mesh_bone = bone; - } - } - } mesh->aabb.merge_with(p_surface.aabb); } diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h index 0f30814928..eccce6eb55 100644 --- a/drivers/gles3/storage/mesh_storage.h +++ b/drivers/gles3/storage/mesh_storage.h @@ -120,8 +120,6 @@ struct Mesh { Surface **surfaces = nullptr; uint32_t surface_count = 0; - Vector<AABB> bone_aabbs; - bool has_bone_weights = false; AABB aabb; |