HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SourceCodeNodeMdl.h
Go to the documentation of this file.
1 //
2 // Copyright Contributors to the MaterialX Project
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 
6 #ifndef MATERIALX_SOURCECODEMDL_H
7 #define MATERIALX_SOURCECODEMDL_H
8 
10 
12 
14 
15 /// Node implementation using data-driven static source code.
16 /// This is the default implementation used for all nodes that
17 /// do not have a custom ShaderNodeImpl class.
19 {
20  public:
21  static ShaderNodeImplPtr create();
22 
23  void initialize(const InterfaceElement& element, GenContext& context) override;
24  void emitFunctionDefinition(const ShaderNode&, GenContext&, ShaderStage&) const override;
25  void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
26 
27  protected:
28  string _returnStruct;
29 };
30 
32 
33 #endif
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
#define MX_GENMDL_API
Definition: Export.h:18
void emitFunctionCall(const ShaderNode &node, GenContext &context, ShaderStage &stage) const override
Emit the function call or inline source code for given node instance in the given context...
static ShaderNodeImplPtr create()
void initialize(const InterfaceElement &element, GenContext &context) override
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26
void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const override
Emit function definition for the given node instance.