6 #ifndef MATERIALX_OSLSHADERGENERATOR_H
7 #define MATERIALX_OSLSHADERGENERATOR_H
31 const string&
getTarget()
const override {
return TARGET; }
#define MATERIALX_NAMESPACE_BEGIN
MX_GENOSL_API const string INPUTS
shared_ptr< class OslShaderGenerator > OslShaderGeneratorPtr
virtual void registerShaderMetadata(const DocumentPtr &doc, GenContext &context) const
MX_GENOSL_API const string UNIFORMS
Identifiers for OSL variable blocks.
static ShaderGeneratorPtr create()
virtual void emitFunctionBodyBegin(const ShaderNode &node, GenContext &context, ShaderStage &stage, Syntax::Punctuation punc=Syntax::CURLY_BRACKETS) const
Emit code for starting a new function body.
shared_ptr< Document > DocumentPtr
A shared pointer to a Document.
GLuint const GLchar * name
MX_GENOSL_API const string OUTPUTS
static const string TARGET
Unique identifier for this generator target.
Punctuation
Punctuation types.
MX_RENDER_API ShaderPtr createShader(const string &shaderName, GenContext &context, ElementPtr elem)
Create a shader for a given element.
shared_ptr< Shader > ShaderPtr
Shared pointer to a Shader.
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
#define MATERIALX_NAMESPACE_END
const string & getTarget() const override
Return a unique identifier for the target this generator is for.
virtual void emitFunctionCalls(const ShaderGraph &graph, GenContext &context, ShaderStage &stage, uint32_t classification=0u) const
shared_ptr< ShaderGenerator > ShaderGeneratorPtr
Shared pointer to a ShaderGenerator.
virtual ShaderPtr generate(const string &, ElementPtr, GenContext &) const