]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/generate.cpp
Remove the using declarations from visitors
[libs/gl.git] / source / glsl / generate.cpp
index 064d217e7da7b9b47f2c90dbab59a8f5006f9a77..ca4d41e64c7a8c63bf51fd8d446e5ccb4dc8bd5a 100644 (file)
@@ -10,7 +10,7 @@ namespace SL {
 
 void DeclarationCombiner::apply(Stage &stage)
 {
-       visit(stage.content);
+       stage.content.visit(*this);
        NodeRemover().apply(stage, nodes_to_remove);
 }
 
@@ -52,8 +52,9 @@ void DeclarationCombiner::visit(VariableDeclaration &var)
                                {
                                        bool found = false;
                                        for(vector<Layout::Qualifier>::iterator j=ptr->layout->qualifiers.begin(); (!found && j!=ptr->layout->qualifiers.end()); ++j)
-                                               if(j->identifier==i->identifier)
+                                               if(j->name==i->name)
                                                {
+                                                       j->has_value = i->value;
                                                        j->value = i->value;
                                                        found = true;
                                                }
@@ -95,7 +96,7 @@ void VariableResolver::apply(Stage &stage)
 {
        Stage *builtin_stage = get_builtins(stage.type);
        builtins = (builtin_stage ? &builtin_stage->content : 0);
-       visit(stage.content);
+       stage.content.visit(*this);
 }
 
 Block *VariableResolver::next_block(Block &block)
@@ -284,7 +285,7 @@ void InterfaceGenerator::apply(Stage &s)
        if(stage->previous)
                in_prefix = get_out_prefix(stage->previous->type);
        out_prefix = get_out_prefix(stage->type);
-       visit(s.content);
+       s.content.visit(*this);
        NodeRemover().apply(s, nodes_to_remove);
 }