diff options
author | Antonioya <blendergit@gmail.com> | 2019-06-18 15:00:19 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-06-18 15:01:32 +0300 |
commit | 0b73817c8cf413f2ef3222221ca1d5a279e58515 (patch) | |
tree | 9f76f4cb87f733c2617d754290735645faadc8a8 /source | |
parent | c11bfb519fd2520fbe46914313bb56e2b646a340 (diff) |
Add a new function to recover the next shading group.
After talking with @fclem, we decided to keep this as a workaround function waiting for the clearing operation to be available inside the shgroups.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 1 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index d68525e62ae..aae1ad42860 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -531,6 +531,7 @@ void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, void DRW_shgroup_uniform_vec2_copy(DRWShadingGroup *shgroup, const char *name, const float *value); bool DRW_shgroup_is_empty(DRWShadingGroup *shgroup); +DRWShadingGroup *DRW_shgroup_get_next(DRWShadingGroup *shgroup); /* Passes */ DRWPass *DRW_pass_create(const char *name, DRWState state); diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 9c9b91eaaed..10d16021b27 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -996,6 +996,13 @@ bool DRW_shgroup_is_empty(DRWShadingGroup *shgroup) return shgroup->calls.first == NULL; } +/* This is a workaround function waiting for the clearing operation to be available inside the + * shgroups. */ +DRWShadingGroup *DRW_shgroup_get_next(DRWShadingGroup *shgroup) +{ + return shgroup->next; +} + DRWShadingGroup *DRW_shgroup_create_sub(DRWShadingGroup *shgroup) { DRWShadingGroup *shgroup_new = BLI_memblock_alloc(DST.vmempool->shgroups); |