ai_shaders.h
1 /*
2  * Arnold API header file
3  * Copyright (c) 1998-2009 Marcos Fajardo, (c) 2009-2013 Solid Angle SL
4  */
5 
11 #pragma once
12 #include "ai_nodes.h"
13 #include "ai_api.h"
14 
15 // forward declarations
16 struct AtNode;
17 struct AtShaderGlobals;
18 
24 typedef struct AtShaderNodeMethods {
25  void (*Evaluate)(AtNode*, AtShaderGlobals*);
27 
29 #define AI_SHADER_NODE_EXPORT_METHODS(tag) \
30 AI_INSTANCE_COMMON_METHODS \
31 shader_evaluate; \
32 static AtShaderNodeMethods ai_shader_mtds = { \
33  Evaluate \
34 }; \
35 static AtNodeMethods ai_node_mtds = { \
36  &ai_common_mtds, \
37  &ai_shader_mtds \
38 }; \
39 AtNodeMethods* tag = &ai_node_mtds;
40 
47 #define shader_evaluate \
48 static void Evaluate(AtNode* node, AtShaderGlobals* sg)
49 
50 /* \}*/
51 
57 AI_API void AiShaderEvaluate(AtNode* node, AtShaderGlobals* sg);
58 
59 /* \}*/
60 
61 /*\}*/

© 2009-2013 Solid Angle SL · all rights reserved · www.solidangle.com