Wireframe: Optimization: Only draw triangles that have edges
authorClément Foucault <foucault.clem@gmail.com>
Tue, 4 Dec 2018 00:30:07 +0000 (01:30 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 4 Dec 2018 16:52:32 +0000 (17:52 +0100)
commitf1975a46390a5bf85bb7012375f9bc1e761fc516
treea88b08c31c9ec6e8c3482831380b2663dc922954
parent89ef69d23c079d1006fdffc9fb63199eabc257a7
Wireframe: Optimization: Only draw triangles that have edges

This only happens after a certain threshold.

We sort triangles into 2 bins (start and end of the buffer) based on a
threshold and just draw the start bin if the wireframe slider is low enough.

This optimization is disabled for deformed meshes.

This should help resolve (to some extent) T58188.
source/blender/draw/intern/draw_cache.c
source/blender/draw/intern/draw_cache.h
source/blender/draw/intern/draw_cache_impl.h
source/blender/draw/intern/draw_cache_impl_curve.c
source/blender/draw/intern/draw_cache_impl_mesh.c
source/blender/draw/intern/draw_cache_impl_metaball.c
source/blender/draw/modes/overlay_mode.c