diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-07 00:19:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-07 00:19:20 +0400 |
commit | 0ba9e04c5be13f9c5b49a86ee00d1a97841ebe76 (patch) | |
tree | 99a5892ccb44243efc5779e26efd158b73a3434f /source/blender/nodes | |
parent | 3e9f2938f07feb7808186834f5975f7c2c211b15 (diff) |
Fix for previous commit, didn't compile on windows.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_math.c | 8 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_vectMath.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c index adfb823147b..0b71a3f13b4 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.c +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -236,12 +236,16 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUN case 14: if (in[0].hasinput || !in[1].hasinput) { /* use only first item and terminator */ - GPUNodeStack tmp_in[2] = {in[0], in[2]}; + GPUNodeStack tmp_in[2]; + memcpy(&tmp_in[0], &in[0], sizeof(GPUNodeStack)); + memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack)); GPU_stack_link(mat, names[node->custom1], tmp_in, out); } else { /* use only second item and terminator */ - GPUNodeStack tmp_in[2] = {in[1], in[2]}; + GPUNodeStack tmp_in[2]; + memcpy(&tmp_in[0], &in[1], sizeof(GPUNodeStack)); + memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack)); GPU_stack_link(mat, names[node->custom1], tmp_in, out); } break; diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c index d57c1da2f91..3e00421ddf0 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -119,12 +119,16 @@ static int gpu_shader_vect_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, case 5: if (in[0].hasinput || !in[1].hasinput) { /* use only first item and terminator */ - GPUNodeStack tmp_in[2] = {in[0], in[2]}; + GPUNodeStack tmp_in[2]; + memcpy(&tmp_in[0], &in[0], sizeof(GPUNodeStack)); + memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack)); GPU_stack_link(mat, names[node->custom1], tmp_in, out); } else { /* use only second item and terminator */ - GPUNodeStack tmp_in[2] = {in[1], in[2]}; + GPUNodeStack tmp_in[2]; + memcpy(&tmp_in[0], &in[1], sizeof(GPUNodeStack)); + memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack)); GPU_stack_link(mat, names[node->custom1], tmp_in, out); } break; |