X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.h;h=011a96bba5e37d6ca1bd056bfe1cede1c047cb03;hb=40a0024a6466298d064697ed022465c7d3e9168e;hp=bc793887695b2db51676d979522faf7f680842fc;hpb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;p=libs%2Fgl.git diff --git a/source/pipeline.h b/source/pipeline.h index bc793887..011a96bb 100644 --- a/source/pipeline.h +++ b/source/pipeline.h @@ -3,21 +3,41 @@ #include #include -#include "pipelinepass.h" #include "renderable.h" namespace Msp { namespace GL { +class Blend; class Camera; -class Effect; +class DepthTest; class Framebuffer; +class Lighting; class PostProcessor; class Renderbuffer; class Texture2D; class Pipeline: public Renderable { +public: + class Pass + { + private: + const Lighting *lighting; + const DepthTest *depth_test; + const Blend *blend; + + public: + Pass(); + + void set_lighting(const Lighting *); + void set_depth_test(const DepthTest *); + void set_blend(const Blend *); + const Lighting *get_lighting() const { return lighting; } + const DepthTest *get_depth_test() const { return depth_test; } + const Blend *get_blend() const { return blend; } + }; + private: struct Slot { @@ -27,13 +47,12 @@ private: Slot(const Renderable *); }; - typedef std::map PassMap; + typedef std::map PassMap; PassMap passes; std::vector pass_order; const Camera *camera; std::vector renderables; - std::vector effects; std::vector postproc; unsigned width; unsigned height; @@ -54,14 +73,13 @@ public: void set_multisample(unsigned); 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; + Pass &add_pass(const Tag &tag); + Pass &get_pass(const Tag &tag); + const Pass &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(Renderer &, const Tag &tag = Tag()) const;