X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompiler.h;h=69ac7427d80fc97188fa2bcbb0c2c600ef6cf67a;hb=6288c42adde9ee7d39a47de51fa2856cf965dccc;hp=6564d50ae42d1213eb6f0b90582973a3efe4d003;hpb=efeb3137935ec5ef6a16531c2e6b915caa3db481;p=libs%2Fgl.git diff --git a/source/glsl/compiler.h b/source/glsl/compiler.h index 6564d50a..69ac7427 100644 --- a/source/glsl/compiler.h +++ b/source/glsl/compiler.h @@ -21,11 +21,15 @@ public: }; private: + Features features; Module *module; std::vector imported_names; + bool specialized; + std::map spec_values; public: Compiler(); + Compiler(const Features &); ~Compiler(); private: @@ -34,6 +38,7 @@ public: void set_source(const std::string &, const std::string & = ""); void load_source(IO::Base &, DataFile::Collection * = 0, const std::string & = ""); void load_source(IO::Base &, const std::string &); + void specialize(const std::map &); void compile(Mode); std::string get_combined_glsl() const; @@ -42,8 +47,10 @@ public: const std::map &get_vertex_attributes() const; const std::map &get_fragment_outputs() const; const SourceMap &get_source_map() const; -private: + std::string get_stage_debug(Stage::Type) const; + +private: void append_module(Module &, DataFile::Collection *); void append_stage(Stage &); void import(DataFile::Collection *, const std::string &);