6 #ifndef MATERIALX_MDLSHADERGENERATOR_H
7 #define MATERIALX_MDLSHADERGENERATOR_H
60 const string&
getTarget()
const override {
return TARGET; }
86 const string& getMdlVersionFilenameSuffix(
GenContext& context)
const;
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
#define MATERIALX_NAMESPACE_BEGIN
static const string GEN_CONTEXT_USER_DATA_KEY
Unique identifier for the MDL options on the GenContext object.
static const string TARGET
Unique identifier for this generator target.
const string & getTarget() const override
Return a unique identifier for the target this generator is for.
virtual string getUpstreamResult(const ShaderInput *input, GenContext &context) const
Return the result of an upstream connection or value for an input.
virtual ShaderNodeImplPtr getImplementation(const NodeDef &nodedef, GenContext &context) const
Return a registered shader node implementation for the given nodedef.
MX_GENMDL_API const string OUTPUTS
Generator context data class to pass strings.
GenMdlOptions()
Create MDL code generator options with default values.
shared_ptr< Document > DocumentPtr
A shared pointer to a Document.
GLuint const GLchar * name
shared_ptr< class GenMdlOptions > GenMdlOptionsPtr
Shared pointer to GenMdlOptions.
MX_GENMDL_API const string INPUTS
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
static const std::unordered_map< string, string > GEOMPROP_DEFINITIONS
Map of code snippets for geomprops in MDL.
shared_ptr< ShaderGenerator > ShaderGeneratorPtr
Shared pointer to a ShaderGenerator.
static ShaderGeneratorPtr create()
virtual ShaderPtr generate(const string &, ElementPtr, GenContext &) const
MdlVersion
MDL Versions supported by the Code Generator.
shared_ptr< class MdlShaderGenerator > MdlShaderGeneratorPtr
Shared pointer to an MdlShaderGenerator.