1 #ifndef MSP_GL_SL_COMPATIBILITY_H_
2 #define MSP_GL_SL_COMPATIBILITY_H_
11 /** Generates default precision declarations or removes precision declarations
12 according to the requirements of the target API. */
13 class PrecisionConverter: private TraversingVisitor
17 std::set<std::string> have_default;
18 NodeList<Statement>::iterator insert_point;
19 std::set<Node *> nodes_to_remove;
27 virtual void visit(Block &);
28 virtual void visit(Precision &);
29 virtual void visit(VariableDeclaration &);
32 /** Converts structures of the syntax tree to match a particular set of
34 class LegacyConverter: private TraversingVisitor
39 VariableDeclaration *frag_out;
40 NodeList<Statement>::iterator uniform_insert_point;
41 std::set<Node *> nodes_to_remove;
46 virtual void apply(Stage &, const Features &);
49 void unsupported(const std::string &);
51 virtual void visit(Block &);
52 bool check_version(const Version &) const;
53 bool check_extension(bool Features::*) const;
54 bool supports_stage(Stage::Type) const;
55 bool supports_unified_interface_syntax() const;
56 virtual void visit(VariableReference &);
57 virtual void visit(Assignment &);
58 bool supports_unified_sampling_functions() const;
59 virtual void visit(FunctionCall &);
60 bool supports_interface_layouts() const;
61 bool supports_stage_interface_layouts() const;
62 bool supports_centroid_sampling() const;
63 bool supports_sample_sampling() const;
64 bool supports_uniform_location() const;
65 virtual void visit(VariableDeclaration &);
66 bool supports_interface_blocks(const std::string &) const;
67 bool supports_interface_block_location() const;
68 virtual void visit(InterfaceBlock &);