Wireframe: Optimization: Only draw triangles that have edges
authorClément Foucault <foucault.clem@gmail.com>
Tue, 4 Dec 2018 14:39:30 +0000 (15:39 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 4 Dec 2018 16:52:32 +0000 (17:52 +0100)
commit6f198f7851f8c8af4c55f86f0055d5da4c55d07d
treeefeb21ea5b5d135a57d8ffcb9294a5b05d3c0f4a
parentf1975a46390a5bf85bb7012375f9bc1e761fc516
Wireframe: Optimization: Only draw triangles that have edges

This only happens after a certain wireframe threshold.

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

This optimization is disabled for deformed meshes when playback is active.
This optimization is only implemented for meshes object for now.

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