1 #ifndef MSP_GL_EFFECT_H_
2 #define MSP_GL_EFFECT_H_
5 #include <msp/core/refptr.h>
6 #include "renderable.h"
14 Effects are used to wrap other renderables and give them additional visual
15 properties. An Effect's render method should set up the necessary state, call
16 the wrapped Renderable's render method, and clean up after itself.
18 class Effect: public Renderable
21 Renderable &renderable;
22 std::set<Tag> enabled_passes;
29 void enable_for_pass(Tag);
30 void disable_for_pass(Tag);
32 virtual const Matrix *get_matrix() const { return renderable.get_matrix(); }
33 virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return renderable.get_bounding_sphere(); }
35 virtual void setup_frame(Renderer &r) { renderable.setup_frame(r); }
36 virtual void finish_frame() { renderable.finish_frame(); }
38 virtual void set_debug_name(const std::string &) = 0;