X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Foutput.cpp;h=9d4383e4de979b91c6febdab5e0cd02ca599e4e8;hb=dccad64b2ec82249d850b9745614042171499972;hp=f97b8cdb2e2958aeb7bee1d979bb9b0ecbbffeae;hpb=ede0bc3f5c7124ef100576ad4b0890c9cd13c79d;p=libs%2Fgl.git diff --git a/source/glsl/output.cpp b/source/glsl/output.cpp index f97b8cdb..9d4383e4 100644 --- a/source/glsl/output.cpp +++ b/source/glsl/output.cpp @@ -10,14 +10,16 @@ namespace SL { Formatter::Formatter(): stage(0), + mode(Compiler::PROGRAM), source_index(0), source_line(1), indent(0), parameter_list(false) { } -const string &Formatter::apply(Stage &s) +const string &Formatter::apply(Stage &s, Compiler::Mode m) { + mode = m; stage = &s; GLApi api = get_gl_api(); @@ -65,7 +67,7 @@ void Formatter::set_source(unsigned index, unsigned line) else { unsigned l = line; - if(stage && stage->required_versionrequired_versionrequired_versionrequired_versiontype==Stage::VERTEX && var.interface=="in") interface = "attribute";