X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.h;h=4ee594444a5e6c465d50347793c572f6f2e076ff;hb=6dc2da27f0831d4172fcfeba4900616fd6c844b8;hp=f6a4ab3371e7317dd904c66b3e7d3547c02a28c5;hpb=dafd3a42a2f06bfd8e88f9240fc2f4bd3d401541;p=libs%2Fgl.git diff --git a/source/pipeline.h b/source/pipeline.h index f6a4ab33..4ee59444 100644 --- a/source/pipeline.h +++ b/source/pipeline.h @@ -43,10 +43,10 @@ public: const DepthTest *depth_test; const Blend *blend; const Clipping *clipping; - const Renderable *renderable; + Renderable *renderable; public: - Pass(const Tag &, const Renderable *); + Pass(const Tag &, Renderable *); const Tag &get_tag() const { return tag; } @@ -58,16 +58,16 @@ public: const DepthTest *get_depth_test() const { return depth_test; } const Blend *get_blend() const { return blend; } const Clipping *get_clipping() const { return clipping; } - const Renderable *get_renderable() const { return renderable; } + Renderable *get_renderable() const { return renderable; } }; private: struct Slot { - const Renderable *renderable; + Renderable *renderable; std::set passes; - Slot(const Renderable *); + Slot(Renderable *); }; typedef std::list PassList; @@ -87,27 +87,30 @@ public: Pipeline(unsigned, unsigned, bool = false); ~Pipeline(); + /* Sets high dynamic range mode. Requires floating-point texture support. + A ColorCurve postprocessor is recommended for full benefit. */ void set_hdr(bool); + void set_multisample(unsigned); // Deprecated void set_camera(const Camera *); Pass &add_pass(const Tag &tag); - void add_renderable(const Renderable &); - void add_renderable_for_pass(const Renderable &, const Tag &); - void remove_renderable(const Renderable &); + void add_renderable(Renderable &); + void add_renderable_for_pass(Renderable &, const Tag &); + void remove_renderable(Renderable &); /** Adds a pass to the pipeline. It's permissible to add the same Renderable multiple times. */ - Pass &add_pass(const Tag &, const Renderable &); + Pass &add_pass(const Tag &, Renderable &); /** Adds a postprocessor to the pipeline. */ void add_postprocessor(PostProcessor &); - virtual void setup_frame() const; - virtual void finish_frame() const; + virtual void setup_frame(Renderer &); + virtual void finish_frame(); - void render() const; + void render(); virtual void render(Renderer &, const Tag &tag = Tag()) const; private: