]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/syntax.h
Rearrange some utility struct constructors
[libs/gl.git] / source / glsl / syntax.h
index d69922a7df1d4b349e3ea6747c46f3b478a6f267..b4d1b3869ae9395c90a5a424fa939ac17fada381 100644 (file)
@@ -313,6 +313,8 @@ struct Layout: Node
                std::string name;
                bool has_value;
                int value;
+
+               Qualifier(): has_value(false), value(0) { }
        };
 
        std::vector<Qualifier> qualifiers;
@@ -532,6 +534,8 @@ struct Stage
        std::map<std::string, InterfaceBlock *> interface_blocks;
        std::map<std::string, FunctionDeclaration *> functions;
        std::map<std::string, unsigned> locations;
+       std::map<std::string, unsigned> texture_bindings;
+       std::map<std::string, unsigned> uniform_block_bindings;
        Features required_features;
        std::vector<Diagnostic> diagnostics;
 
@@ -552,6 +556,7 @@ struct Module
 std::string get_unused_variable_name(const Block &, const std::string &);
 
 bool is_same_type(const TypeDeclaration &, const TypeDeclaration &);
+int get_layout_value(const Layout &, const std::string &, int = -1);
 
 } // namespace SL
 } // namespace GL