X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpipeline.h;h=0d38aaec40181ca402b896c1bf5a4530cb266fb7;hp=35d10a41c6f5a6f3521ade05f0066a4218bebbb3;hb=e37d3b91500994df3de4fe47bd3d3e75d3104b46;hpb=6109322ffc5dec1a777807fcbefacafe94d1d5eb diff --git a/source/pipeline.h b/source/pipeline.h index 35d10a41..0d38aaec 100644 --- a/source/pipeline.h +++ b/source/pipeline.h @@ -76,7 +76,7 @@ private: PassList passes; const Camera *camera; std::vector renderables; - std::vector postproc; + std::vector > postproc; unsigned width; unsigned height; bool hdr; @@ -87,6 +87,7 @@ private: public: Pipeline(unsigned, unsigned, bool = false); Pipeline(const View &); + Pipeline(const Framebuffer &); private: void init(unsigned, unsigned); public: @@ -98,6 +99,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 +118,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();