]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programparser.h
Recognize #version directive in GLSL
[libs/gl.git] / source / programparser.h
index 72817e7ede06f8fe9607a2c17d8d99a503ea6c8e..e36604736b9f5cf4dfd28548038b87c371d76834 100644 (file)
@@ -38,6 +38,7 @@ private:
 
        std::string source;
        std::string source_name;
+       unsigned source_index;
        unsigned current_line;
        std::string::const_iterator iter;
        std::string::const_iterator source_end;
@@ -55,8 +56,8 @@ public:
        ProgramParser();
        ~ProgramParser();
 
-       ProgramSyntax::Module &parse(const std::string &, const std::string &);
-       ProgramSyntax::Module &parse(IO::Base &, const std::string &);
+       ProgramSyntax::Module &parse(const std::string &, const std::string &, unsigned = 0);
+       ProgramSyntax::Module &parse(IO::Base &, const std::string &, unsigned = 0);
 
 private:
        void parse_source();
@@ -86,6 +87,7 @@ private:
        bool is_identifier(const std::string &);
 
        void preprocess();
+       void preprocess_version();
        void preprocess_pragma();
        void preprocess_pragma_msp();
        void preprocess_stage();