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;
28 std::map<std::string, int> spec_values;
32 Compiler(const Features &);
38 void set_source(const std::string &, const std::string & = "<string>");
39 void load_source(IO::Base &, DataFile::Collection * = 0, const std::string & = "<file>");
40 void load_source(IO::Base &, const std::string &);
41 void specialize(const std::map<std::string, int> &);
44 std::string get_combined_glsl() const;
45 std::vector<Stage::Type> get_stages() const;
46 std::string get_stage_glsl(Stage::Type) const;
47 const std::map<std::string, unsigned> &get_vertex_attributes() const;
48 const std::map<std::string, unsigned> &get_fragment_outputs() const;
49 const SourceMap &get_source_map() const;
51 std::string get_stage_debug(Stage::Type) const;
54 void append_module(Module &, DataFile::Collection *);
55 void append_stage(Stage &);
56 void import(DataFile::Collection *, const std::string &);
57 void generate(Stage &, Mode);
58 bool optimize(Stage &);
59 void finalize(Stage &, Mode);
60 static void inject_block(Block &, const Block &);