X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fprogrambuilder.h;h=9860b4683320ad335dda5b6fdc5072b8ef0b5f6f;hb=922fac753e31d97fc88daa166e93e4c5572bd2ba;hp=0883f6a74fd07a6479dc1b01fa62424882455042;hpb=70663ae97d5b70a6b468e07dd7e73475a175dc9b;p=libs%2Fgl.git diff --git a/source/programbuilder.h b/source/programbuilder.h index 0883f6a7..9860b468 100644 --- a/source/programbuilder.h +++ b/source/programbuilder.h @@ -56,6 +56,7 @@ private: enum VariableScope { NO_SCOPE, + TYPE, UNIFORM, ATTRIBUTE, VERTEX, @@ -84,7 +85,9 @@ private: { std::string name; const VariableDefinition *variable; + const VariableDefinition *type; std::string resolved_name; + std::string resolved_block; bool fuzzy_space; std::string resolved_space; bool array_sum; @@ -100,6 +103,7 @@ private: void resolve(const VariableDefinition &); void resolve(ShaderVariable &); + void resolve_type(const VariableDefinition &); void resolve_space(const std::string &); void resolve_array(const StandardFeatures &, unsigned = 0); void add_reference(ShaderVariable &); @@ -107,6 +111,7 @@ private: void check_inline(bool, bool); bool is_referenced_from(VariableScope) const; InterfaceFlags get_interface_flags(VariableScope) const; + std::string create_type_declaration() const; std::string create_declaration(char = 0, bool = false) const; std::string create_replacement(VariableScope, const char * = 0) const; std::string create_expression(const char * = 0) const; @@ -137,6 +142,7 @@ public: private: std::string create_source(const std::list &, VariableScope) const; bool evaluate_flags(const char *) const; + static const char *unqualified_name(const char *); static MatchType name_match(const char *, const char *, const char ** = 0); static bool parse_identifier(const char *, unsigned &, unsigned &); static std::vector extract_identifiers(const char *);