]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.h
Support limiting renderables in Pipeline to specific passes
[libs/gl.git] / source / renderpass.h
index 223f57dc410c9dedd5264cd554a0004cefb53a4d..e2ea4c97175eb6a62e14bfa6ec636a4c63b12b1d 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the LGPL
 #define MSP_GL_RENDERPASS_H_
 
 #include <msp/datafile/objectloader.h>
+#include "bindable.h"
 
 namespace Msp {
 namespace GL {
@@ -22,15 +23,17 @@ class Texture;
 Encapsulates the data that determines the appearance of a rendered surface.
 This includes shader and data for it, material and textures.
 */
-class RenderPass
+class RenderPass: public Bindable<RenderPass>
 {
 public:
        class Loader: public DataFile::CollectionObjectLoader<RenderPass>
        {
        public:
+               Loader(RenderPass &);
                Loader(RenderPass &, Collection &);
 
        private:
+               void init();
                virtual void finish();
                void material();
                void shader(const std::string &);
@@ -59,8 +62,6 @@ private:
        const Material *material;
        std::vector<TextureSlot> textures;
 
-       static const RenderPass *current;
-
        RenderPass &operator=(const RenderPass &);
 public:
        RenderPass();