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/space_node
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/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 37daa881317..8f15cd82fe0 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -4026,7 +4026,7 @@ static void nodelink_batch_draw(SpaceNode *snode)
GPU_vertbuf_use(g_batch_link.inst_vbo); /* force update. */
GPU_batch_program_set_builtin(g_batch_link.batch, GPU_SHADER_2D_NODELINK_INST);
- GPU_batch_uniform_4fv_array(g_batch_link.batch, "colors", 6, (float *)colors);
+ GPU_batch_uniform_4fv_array(g_batch_link.batch, "colors", 6, colors);
GPU_batch_uniform_1f(g_batch_link.batch, "expandSize", snode->aspect * LINK_WIDTH);
GPU_batch_uniform_1f(g_batch_link.batch, "arrowSize", ARROW_SIZE);
GPU_batch_draw(g_batch_link.batch);
@@ -4108,8 +4108,8 @@ void node_draw_link_bezier(
GPUBatch *batch = g_batch_link.batch_single;
GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_NODELINK);
- GPU_batch_uniform_2fv_array(batch, "bezierPts", 4, (float *)vec);
- GPU_batch_uniform_4fv_array(batch, "colors", 3, (float *)colors);
+ GPU_batch_uniform_2fv_array(batch, "bezierPts", 4, vec);
+ GPU_batch_uniform_4fv_array(batch, "colors", 3, colors);
GPU_batch_uniform_1f(batch, "expandSize", snode->aspect * LINK_WIDTH);
GPU_batch_uniform_1f(batch, "arrowSize", ARROW_SIZE);
GPU_batch_uniform_1i(batch, "doArrow", drawarrow);