]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/output.cpp
Support layout qualifiers on GLSL interface blocks
[libs/gl.git] / source / glsl / output.cpp
index f1e9b4be99ca8a2582e7a97944c0c16666f80540..928b42508792ce47398e2955b050d5cdd2f5b37c 100644 (file)
@@ -145,13 +145,6 @@ void Formatter::visit(Literal &literal)
        append(literal.token);
 }
 
-void Formatter::visit(ParenthesizedExpression &parexpr)
-{
-       append('(');
-       parexpr.expression->visit(*this);
-       append(')');
-}
-
 void Formatter::visit(VariableReference &var)
 {
        append(var.name);
@@ -313,7 +306,12 @@ void Formatter::visit(VariableDeclaration &var)
 
 void Formatter::visit(InterfaceBlock &iface)
 {
-       append(format("%s %s\n", iface.interface, iface.name));
+       if(iface.layout)
+       {
+               iface.layout->visit(*this);
+               append(' ');
+       }
+       append(format("%s %s\n", iface.interface, iface.block_name));
        if(iface.struct_declaration)
                iface.struct_declaration->members.visit(*this);
        if(!iface.instance_name.empty())