Sculpt: Refactor draw manager sculpt drawing mechanism
authorClément Foucault <foucault.clem@gmail.com>
Fri, 3 May 2019 23:39:35 +0000 (01:39 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Sat, 4 May 2019 12:11:04 +0000 (14:11 +0200)
commitb2f1a6587410d00ad3bbd22e045979f80048afe2
tree8312daea35aed37a1cdba6d6e6e97958b7f21d47
parent1d8ed6dcd7cd2b3ccfaaacb59387dca481262eb6
Sculpt: Refactor draw manager sculpt drawing mechanism

Workbench/Eevee now displays multiple multi-materials correctly.

Iterate over pbvh nodes when doing object iteration. This makes the
rendering process more streamlined and allow for using different materials.

This change will make possible to:
- Add culling pass of each pbvh leaf node. (speedup if zoomed on a small
area)
- Reduce number of lead node iteration.
- Reduce code complexity
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/intern/pbvh.c
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/workbench/workbench_deferred.c
source/blender/draw/engines/workbench/workbench_forward.c
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_manager_data.c
source/blender/draw/modes/overlay_mode.c
source/blender/draw/modes/sculpt_mode.c