]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.cpp
Tweaks to visitor classes in the GLSL compiler
[libs/gl.git] / source / glsl / optimize.cpp
index 5813e2d9a2a196a6fe759b730641dea562f6bdfa..dfb17b26799bc2845d063ad9618356f2f80be8d9 100644 (file)
@@ -213,14 +213,14 @@ UnusedVariableLocator::UnusedVariableLocator():
        global_scope(true)
 { }
 
-const set<Node *> &UnusedVariableLocator::apply(Stage &s)
+const set<Node *> &UnusedVariableRemover::apply(Stage &stage)
 {
        variables.push_back(BlockVariableMap());
-       visit(s.content);
+       visit(stage.content);
        BlockVariableMap &global_variables = variables.back();
        for(BlockVariableMap::iterator i=global_variables.begin(); i!=global_variables.end(); ++i)
        {
-               if(i->first->interface=="out" && (s.type==Stage::FRAGMENT || i->first->linked_declaration || !i->first->name.compare(0, 3, "gl_")))
+               if(i->first->interface=="out" && (stage.type==Stage::FRAGMENT || i->first->linked_declaration || !i->first->name.compare(0, 3, "gl_")))
                        continue;
                if(!i->second.referenced)
                {