]> git.tdb.fi Git - libs/gl.git/commitdiff
Use resolved type names for output
authorMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 11:23:13 +0000 (13:23 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 5 Mar 2021 23:00:31 +0000 (01:00 +0200)
source/glsl/output.cpp

index 72af837958e77a712196b97cc9279258e8c08555..f440fa8c01cb34ea31cbd9742020165f4b61546e 100644 (file)
@@ -243,7 +243,7 @@ void Formatter::visit(VariableDeclaration &var)
        }
        if(!var.precision.empty())
                append(format("%s ", var.precision));
-       append(format("%s %s", var.type, var.name));
+       append(format("%s %s", var.type_declaration->name, var.name));
        if(var.array)
        {
                append('[');
@@ -277,7 +277,7 @@ void Formatter::visit(InterfaceBlock &iface)
 
 void Formatter::visit(FunctionDeclaration &func)
 {
-       append(format("%s %s(", func.return_type, func.name));
+       append(format("%s %s(", func.return_type_declaration->name, func.name));
        for(NodeArray<VariableDeclaration>::iterator i=func.parameters.begin(); i!=func.parameters.end(); ++i)
        {
                if(i!=func.parameters.begin())