]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/output.cpp
Output the passthrough statement in both GLSL and debug modes
[libs/gl.git] / source / glsl / output.cpp
index 3fc703c1966d9b4a9c745f7f3ee8e49aa55c5af8..46314588858667c059a80c131bb6f527b3ba9bc6 100644 (file)
@@ -186,9 +186,9 @@ void Formatter::visit(Layout &layout)
        {
                if(i!=layout.qualifiers.begin())
                        append(", ");
-               append(i->identifier);
-               if(!i->value.empty())
-                       append(format("=%s", i->value));
+               append(i->name);
+               if(i->has_value)
+                       append(format("=%d", i->value));
        }
        append(')');
 }
@@ -341,6 +341,18 @@ void Formatter::visit(Iteration &iter)
        }
 }
 
+void Formatter::visit(Passthrough &pass)
+{
+       append("passthrough");
+       if(pass.subscript)
+       {
+               append('[');
+               pass.subscript->visit(*this);
+               append(']');
+       }
+       append(';');
+}
+
 void Formatter::visit(Return &ret)
 {
        append("return");