Blender Git Commit Log

Git Commits -> Revision d885b11

Revision d885b11 by Campbell Barton (master)
July 1, 2020, 04:56 (GMT)
DRW: optimize mesh data extraction

Change extraction callbacks to take index ranges instead of calling them
for each mesh element (poly, loop, vert & edge).

This gives a minor overall performance gain in my tests, ~5% on average.

Details:

- Use typed parameter structs and macros for looping over elements.
Without this, changes to these callbacks is time consuming as changes
need to be made in many places.
- Avoid iterating over polygon-loops when iterating over polygons
is sufficient.
- Simplify logic to access adjacent loops for faster line extraction.
- Rename 'loop' iterators to 'poly' (as they take polygon ranges)
the iterator callbacks can operator on either polygon or loop data.
- Use term 'last' for the last index (inclusive),
use 'end' when this value (not inclusive).

Commit Details:

Full Hash: d885b1141c7cdf8c75ec7e1983546c2dd9da1004
Parent Commit: 36d6aa4
Lines Changed: +1636, -1085

2 Modified Paths:

/source/blender/draw/intern/draw_cache_extract.h (+1, -1) (Diff)
/source/blender/draw/intern/draw_cache_extract_mesh.c (+1635, -1084) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021