]> 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 fea7a73fb78c3e8a0b68d12c7a9aa25f73018840..d7b8a8701ff0f8687cf871e59f000ba18c134ed2 100644 (file)
@@ -370,11 +370,12 @@ private:
        };
 
        Resources *resources;
-       ProgramParser parser;
        ProgramSyntax::Module *module;
+       std::set<std::string> imported_names;
 
 public:
        ProgramCompiler();
+       ~ProgramCompiler();
 
        void compile(const std::string &, const std::string & = "<string>");
        void compile(IO::Base &, Resources * = 0, const std::string & = "<file>");
@@ -385,6 +386,8 @@ 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 &);