6#ifndef MATERIALX_GLSL_SYNTAX_H 
    7#define MATERIALX_GLSL_SYNTAX_H 
   16MATERIALX_NAMESPACE_BEGIN
 
   19class MX_GENGLSL_API GlslSyntax : 
public Syntax 
   22    GlslSyntax(TypeSystemPtr typeSystem);
 
   24    static SyntaxPtr create(TypeSystemPtr typeSystem) { 
return std::make_shared<GlslSyntax>(typeSystem); }
 
   36    bool remapEnumeration(
const string& value, 
TypeDesc type, 
const string& enumNames, std::pair<TypeDesc, ValuePtr>& result) 
const override;
 
   38    StructTypeSyntaxPtr createStructSyntax(
const string& structTypeName, 
const string& defaultValue,
 
   39                                           const string& uniformDefaultValue, 
const string& typeAlias,
 
   40                                           const string& typeDefinition) 
const override;
 
   42    static const string INPUT_QUALIFIER;
 
   43    static const string OUTPUT_QUALIFIER;
 
   44    static const string UNIFORM_QUALIFIER;
 
   45    static const string CONSTANT_QUALIFIER;
 
   46    static const string FLAT_QUALIFIER;
 
   47    static const string SOURCE_FILE_EXTENSION;
 
 
   58    using StructTypeSyntax::StructTypeSyntax;
 
 
   63MATERIALX_NAMESPACE_END
 
vector< string > StringVec
A vector of strings.
Definition Library.h:61
 
Macros for declaring imported and exported symbols.
 
Base class for syntax handling for shader generators.
 
shared_ptr< StructTypeSyntax > StructTypeSyntaxPtr
Shared pointer to a StructTypeSyntax.
Definition Syntax.h:34
 
shared_ptr< Syntax > SyntaxPtr
Shared pointer to a Syntax.
Definition Syntax.h:28
 
Specialization of TypeSyntax for aggregate types.
Definition GlslSyntax.h:56
 
string getValue(const Value &value, bool uniform) const override
Returns a value formatted according to this type syntax.
 
bool remapEnumeration(const string &value, TypeDesc type, const string &enumNames, std::pair< TypeDesc, ValuePtr > &result) const override
Given an input specification attempt to remap this to an enumeration which is accepted by the shader ...
 
const string & getInputQualifier() const override
Returns a type qualifier to be used when declaring types for input variables.
Definition GlslSyntax.h:26
 
const string & getConstantQualifier() const override
Get the qualifier used when declaring constant variables.
Definition GlslSyntax.h:28
 
const string & getOutputQualifier() const override
Returns a type qualifier to be used when declaring types for output variables.
Definition GlslSyntax.h:27
 
const string & getUniformQualifier() const override
Get the qualifier used when declaring uniform variables.
Definition GlslSyntax.h:29
 
const string & getSourceFileExtension() const override
Return the file extension used for source code files in this language.
Definition GlslSyntax.h:30
 
bool typeSupported(const TypeDesc *type) const override
Query if given type is supported in the syntax.
 
Syntax(TypeSystemPtr typeSystem)
Protected constructor.
 
A type descriptor for MaterialX data types.
Definition TypeDesc.h:40
 
A generic, discriminated value, whose type may be queried dynamically.
Definition Value.h:46