]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.h
Add a system for creating Pipelines from loadable templates
[libs/gl.git] / source / pipeline.h
index 35d10a41c6f5a6f3521ade05f0066a4218bebbb3..9ac03efbb9989d4b2d462d689346f348ab299615 100644 (file)
@@ -76,7 +76,7 @@ private:
        PassList passes;
        const Camera *camera;
        std::vector<Slot> renderables;
-       std::vector<PostProcessor *> postproc;
+       std::vector<RefPtr<PostProcessor> > postproc;
        unsigned width;
        unsigned height;
        bool hdr;
@@ -98,6 +98,11 @@ public:
 
        void set_multisample(unsigned);
 
+       unsigned get_width() const { return width; }
+       unsigned get_height() const { return height; }
+       bool get_hdr() const { return hdr; }
+       unsigned get_multisample() const { return samples; }
+
        // Deprecated
        void set_camera(const Camera *);
        Pass &add_pass(const Tag &tag);
@@ -112,6 +117,15 @@ public:
        /** Adds a postprocessor to the pipeline. */
        void add_postprocessor(PostProcessor &);
 
+       /** Adds a postprocessor to the pipeline, transferring ownership.  The
+       postprocessor will be deleted together with with pipeline.  It is also
+       deleted if this call throws an exception. */
+       void add_postprocessor_owned(PostProcessor *);
+
+private:
+       void add_postprocessor(PostProcessor *, bool);
+
+public:
        virtual void setup_frame(Renderer &);
        virtual void finish_frame();