6 #ifndef MATERIALX_GLSLSHADERGENERATOR_H
7 #define MATERIALX_GLSLSHADERGENERATOR_H
34 const string&
getTarget()
const override {
return TARGET; }
37 virtual const string&
getVersion()
const {
return VERSION; }
41 bool assignValue =
true)
const override;
73 virtual bool requiresLighting(
const ShaderGraph& graph)
const;
84 static void toVec4(
const TypeDesc*
type,
string& variable);
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.
const string & getTarget() const override
Return a unique identifier for the target this generator is for.
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.
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
static ShaderGeneratorPtr create()
shared_ptr< ShaderGenerator > ShaderGeneratorPtr
Shared pointer to a ShaderGenerator.
virtual ShaderPtr generate(const string &, ElementPtr, GenContext &) const