X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompatibility.cpp;h=692db972b56491eca5de797ae0f79bec61995754;hb=05597fbb3671dfed4776bc5223958c85e780345e;hp=398a7bd30a76eaa4b141b400d9cd4e08d0e87958;hpb=1fa69bb8eec3070f5da296d6dd0bd67aea62d3bf;p=libs%2Fgl.git diff --git a/source/glsl/compatibility.cpp b/source/glsl/compatibility.cpp index 398a7bd3..692db972 100644 --- a/source/glsl/compatibility.cpp +++ b/source/glsl/compatibility.cpp @@ -20,7 +20,7 @@ DefaultPrecisionGenerator::DefaultPrecisionGenerator(): void DefaultPrecisionGenerator::apply(Stage &stage) { - SetForScope set_stage(stage_type, stage.type); + stage_type = stage.type; visit(stage.content); } @@ -85,11 +85,11 @@ LegacyConverter::LegacyConverter(): frag_out(0) { } -LegacyConverter::LegacyConverter(const Version &v): - target_api(get_gl_api()), - target_version(v), - frag_out(0) -{ } +void LegacyConverter::apply(Stage &s) +{ + stage = &s; + visit(s.content); +} bool LegacyConverter::check_version(const Version &feature_version) const { @@ -113,12 +113,6 @@ bool LegacyConverter::check_extension(const Extension &extension) const return true; } -void LegacyConverter::apply(Stage &s) -{ - SetForScope set_stage(stage, &s); - visit(s.content); -} - bool LegacyConverter::supports_unified_interface_syntax() const { if(target_api==OPENGL_ES2)