Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-13 16:35:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:09 +0300
commitdf28d2c27e2bef54e5b4fc33d663125ac5ec83f7 (patch)
tree46aa6405616fe790e71703ba1c4a696162e6a3a9 /source/blender/editors/gizmo_library
parentb8b56ee1722b7b55c4224b0bb3dbf06201c96946 (diff)
Cleanup: GPU: Replace Batch uniform by shader uniform using macro
This is a first step into removing uniforms from GPU_batch and Imm.
Diffstat (limited to 'source/blender/editors/gizmo_library')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
index c5231b3cd96..ef3381110d4 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
@@ -226,10 +226,10 @@ static void button2d_draw_intern(const bContext *C,
float color_contrast[4];
copy_v3_fl(color_contrast, rgb_to_grayscale(color) < 0.2f ? 1 : 0);
color_contrast[3] = color[3];
- GPU_batch_uniform_4f(button->shape_batch[i], "color", UNPACK4(color_contrast));
+ GPU_shader_uniform_4f(button->shape_batch[i]->shader, "color", UNPACK4(color_contrast));
}
else {
- GPU_batch_uniform_4f(button->shape_batch[i], "color", UNPACK4(color));
+ GPU_shader_uniform_4f(button->shape_batch[i]->shader, "color", UNPACK4(color));
}
GPU_batch_draw(button->shape_batch[i]);