MaterialX 1.39.4
Loading...
Searching...
No Matches
OcioNode.h
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
13
20
21MATERIALX_NAMESPACE_BEGIN
22
25class 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
42MATERIALX_NAMESPACE_END
43
44#endif // MATERIALX_BUILD_OCIO
45
46#endif
Context classes for shader generation.
Interface element subclasses.
Library-wide includes and types.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition Library.h:39
Classes for nodes created during shader generation.
Base class for shader node implementations.
Class related to holding information for shader stages.
Class handling the shader generation implementation for a node.
Definition ShaderNodeImpl.h:32
virtual void initialize(const InterfaceElement &element, GenContext &context)
Initialize with the given implementation element.
virtual void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit function definition for the given node instance.
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.