Mesh: Avoid retrieving edge and loop arrays repeatedly

A utility function retrieved mesh arrays for every element after
05952aa94d which can be easily avoided. This was used when
building the GPU indices for sculpt mode drawing. In my tests this
saves 0.1ms per PBVH node. There may be very slight improvements
in line art and shrinkwrap as well.
This commit is contained in:
2022-11-27 18:46:46 -06:00
parent a059b1b0f1
commit bcabd04e32
6 changed files with 23 additions and 15 deletions

View File

@@ -177,7 +177,8 @@ void BKE_mesh_calc_poly_normal(const struct MPoly * /*mpoly*/,
BLI_assert_unreachable();
}
void BKE_mesh_looptri_get_real_edges(const struct Mesh * /*mesh*/,
void BKE_mesh_looptri_get_real_edges(const struct MEdge * /*edges*/,
const struct MLoop * /*loops*/,
const struct MLoopTri * /*looptri*/,
int UNUSED(r_edges[3]))
{