3 This file is part of libmspgl
4 Copyright © 2009 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_PIPELINE_H_
9 #define MSP_GL_PIPELINE_H_
13 #include "pipelinepass.h"
14 #include "renderable.h"
26 class Pipeline: public Renderable
31 const Renderable *renderable;
34 Slot(const Renderable *);
37 typedef std::map<Tag, PipelinePass> PassMap;
40 std::vector<Tag> pass_order;
42 std::vector<Slot> renderables;
43 std::vector<Effect *> effects;
44 std::vector<PostProcessor *> postproc;
50 Renderbuffer *depth_buf;
53 Pipeline(unsigned, unsigned, bool);
56 void set_camera(const Camera *);
58 PipelinePass &add_pass(const Tag &tag);
59 PipelinePass &get_pass(const Tag &tag);
60 const PipelinePass &get_pass(const Tag &tag) const;
62 void add_renderable(const Renderable &);
63 void add_renderable_for_pass(const Renderable &, const Tag &);
64 void remove_renderable(const Renderable &);
65 void add_effect(Effect &);
66 void add_postprocessor(PostProcessor &);
68 virtual void render(const Tag &tag = Tag()) const;
69 void render_all() const;