MaterialX 1.38.2
SourceCodeNode.h
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_SOURCECODENODE_H
7#define MATERIALX_SOURCECODENODE_H
8
10
11namespace MaterialX
12{
13
17class MX_GENSHADER_API SourceCodeNode : public ShaderNodeImpl
18{
19public:
20 static ShaderNodeImplPtr create();
21
22 void initialize(const InterfaceElement& element, GenContext& context) override;
23 void emitFunctionDefinition(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
24 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
25
26protected:
27 bool _inlined;
28 string _functionName;
29 string _functionSource;
30};
31
32} // namespace MaterialX
33
34#endif
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
Base class for shader node implementations.
A context class for shader generation.
Definition: GenContext.h:27
The base class for interface elements such as Node, NodeDef, and NodeGraph.
Definition: Interface.h:317
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:326
Class handling the shader generation implementation for a node.
Definition: ShaderNodeImpl.h:32
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:124
Node implementation using data-driven static source code.
Definition: SourceCodeNode.h:18