[Bf-blender-cvs] [255727b752c] master: GPU: Utility function to bind UBO to batches.
Jeroen Bakker
noreply at git.blender.org
Tue Jan 11 10:01:20 CET 2022
Commit: 255727b752c5737644ba14a85ece702b3cd32fba
Author: Jeroen Bakker
Date: Tue Jan 11 09:57:22 2022 +0100
Branches: master
https://developer.blender.org/rB255727b752c5737644ba14a85ece702b3cd32fba
GPU: Utility function to bind UBO to batches.
===================================================================
M 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));
More information about the Bf-blender-cvs
mailing list