X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.h;h=a63eeb5f686a2deb4cd541e60cd0b05ab0a7101a;hb=6fa59eb26c39443eb44feecd17b7a8ea45411730;hp=5da9a7b32141035b891191c027ff146b108fd824;hpb=b617c5d7b5283ad260a77f01e42e6170cabbc03d;p=libs%2Fgl.git diff --git a/source/pipeline.h b/source/pipeline.h index 5da9a7b3..a63eeb5f 100644 --- a/source/pipeline.h +++ b/source/pipeline.h @@ -9,6 +9,7 @@ Distributed under the LGPL #define MSP_GL_PIPELINE_H_ #include +#include #include "pipelinepass.h" #include "renderable.h" @@ -25,12 +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; const Camera *camera; - std::vector renderables; + std::vector renderables; std::vector effects; std::vector postproc; unsigned width; @@ -38,7 +47,7 @@ private: bool hdr; Framebuffer *fbo; Texture2D *color_buf; - Renderbuffer *depth_buf; + Texture2D *depth_buf; public: Pipeline(unsigned, unsigned, bool); @@ -51,6 +60,8 @@ public: 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 &);