X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.h;h=3f0ea2fa235390a81232c5b95bd26a014a93128d;hb=2663d392c1c60e0ca511bb836010124024da3276;hp=8edd679507ccbd9e8e0cc37f8b334f5f823a495d;hpb=56c9bfa0b47583fb9067705a69c3639a17d4a097;p=libs%2Fgl.git diff --git a/source/pipeline.h b/source/pipeline.h index 8edd6795..3f0ea2fa 100644 --- a/source/pipeline.h +++ b/source/pipeline.h @@ -9,12 +9,14 @@ Distributed under the LGPL #define MSP_GL_PIPELINE_H_ #include +#include #include "pipelinepass.h" #include "renderable.h" namespace Msp { namespace GL { +class Camera; class Effect; class Framebuffer; class PostProcessor; @@ -24,11 +26,20 @@ class Texture2D; class Pipeline: public Renderable { private: + struct Slot + { + const Renderable *renderable; + std::set passes; + + Slot(const Renderable *); + }; + typedef std::map PassMap; PassMap passes; std::vector pass_order; - std::vector renderables; + const Camera *camera; + std::vector renderables; std::vector effects; std::vector postproc; unsigned width; @@ -42,15 +53,19 @@ public: Pipeline(unsigned, unsigned, bool); ~Pipeline(); + void set_camera(const Camera *); + PipelinePass &add_pass(const Tag &tag); PipelinePass &get_pass(const Tag &tag); const PipelinePass &get_pass(const Tag &tag) const; 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(const Tag &tag=Tag()) const; + virtual void render(const Tag &tag = Tag()) const; void render_all() const; };