6#ifndef MATERIALX_GLSL_SYNTAX_H
7#define MATERIALX_GLSL_SYNTAX_H
16MATERIALX_NAMESPACE_BEGIN
19class MX_GENGLSL_API GlslSyntax :
public Syntax
24 static SyntaxPtr create() {
return std::make_shared<GlslSyntax>(); }
36 bool remapEnumeration(
const string& value,
TypeDesc type,
const string& enumNames, std::pair<TypeDesc, ValuePtr>& result)
const override;
38 static const string INPUT_QUALIFIER;
39 static const string OUTPUT_QUALIFIER;
40 static const string UNIFORM_QUALIFIER;
41 static const string CONSTANT_QUALIFIER;
42 static const string FLAT_QUALIFIER;
43 static const string SOURCE_FILE_EXTENSION;
50 StructTypeSyntaxPtr createStructSyntax(
const string& structTypeName,
const string& defaultValue,
51 const string& uniformDefaultValue,
const string& typeAlias,
52 const string& typeDefinition)
const override;
59 using StructTypeSyntax::StructTypeSyntax;
64MATERIALX_NAMESPACE_END
vector< string > StringVec
A vector of strings.
Definition Library.h:60
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:57
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()
Protected constructor.
A type descriptor for MaterialX data types.
Definition TypeDesc.h:36
A generic, discriminated value, whose type may be queried dynamically.
Definition Value.h:46