HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OcioNode.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_OCIO_NODE_H
7 #define MATERIALX_OCIO_NODE_H
8 
9 #ifdef MATERIALX_BUILD_OCIO
10 
11 /// @file
12 /// OCIO node implementation
13 
20 
22 
23 /// OCIO node implementation. Takes an OCIO GpuProcessor and
24 /// uses it to inject shadergen code.
25 class OcioNode : public ShaderNodeImpl
26 {
27  public:
28  static ShaderNodeImplPtr create();
29 
30  void initialize(const InterfaceElement& element, GenContext& context) override;
31 
32  void emitFunctionDefinition(const ShaderNode& node, GenContext& context, ShaderStage& stage)
33  const override;
34 
35  void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage)
36  const override;
37 
38  private:
39  string getFunctionName() const;
40 };
41 
43 
44 #endif // MATERIALX_BUILD_OCIO
45 
46 #endif
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:39
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
virtual void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit function definition for the given node instance.
virtual void initialize(const InterfaceElement &element, GenContext &context)
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26
virtual void emitFunctionCall(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit the function call or inline source code for given node instance in the given context...