]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.h
Store Renderables as non-const pointers or references
[libs/gl.git] / source / pipeline.h
index f6a4ab3371e7317dd904c66b3e7d3547c02a28c5..b450d0a5864ab76adcde1f92c1442a94b37fac89 100644 (file)
@@ -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<Tag> passes;
 
-               Slot(const Renderable *);
+               Slot(Renderable *);
        };
 
        typedef std::list<Pass> PassList;
@@ -93,13 +93,13 @@ public:
        // 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 &);