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:
authorRobin Allen <roblovski@gmail.com>2009-08-18 00:30:11 +0400
committerRobin Allen <roblovski@gmail.com>2009-08-18 00:30:11 +0400
commitf9ceeeede672a634913188c775e020c23170f4e1 (patch)
tree1f1068e7d4b118dd44795bc6412b46d36230fd28 /source/blender/nodes/intern/TEX_util.h
parent9f5d25748397aad6a4347f40c7ec6c025dc93129 (diff)
Slight refactor of texture nodes.
Delegates now receive a TexParams* instead of float *coords. This gives texture nodes access to dxt, dyt, cfra as well as coords. This fixes the time node and allows nice sampling to be implemented.
Diffstat (limited to 'source/blender/nodes/intern/TEX_util.h')
-rw-r--r--source/blender/nodes/intern/TEX_util.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/nodes/intern/TEX_util.h b/source/blender/nodes/intern/TEX_util.h
index e560aa57921..7fff8d04651 100644
--- a/source/blender/nodes/intern/TEX_util.h
+++ b/source/blender/nodes/intern/TEX_util.h
@@ -71,13 +71,20 @@
typedef struct TexCallData {
TexResult *target;
float *coord;
+ float *dxt, *dyt;
char do_preview;
short thread;
short which_output;
int cfra;
} TexCallData;
-typedef void(*TexFn) (float *out, float *coord, bNode *node, bNodeStack **in, short thread);
+typedef struct TexParams {
+ float *coord;
+ float *dxt, *dyt;
+ int cfra;
+} TexParams;
+
+typedef void(*TexFn) (float *out, TexParams *params, bNode *node, bNodeStack **in, short thread);
typedef struct TexDelegate {
TexFn fn;
@@ -86,16 +93,18 @@ typedef struct TexDelegate {
int type;
} TexDelegate;
-void tex_call_delegate(TexDelegate*, float *out, float *coord, short thread);
+void tex_call_delegate(TexDelegate*, float *out, TexParams *params, short thread);
-void tex_input_rgba(float *out, bNodeStack *in, float *coord, short thread);
-void tex_input_vec(float *out, bNodeStack *in, float *coord, short thread);
-float tex_input_value(bNodeStack *in, float *coord, short thread);
+void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread);
+void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread);
+float tex_input_value(bNodeStack *in, TexParams *params, short thread);
void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn);
void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata);
void ntreeTexUpdatePreviews( bNodeTree* nodetree );
-void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, char do_preview, short thread, struct Tex *tex, short which_output, int cfra);
-
+void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, float *dxt, float *dyt, char do_preview, short thread, struct Tex *tex, short which_output, int cfra);
+
+void params_from_cdata(TexParams *out, TexCallData *in);
+
#endif