X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fevaluate.h;h=f3d3755ff62b602ead868278aa3ad8c0e17141a1;hb=e8542d921a07b7391d558cb3349a68f26675f797;hp=6cbc6cb4a24c0aa8325e300a780e3bf34ee79393;hpb=696a97bd7411d69953c1a9e4b5f3dfb4c1d848f1;p=libs%2Fgl.git diff --git a/source/glsl/evaluate.h b/source/glsl/evaluate.h index 6cbc6cb4..f3d3755f 100644 --- a/source/glsl/evaluate.h +++ b/source/glsl/evaluate.h @@ -7,6 +7,8 @@ namespace Msp { namespace GL { namespace SL { +/** Evaluates an expression. Only expressions consisting entirely of compile- +time constants can be evaluated. */ class ExpressionEvaluator: public NodeVisitor { public: @@ -14,15 +16,15 @@ public: private: const ValueMap *variable_values; - float result; - bool result_valid; + float r_result; + bool r_result_valid; public: ExpressionEvaluator(); ExpressionEvaluator(const ValueMap &); - float get_result() const { return result; } - bool is_result_valid() const { return result_valid; } + float get_result() const { return r_result; } + bool is_result_valid() const { return r_result_valid; } using NodeVisitor::visit; virtual void visit(Literal &);