X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Foutput.cpp;h=973ff8324ac927bdb0d282ff23edf6f7259565c5;hb=05597fbb3671dfed4776bc5223958c85e780345e;hp=dfd93470dd101dfac8ca4c7f8a07be588bb11e9f;hpb=7a16308e72aef363727b21348779673edf8e5c07;p=libs%2Fgl.git diff --git a/source/glsl/output.cpp b/source/glsl/output.cpp index dfd93470..973ff832 100644 --- a/source/glsl/output.cpp +++ b/source/glsl/output.cpp @@ -9,14 +9,17 @@ namespace GL { namespace SL { Formatter::Formatter(): + stage(0), source_index(0), source_line(1), indent(0), parameter_list(false) { } -void Formatter::apply(Stage &s) +const string &Formatter::apply(Stage &s) { + stage = &s; + GLApi api = get_gl_api(); const Version &ver = s.required_version; @@ -33,7 +36,9 @@ void Formatter::apply(Stage &s) if(!s.required_extensions.empty()) formatted += '\n'; - StageVisitor::apply(s); + visit(s.content); + + return formatted; } void Formatter::append(const string &text)