X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fcompatibility.h;h=732f3477db5f9b401550ff999bde3d6f50af0718;hp=f33768767b0b0909614e9c8181cf26a32cf66487;hb=1fa69bb8eec3070f5da296d6dd0bd67aea62d3bf;hpb=a93a69e53263005709fa172845b01f81cd1c074c diff --git a/source/glsl/compatibility.h b/source/glsl/compatibility.h index f3376876..732f3477 100644 --- a/source/glsl/compatibility.h +++ b/source/glsl/compatibility.h @@ -11,13 +11,16 @@ namespace SL { class DefaultPrecisionGenerator: public BlockModifier { private: + Stage::Type stage_type; bool toplevel; std::set have_default; public: DefaultPrecisionGenerator(); - using StageVisitor::visit; + void apply(Stage &); + + using BlockModifier::visit; virtual void visit(Block &); virtual void visit(Precision &); virtual void visit(VariableDeclaration &); @@ -26,7 +29,9 @@ public: class PrecisionRemover: public BlockModifier { public: - using StageVisitor::visit; + void apply(Stage &s) { visit(s.content); } + + using BlockModifier::visit; virtual void visit(Precision &); virtual void visit(VariableDeclaration &); }; @@ -34,6 +39,7 @@ public: class LegacyConverter: public BlockModifier { private: + Stage *stage; GLApi target_api; Version target_version; std::string type; @@ -46,7 +52,10 @@ public: private: bool check_version(const Version &) const; bool check_extension(const Extension &) const; - using StageVisitor::visit; +public: + using BlockModifier::visit; + virtual void apply(Stage &); +private: bool supports_unified_interface_syntax() const; virtual void visit(VariableReference &); virtual void visit(Assignment &);