1 #ifndef MSP_GL_SL_COMPILER_H_
2 #define MSP_GL_SL_COMPILER_H_
5 #include <msp/datafile/collection.h>
6 #include <msp/io/base.h>
26 std::vector<std::string> imported_names;
30 Compiler(const Features &);
36 void set_source(const std::string &, const std::string & = "<string>");
37 void load_source(IO::Base &, DataFile::Collection * = 0, const std::string & = "<file>");
38 void load_source(IO::Base &, const std::string &);
41 std::string get_combined_glsl() const;
42 std::vector<Stage::Type> get_stages() const;
43 std::string get_stage_glsl(Stage::Type) const;
44 const std::map<std::string, unsigned> &get_vertex_attributes() const;
45 const std::map<std::string, unsigned> &get_fragment_outputs() const;
46 const SourceMap &get_source_map() const;
48 std::string get_stage_debug(Stage::Type) const;
51 void append_module(Module &, DataFile::Collection *);
52 void append_stage(Stage &);
53 void import(DataFile::Collection *, const std::string &);
54 void generate(Stage &, Mode);
55 bool optimize(Stage &);
56 void finalize(Stage &, Mode);
57 static void inject_block(Block &, const Block &);