diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-14 20:16:52 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-14 20:59:42 +0300 |
commit | 629a87481769d8886fcbe66ca4e4e4b60c767627 (patch) | |
tree | e7265a43ce343da558d431ee4362d774ef222713 /source/blender/draw/intern/DRW_render.h | |
parent | ab7e7a005bde711d14493d51ee26ea297fa99e47 (diff) |
DRW: Add instance buffer manager.
This manager allows to distribute existing batches for instancing
attributes. This reduce the number of batches creation.
Querying a batch is done with a vertex format. This format should
be static so that it's pointer never changes (because we are using
this pointer as identifier [we don't want to check the full format
that would be too slow]).
This might make the original Instance Data manager useless but it's currently used by DRW_object_engine_data_ensure().
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 64a907bf385..ab09586861d 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -336,6 +336,7 @@ void DRW_shgroup_call_dynamic_add_array(DRWShadingGroup *shgroup, const void *at } while (0) /* Use this to set a high number of instances. */ void DRW_shgroup_set_instance_count(DRWShadingGroup *shgroup, int count); +unsigned int DRW_shgroup_get_instance_count(const DRWShadingGroup *shgroup); void DRW_shgroup_state_enable(DRWShadingGroup *shgroup, DRWState state); void DRW_shgroup_state_disable(DRWShadingGroup *shgroup, DRWState state); |