diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-11 11:57:22 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-11 11:57:22 +0300 |
commit | 255727b752c5737644ba14a85ece702b3cd32fba (patch) | |
tree | 61cd07c5e48a78ac0a3e9877c6b6dc202ea5d1d1 /source | |
parent | 1949aece21de20ee43415a5464a408ea0137e3ca (diff) |
GPU: Utility function to bind UBO to batches.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/GPU_batch.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index a8bc4f271c9..b193b45d65c 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -30,6 +30,7 @@ #include "GPU_index_buffer.h" #include "GPU_shader.h" +#include "GPU_uniform_buffer.h" #include "GPU_vertex_buffer.h" #define GPU_BATCH_VBO_MAX_LEN 16 @@ -170,6 +171,8 @@ void GPU_batch_program_set_builtin_with_config(GPUBatch *batch, GPU_shader_uniform_4fv_array((batch)->shader, name, len, val); #define GPU_batch_uniform_mat4(batch, name, val) \ GPU_shader_uniform_mat4((batch)->shader, name, val); +#define GPU_batch_uniformbuf_bind(batch, name, ubo) \ + GPU_uniformbuf_bind(ubo, GPU_shader_get_uniform_block_binding((batch)->shader, name)); #define GPU_batch_texture_bind(batch, name, tex) \ GPU_texture_bind(tex, GPU_shader_get_texture_binding((batch)->shader, name)); |