X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompatibility.cpp;h=9ed0d20c82c8b2a0ecc109c9db4adb55fff5040b;hb=8173340a7737e32cb25b21b67049102bd1526beb;hp=128902f3b9f473bb9df87559d40a231c139ac55e;hpb=f76e62a74917dbd850912587a5e79240dec9681f;p=libs%2Fgl.git diff --git a/source/glsl/compatibility.cpp b/source/glsl/compatibility.cpp index 128902f3..9ed0d20c 100644 --- a/source/glsl/compatibility.cpp +++ b/source/glsl/compatibility.cpp @@ -150,12 +150,12 @@ void LegacyConverter::visit(VariableReference &var) { var.name = "gl_FragColor"; var.declaration = 0; - type = "vec4"; + r_type = "vec4"; } else if(var.declaration) - type = var.declaration->type; + r_type = var.declaration->type; else - type = string(); + r_type.clear(); } void LegacyConverter::visit(Assignment &assign) @@ -178,12 +178,12 @@ void LegacyConverter::visit(FunctionCall &call) if(call.name=="texture") { string sampler_type; - type = string(); + r_type.clear(); NodeArray::iterator i = call.arguments.begin(); if(i!=call.arguments.end()) { (*i)->visit(*this); - sampler_type = type; + sampler_type = r_type; for(; i!=call.arguments.end(); ++i) (*i)->visit(*this);