diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-08-30 22:54:33 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-08-30 23:26:11 +0300 |
commit | b15f90bf85c8ef8e22a474f1d242469f8c317616 (patch) | |
tree | f7725a789d27db5c2e61c189829a1137ed34871d /source/blender/gpu/GPU_batch.h | |
parent | fe195f51d1a842087ba411488ec5a8b8979583ee (diff) |
GPUBatch: Add draw parameter getter
This is used to populate indirect draw commands in the draw manager.
Diffstat (limited to 'source/blender/gpu/GPU_batch.h')
-rw-r--r-- | source/blender/gpu/GPU_batch.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index c085b592a77..b79560fdd1e 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -164,6 +164,13 @@ void GPU_batch_program_set_builtin_with_config(GPUBatch *batch, #define GPU_batch_texture_bind(batch, name, tex) \ GPU_texture_bind(tex, GPU_shader_get_texture_binding((batch)->shader, name)); +/** + * Return indirect draw call parameters for this batch. + * NOTE: r_base_index is set to -1 if not using an index buffer. + */ +void GPU_batch_draw_parameter_get( + GPUBatch *batch, int *r_v_count, int *r_v_first, int *r_base_index, int *r_i_count); + void GPU_batch_draw(GPUBatch *batch); void GPU_batch_draw_range(GPUBatch *batch, int v_first, int v_count); /** |