1 #ifndef MSP_GL_PIPELINE_H_
2 #define MSP_GL_PIPELINE_H_
6 #include "renderable.h"
20 class Pipeline: public Renderable
26 const Lighting *lighting;
27 const DepthTest *depth_test;
33 void set_lighting(const Lighting *);
34 void set_depth_test(const DepthTest *);
35 void set_blend(const Blend *);
36 const Lighting *get_lighting() const { return lighting; }
37 const DepthTest *get_depth_test() const { return depth_test; }
38 const Blend *get_blend() const { return blend; }
44 const Renderable *renderable;
47 Slot(const Renderable *);
50 typedef std::map<Tag, Pass> PassMap;
53 std::vector<Tag> pass_order;
55 std::vector<Slot> renderables;
56 std::vector<PostProcessor *> postproc;
65 Renderbuffer *color_buf_ms;
66 Renderbuffer *depth_buf_ms;
69 Pipeline(unsigned, unsigned, bool = false);
73 void set_multisample(unsigned);
74 void set_camera(const Camera *);
76 Pass &add_pass(const Tag &tag);
77 Pass &get_pass(const Tag &tag);
78 const Pass &get_pass(const Tag &tag) const;
80 void add_renderable(const Renderable &);
81 void add_renderable_for_pass(const Renderable &, const Tag &);
82 void remove_renderable(const Renderable &);
83 void add_postprocessor(PostProcessor &);
85 virtual void render(Renderer &, const Tag &tag = Tag()) const;
86 void render_all() const;