1 #ifndef MSP_GL_PIPELINE_H_
2 #define MSP_GL_PIPELINE_H_
6 #include "pipelinepass.h"
7 #include "renderable.h"
19 class Pipeline: public Renderable
24 const Renderable *renderable;
27 Slot(const Renderable *);
30 typedef std::map<Tag, PipelinePass> PassMap;
33 std::vector<Tag> pass_order;
35 std::vector<Slot> renderables;
36 std::vector<Effect *> effects;
37 std::vector<PostProcessor *> postproc;
46 Renderbuffer *color_buf_ms;
47 Renderbuffer *depth_buf_ms;
50 Pipeline(unsigned, unsigned, bool = false);
54 void set_multisample(unsigned);
55 void set_camera(const Camera *);
57 PipelinePass &add_pass(const Tag &tag);
58 PipelinePass &get_pass(const Tag &tag);
59 const PipelinePass &get_pass(const Tag &tag) const;
61 void add_renderable(const Renderable &);
62 void add_renderable_for_pass(const Renderable &, const Tag &);
63 void remove_renderable(const Renderable &);
64 void add_effect(Effect &);
65 void add_postprocessor(PostProcessor &);
67 virtual void render(Renderer &, const Tag &tag = Tag()) const;
68 void render_all() const;