6 #ifndef MATERIALX_GLSLSHADERGENERATOR_H
7 #define MATERIALX_GLSLSHADERGENERATOR_H
35 return std::make_shared<GlslShaderGenerator>(typeSystem ? typeSystem :
TypeSystem::create());
43 const string&
getTarget()
const override {
return TARGET; }
46 virtual const string&
getVersion()
const {
return VERSION; }
50 bool assignValue =
true)
const override;
82 virtual bool requiresLighting(
const ShaderGraph& graph)
const;
104 const string&
getTarget()
const override;
vector< ShaderNodePtr > _lightSamplingNodes
Nodes used internally for light sampling.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
#define MATERIALX_NAMESPACE_BEGIN
virtual void emitVariableDeclaration(const ShaderPort *variable, const string &qualifier, GenContext &context, ShaderStage &stage, bool assignValue=true) const
shared_ptr< class GlslShaderGenerator > GlslShaderGeneratorPtr
Base class for common GLSL node implementations.
static const string TARGET
Unique identifier for this generator target.
static TypeSystemPtr create()
Create a new type system.
static ShaderGeneratorPtr create(TypeSystemPtr typeSystem=nullptr)
const string & getTarget() const override
Return a unique identifier for the target this generator is for.
shared_ptr< class TypeSystem > TypeSystemPtr
static const string VERSION
Version string for the generator target.
shared_ptr< class HwResourceBindingContext > HwResourceBindingContextPtr
Shared pointer to a HwResourceBindingContext.
virtual const string & getVersion() const
Return the version string for the GLSL version this generator is for.
GLint GLint GLsizei GLint GLenum GLenum type
virtual string getVertexDataPrefix(const VariableBlock &vertexData) const =0
Determine the prefix of vertex data variables.
virtual ShaderNodeImplPtr getImplementation(const NodeDef &nodedef, GenContext &context) const
Return a registered shader node implementation for the given nodedef.
virtual const string & getTarget() const
GLuint const GLchar * name
shared_ptr< Shader > ShaderPtr
Shared pointer to a Shader.
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
#define MATERIALX_NAMESPACE_END
shared_ptr< ShaderGenerator > ShaderGeneratorPtr
Shared pointer to a ShaderGenerator.
virtual ShaderPtr generate(const string &, ElementPtr, GenContext &) const
static void toVec4(const TypeDesc *type, string &variable)