]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programbuilder.h
The Scope enum has no need to be public
[libs/gl.git] / source / programbuilder.h
index 30f1ef15738b3ab969c288442fe354c0ae7b7843..14a90a85250eeb50c038e1498382210e3acd3bef 100644 (file)
@@ -30,12 +30,15 @@ public:
                bool shadow;
                bool reflection;
                bool transform;
+               bool colorify;
+               bool legacy;
 
                StandardFeatures();
 
                std::string create_flags() const;
        };
 
+private:
        enum VariableScope
        {
                NO_SCOPE,
@@ -45,7 +48,6 @@ public:
                FRAGMENT
        };
 
-private:
        struct StandardVariable
        {
                VariableScope scope;
@@ -64,6 +66,8 @@ private:
                std::string resolved_space;
                std::list<ShaderVariable *> referenced_vars;
                std::list<ShaderVariable *> referenced_by;
+               bool inlined;
+               bool inline_parens;
 
                ShaderVariable(const std::string &);
 
@@ -72,6 +76,7 @@ private:
                void resolve_space(const std::string &);
                void add_reference(ShaderVariable &);
                void update_reference(ShaderVariable &, ShaderVariable &);
+               void check_inline(bool);
                bool is_referenced_from(VariableScope) const;
                std::string get_expression() const;
        };
@@ -85,12 +90,14 @@ private:
 
        StandardFeatures features;
        std::string feature_flags;
+       bool optimize;
 
        static const StandardVariable standard_variables[];
 
 public:
        ProgramBuilder(const StandardFeatures &);
 
+       void set_optimize(bool);
        Program *create_program() const;
        void add_shaders(Program &) const;
 private: