X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Foutput.cpp;h=364e5e4b23c02356a2c72743103ba212a32abd91;hb=3a1fe833ea04df75449706f1d773f6e65521a392;hp=718b1a8bcde406ec124f7959f314b606361c1d2a;hpb=3e24a1bfd5a259b185ff0f37046dd0489e1908a3;p=libs%2Fgl.git diff --git a/source/glsl/output.cpp b/source/glsl/output.cpp index 718b1a8b..364e5e4b 100644 --- a/source/glsl/output.cpp +++ b/source/glsl/output.cpp @@ -167,6 +167,16 @@ void Formatter::visit(Assignment &assign) assign.right->visit(*this); } +void Formatter::visit(TernaryExpression &ternary) +{ + ternary.condition->visit(*this); + append(ternary.oper->token); + ternary.true_expr->visit(*this); + if(ternary.oper->token[0]=='?') + append(':'); + ternary.false_expr->visit(*this); +} + void Formatter::visit(FunctionCall &call) { append(format("%s(", call.name));