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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 35ef48250cc..4a923e66356 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -54,6 +54,8 @@
#include "gpu_codegen.h"
+#include "node_util.h" /* For muting node stuff... */
+
#include <string.h>
#include <stdarg.h>
@@ -1212,6 +1214,31 @@ int GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNode
return 1;
}
+int GPU_stack_link_mute(GPUMaterial *mat, const char *name, LinkInOutsMuteNode *mlnk)
+{
+ GPUNode *node;
+ GPUFunction *function;
+ int i;
+
+ function = GPU_lookup_function(name);
+ if(!function) {
+ fprintf(stderr, "GPU failed to find function %s\n", name);
+ return 0;
+ }
+
+ for(i = 0; i < mlnk->num_outs; i++) {
+ node = GPU_node_begin(name);
+ gpu_node_input_socket(node, (GPUNodeStack*)mlnk->in);
+ GPU_node_output(node, ((GPUNodeStack*)mlnk->outs+i)->type, ((GPUNodeStack*)mlnk->outs+i)->name,
+ &((GPUNodeStack*)mlnk->outs+i)->link);
+ GPU_node_end(node);
+
+ gpu_material_add_node(mat, node);
+ }
+
+ return 1;
+}
+
int GPU_link_changed(GPUNodeLink *link)
{
GPUNode *node;