From 255727b752c5737644ba14a85ece702b3cd32fba Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 11 Jan 2022 09:57:22 +0100 Subject: GPU: Utility function to bind UBO to batches. --- source/blender/gpu/GPU_batch.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/gpu/GPU_batch.h') 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)); -- cgit v1.2.3