X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fglsl%2Foutput.cpp;h=d28de156c5a881fede9fb116052370102338c80a;hb=2b1dc627491c987b0459226dcb8ac6aadd7ee4d3;hp=07da64e3ba565cdca64a8bb9f58b5d34f11c11eb;hpb=c585c065b7831eb6ae05e48edc36953d2534db2b;p=libs%2Fgl.git diff --git a/source/glsl/output.cpp b/source/glsl/output.cpp index 07da64e3..d28de156 100644 --- a/source/glsl/output.cpp +++ b/source/glsl/output.cpp @@ -295,6 +295,9 @@ void Formatter::visit(VariableDeclaration &var) else { string type_name = var.type_declaration->name; + if(const ImageTypeDeclaration *image = dynamic_cast(var.type_declaration)) + if(image->base_image) + type_name = image->base_image->name; if(var.array) type_name = type_name.substr(0, type_name.find('[')); append(format("%s %s", type_name, var.name));