X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.cpp;h=71b35b2c59f3ef8217db37d32b93123da763d047;hb=ef44eaf157a448938267ff707a3dbfeb1a87636f;hp=7c619830c1733f43160323172ff19605a69632e4;hpb=68af3c2b81cfe9a780bc2637d56e906b066ccaf4;p=libs%2Fgl.git diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index 7c619830..71b35b2c 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -565,8 +565,11 @@ void InterfaceGenerator::visit(VariableDeclaration &var) { /* For output variables in function scope, generate a global interface and replace the local declaration with an assignment. */ - if(function_scope && generate_interface(var, "out", var.name)) + VariableDeclaration *out_var = 0; + if(function_scope && (out_var=generate_interface(var, "out", var.name))) { + out_var->source = var.source; + out_var->line = var.line; nodes_to_remove.insert(&var); if(var.init_expression) {