]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.h
Turn Effect into a Renderable
[libs/gl.git] / source / pipeline.h
index e4509af8364c77b84c512f141d8d3f30b66f0a78..85179b7d5abfb4c4263c39176b53d6fd26a0a7a5 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2009-2011  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_PIPELINE_H_
 #define MSP_GL_PIPELINE_H_
 
@@ -17,7 +10,6 @@ namespace Msp {
 namespace GL {
 
 class Camera;
-class Effect;
 class Framebuffer;
 class PostProcessor;
 class Renderbuffer;
@@ -40,19 +32,24 @@ private:
        std::vector<Tag> pass_order;
        const Camera *camera;
        std::vector<Slot> renderables;
-       std::vector<Effect *> effects;
        std::vector<PostProcessor *> postproc;
        unsigned width;
        unsigned height;
        bool hdr;
+       unsigned samples;
        Framebuffer *fbo;
        Texture2D *color_buf;
        Texture2D *depth_buf;
+       Framebuffer *fbo_ms;
+       Renderbuffer *color_buf_ms;
+       Renderbuffer *depth_buf_ms;
 
 public:
-       Pipeline(unsigned, unsigned, bool);
+       Pipeline(unsigned, unsigned, bool = false);
        ~Pipeline();
 
+       void set_hdr(bool);
+       void set_multisample(unsigned);
        void set_camera(const Camera *);
 
        PipelinePass &add_pass(const Tag &tag);
@@ -62,11 +59,13 @@ public:
        void add_renderable(const Renderable &);
        void add_renderable_for_pass(const Renderable &, const Tag &);
        void remove_renderable(const Renderable &);
-       void add_effect(Effect &);
        void add_postprocessor(PostProcessor &);
 
        virtual void render(Renderer &, const Tag &tag = Tag()) const;
        void render_all() const;
+
+private:
+       void create_fbos();
 };
 
 } // namespace GL