1 #ifndef MSP_GL_PIPELINE_H_
2 #define MSP_GL_PIPELINE_H_
6 #include "framebuffer.h"
7 #include "renderable.h"
8 #include "renderbuffer.h"
20 class Pipeline: public Renderable
27 const Lighting *lighting;
28 const DepthTest *depth_test;
34 const Tag &get_tag() const { return tag; }
36 void set_lighting(const Lighting *);
37 void set_depth_test(const DepthTest *);
38 void set_blend(const Blend *);
39 const Lighting *get_lighting() const { return lighting; }
40 const DepthTest *get_depth_test() const { return depth_test; }
41 const Blend *get_blend() const { return blend; }
47 const Renderable *renderable;
50 Slot(const Renderable *);
59 RenderTarget(unsigned, unsigned, PixelFormat);
62 struct MultisampleTarget
68 MultisampleTarget(unsigned, unsigned, unsigned, PixelFormat);
71 typedef std::list<Pass> PassList;
75 std::vector<Slot> renderables;
76 std::vector<PostProcessor *> postproc;
81 RenderTarget *target[2];
82 MultisampleTarget *target_ms;
85 Pipeline(unsigned, unsigned, bool = false);
89 void set_multisample(unsigned);
90 void set_camera(const Camera *);
92 Pass &add_pass(const Tag &tag);
94 void add_renderable(const Renderable &);
95 void add_renderable_for_pass(const Renderable &, const Tag &);
96 void remove_renderable(const Renderable &);
97 void add_postprocessor(PostProcessor &);
99 virtual void render(const Tag &tag = Tag()) const;
100 virtual void render(Renderer &, const Tag &tag = Tag()) const;
103 void create_targets(bool);