diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-04 02:39:35 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-04 15:11:04 +0300 |
commit | b2f1a6587410d00ad3bbd22e045979f80048afe2 (patch) | |
tree | 8312daea35aed37a1cdba6d6e6e97958b7f21d47 /source/blender/draw/intern/DRW_render.h | |
parent | 1d8ed6dcd7cd2b3ccfaaacb59387dca481262eb6 (diff) |
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
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 134fb5d99f8..363cf67623a 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -440,6 +440,17 @@ void DRW_shgroup_call_object_add_with_callback(DRWShadingGroup *shgroup, struct Material *ma, DRWCallVisibilityFn *callback, void *user_data); + +void DRW_shgroup_call_sculpt_add(DRWShadingGroup *shading_group, + Object *object, + bool use_wire, + bool use_mask, + bool use_vert_color); +void DRW_shgroup_call_sculpt_with_materials_add(DRWShadingGroup **shgroups, + Material **materials, + Object *ob, + bool use_vcol); + /* Used for drawing a batch with instancing without instance attributes. */ void DRW_shgroup_call_instances_add(DRWShadingGroup *shgroup, struct GPUBatch *geom, @@ -449,14 +460,6 @@ void DRW_shgroup_call_object_instances_add(DRWShadingGroup *shgroup, struct GPUBatch *geom, struct Object *ob, uint *count); -void DRW_shgroup_call_sculpt_add(DRWShadingGroup *shgroup, struct Object *ob, float (*obmat)[4]); -void DRW_shgroup_call_sculpt_wires_add(DRWShadingGroup *shgroup, - struct Object *ob, - float (*obmat)[4]); -void DRW_shgroup_call_generate_add(DRWShadingGroup *shgroup, - DRWCallGenerateFn *geometry_fn, - void *user_data, - float (*obmat)[4]); void DRW_shgroup_call_dynamic_add_array(DRWShadingGroup *shgroup, const void *attr[], uint attr_len); |