]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programcompiler.h
Allow imported GLSL modules to import other modules
[libs/gl.git] / source / programcompiler.h
index 6b1e1cdafe79f9be2ad0df6858cd89b95942e859..d7b8a8701ff0f8687cf871e59f000ba18c134ed2 100644 (file)
@@ -370,20 +370,24 @@ private:
        };
 
        Resources *resources;
-       ProgramParser parser;
        ProgramSyntax::Module *module;
+       std::set<std::string> imported_names;
 
 public:
        ProgramCompiler();
+       ~ProgramCompiler();
 
-       void compile(const std::string &);
-       void compile(IO::Base &, Resources * = 0);
+       void compile(const std::string &, const std::string & = "<string>");
+       void compile(IO::Base &, Resources * = 0, const std::string & = "<file>");
+       void compile(IO::Base &, const std::string &);
        void add_shaders(Program &);
 
 private:
        static ProgramSyntax::Module *create_builtins_module();
        static ProgramSyntax::Module &get_builtins_module();
        static ProgramSyntax::Stage *get_builtins(ProgramSyntax::StageType);
+       void append_module(ProgramSyntax::Module &);
+       void append_stage(ProgramSyntax::Stage &);
        void process();
        void import(const std::string &);
        void generate(ProgramSyntax::Stage &);