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>
25 std::vector<std::string> imported_names;
34 void set_source(const std::string &, const std::string & = "<string>");
35 void load_source(IO::Base &, DataFile::Collection * = 0, const std::string & = "<file>");
36 void load_source(IO::Base &, const std::string &);
39 std::string get_combined_glsl() const;
40 std::vector<Stage::Type> get_stages() const;
41 std::string get_stage_glsl(Stage::Type) const;
42 const std::map<std::string, unsigned> &get_vertex_attributes() const;
43 const std::map<std::string, unsigned> &get_fragment_outputs() const;
44 const SourceMap &get_source_map() const;
47 void append_module(Module &, DataFile::Collection *);
48 void append_stage(Stage &);
49 void import(DataFile::Collection *, const std::string &);
50 void generate(Stage &, Mode);
51 bool optimize(Stage &);
52 void finalize(Stage &, Mode);
53 static void inject_block(Block &, const Block &);