bool shadow;
bool reflection;
bool transform;
+ bool colorify;
+ bool legacy;
StandardFeatures();
std::string create_flags() const;
};
+private:
enum VariableScope
{
NO_SCOPE,
FRAGMENT
};
-private:
struct StandardVariable
{
VariableScope scope;
std::string resolved_space;
std::list<ShaderVariable *> referenced_vars;
std::list<ShaderVariable *> referenced_by;
+ bool inlined;
+ bool inline_parens;
ShaderVariable(const std::string &);
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;
};
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: